From: Lars Ingebrigtsen <larsi@gnus.org>
To: jidanni@jidanni.org
Cc: 3625@debbugs.gnu.org
Subject: bug#3625: save-some-buffers won't buzz off and let me just visit a file
Date: Sun, 13 Oct 2019 21:41:42 +0200 [thread overview]
Message-ID: <875zksa0w9.fsf@gnus.org> (raw)
In-Reply-To: <87r5xfzi1j.fsf@jidanni.org> (jidanni@jidanni.org's message of "Sat, 20 Jun 2009 11:43:36 +0800")
jidanni@jidanni.org writes:
> C-x s runs the command save-some-buffers,
> which will ask
> Type SPC or `y' to save the current buffer;
> DEL or `n' to skip the current buffer;
> RET or `q' to give up on the save (skip all remaining buffers);
> C-g to quit (cancel the whole command);
> ! to save all remaining buffers;
> C-r to view this buffer;
> d to view changes in this buffer;
> or . (period) to save the current buffer and exit.
> But nowhere in that list is there a choice to just let you visit that
> buffer. E.g.,
> C-r to view this buffer;
> still "waits out there in the parking lot (minibuffer) with the engine
> running, waiting for you to come back out. He just won't buzz-off."
That's a good idea -- exiting the query and popping to the buffer being
asked about is a pretty natural thing to do.
So I've now added it to Emacs 27, but it was surprisingly awkward to do,
based on how the actions are defined (a defvarred alist), what they can
return (just "don't do this" and "do this"), and the fact that
`save-some-buffers' is wrapped in a `save-window-excursion' that I think
is best left alone.
But I think I successfully hacked it together by mixing some dynamic
binding with some lexical binding in a kinda messy way. If somebody has
a better idea how to do this that doesn't go through three indirections:
please be my guest.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
prev parent reply other threads:[~2019-10-13 19:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-20 3:43 bug#3625: save-some-buffers won't buzz off and let me just visit a file jidanni
2009-06-20 8:44 ` Sven Joachim
2009-06-20 19:56 ` jidanni
2019-10-13 19:41 ` Lars Ingebrigtsen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875zksa0w9.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=3625@debbugs.gnu.org \
--cc=jidanni@jidanni.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).