[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/el-search 85fdccc 202/332: New option value ask-multi f
From: |
Stefan Monnier |
Subject: |
[elpa] externals/el-search 85fdccc 202/332: New option value ask-multi for `el-search-auto-save-buffers' |
Date: |
Tue, 1 Dec 2020 15:48:45 -0500 (EST) |
branch: externals/el-search
commit 85fdccc88046e3823e758e8768ae980af07344b5
Author: Michael Heerdegen <michael_heerdegen@web.de>
Commit: Michael Heerdegen <michael_heerdegen@web.de>
New option value ask-multi for `el-search-auto-save-buffers'
This should be a bit more convenient than 'ask in practice.
* el-search/el-search.el (el-search-auto-save-buffers): Add new value
'ask-multi.
(el-search--search-and-replace-pattern): Do the right thing for the
new value.
* el-search/NEWS: New file, start filling it.
---
NEWS | 11 +++++++++++
el-search.el | 33 ++++++++++++++++++++++++---------
2 files changed, 35 insertions(+), 9 deletions(-)
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..973abf2
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,11 @@
+Some of the user visible news were:
+
+Version: 1.4.0.15
+
+ The new option value 'ask-multi for el-search-auto-save-buffers,
+ which is also the new default, makes el-search only prompt for
+ whether to save buffers for multi-buffer query-replace sessions.
+ For single buffer sessions, no prompt, and you can/should save
+ yourself. I find that behavior slightly more convenient than 'ask
+ in most cases.
+
diff --git a/el-search.el b/el-search.el
index 106e126..e4070ab 100644
--- a/el-search.el
+++ b/el-search.el
@@ -7,7 +7,7 @@
;; Created: 29 Jul 2015
;; Keywords: lisp
;; Compatibility: GNU Emacs 25
-;; Version: 1.4.0.14
+;; Version: 1.4.0.15
;; Package-Requires: ((emacs "25") (stream "2.2.4"))
@@ -376,7 +376,11 @@
;;
;; - There could be something much better than pp to format the
;; replacement, or pp should be improved.
-
+;;
+;;
+;; NEWS:
+;;
+;; Please see the NEWS file in this directory.
@@ -448,21 +452,25 @@ tested. "
:type '(choice (repeat :tag "Regexps for ignored directories" regexp)
(const :tag "No ignored directories" nil)))
-(defcustom el-search-auto-save-buffers 'ask
+(defcustom el-search-auto-save-buffers 'ask-multi
"Whether to automatically save modified buffers.
When non-nil, save modified file buffers when query-replace is
finished there.
If the non-nil value is the symbol ask, ask for confirmation for
-each buffer. You can still let all following buffers
-automatically be saved or left unsaved from the prompt.
+each modified file buffer. You can still let all following
+buffers automatically be saved or left unsaved from the prompt.
+
+ask-multi is like ask, but don't ask and don't save for
+single-buffer sessions.
Save automatically for any other non-nil value.
-The default value is ask."
+The default value is ask-multi."
:type '(choice (const :tag "Off" nil)
(const :tag "On" t)
- (const :tag "Ask" ask)))
+ (const :tag "Ask" ask)
+ (const :tag "Ask when multibuffer" ask-multi)))
(defvar el-search-read-expression-map
(let ((map (make-sparse-keymap)))
@@ -3147,8 +3155,15 @@ Toggle splicing mode (\\[describe-function]
el-search-query-replace for details)
(progn
(cl-incf nbr-changed-buffers)
(when (pcase el-search-auto-save-buffers
- ((or 'nil (guard (not buffer-file-name))) nil)
- ('ask
+ ((or 'nil
+ (guard (not buffer-file-name)))
+ nil)
+ ((and 'ask-multi
+ (guard (alist-get 'is-single-buffer
+ (el-search-object-properties
+
el-search--current-search))))
+ nil)
+ ((or 'ask 'ask-multi)
(if save-all-answered
(cdr save-all-answered)
(pcase (car (read-multiple-choice
- [elpa] externals/el-search 42c776a 207/332: * el-search/el-search.el: Tweak el-search-jump-to-search-head, (continued)
- [elpa] externals/el-search 42c776a 207/332: * el-search/el-search.el: Tweak el-search-jump-to-search-head, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search ce97e9d 108/332: el-search: bump version to 0.2.2, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search e5bd647 214/332: * el-search/el-search.el: Work around Emacs Bug#29857, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search d995af1 166/332: Don't let el-search-pattern resume a paused search, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search ceb23fc 169/332: More multi query-replace related improvements, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 1aded2b 172/332: Make amount of context around occur matches adjustable, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search dc1d703 175/332: Require the new rmc.el lib when available, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 419a9c2 176/332: Improve jumping to matches in *El Occur* buffers, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 8c3213f 182/332: Bump el-search version to 1.4, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search d3eaaf0 198/332: Make the some-context function include an opening backquote, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 85fdccc 202/332: New option value ask-multi for `el-search-auto-save-buffers',
Stefan Monnier <=
- [elpa] externals/el-search 92efda8 101/332: Add comment about (pcase) backquote inside (real) backquote, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 33c14a4 103/332: Move some pattern definitions to new file "el-search-x", Stefan Monnier, 2020/12/01
- [elpa] externals/el-search c4d8e00 105/332: el-search--make-docstring: exclude some specially named patterns, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 0735984 120/332: el-search: more cleanup and minor tweaks; version 1.0.1, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 6292dcc 130/332: Fix disregarding compressed elisp files, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 788db9d 135/332: Use regexp-opt on suffixes in el-search--elisp-file-name-p, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search e7e900c 145/332: Use `read' to circumvent bug#24542, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 8e6466a 131/332: Set syntax table for temp buffers in el-search-atom-list, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search cdfe8c1 136/332: Call `user-error' instead of `error' where appropriate, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 5fbbcd1 168/332: Restore current search head in case of error or quit, Stefan Monnier, 2020/12/01