* bug#3625: save-some-buffers won't buzz off and let me just visit a file
@ 2009-06-20 3:43 jidanni
2009-06-20 8:44 ` Sven Joachim
2019-10-13 19:41 ` Lars Ingebrigtsen
0 siblings, 2 replies; 4+ messages in thread
From: jidanni @ 2009-06-20 3:43 UTC (permalink / raw)
To: bug-gnu-emacs
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."
In GNU Emacs 23.0.94.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#3625: save-some-buffers won't buzz off and let me just visit a file
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
1 sibling, 1 reply; 4+ messages in thread
From: Sven Joachim @ 2009-06-20 8:44 UTC (permalink / raw)
To: jidanni; +Cc: 3625
On 2009-06-20 05:43 +0200, jidanni@jidanni.org wrote:
> 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."
This was done on purpose because somebody had complained about the
difficulties of recursive editing which is probably the only feasible
way to visit the buffer in this situation. See bug #381¹.
Sven
¹ http://emacsbugs.donarmstrong.com/381
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#3625: save-some-buffers won't buzz off and let me just visit a file
2009-06-20 8:44 ` Sven Joachim
@ 2009-06-20 19:56 ` jidanni
0 siblings, 0 replies; 4+ messages in thread
From: jidanni @ 2009-06-20 19:56 UTC (permalink / raw)
To: svenjoac; +Cc: 3625
SJ> This was done on purpose because somebody had complained about the
SJ> difficulties of recursive editing which is probably the only feasible
SJ> way to visit the buffer in this situation. See bug #381¹.
SJ> ¹ http://emacsbugs.donarmstrong.com/381
I see what I want then is the same as what I want now, an additional:
g: never mind saving anymore files, just let me visit that buffer now,
and don't bother waiting for me.
There must be some lisp way of doing that other than something like
system("exec emacsclient -n that_file&")?
We don't need save-some-buffers to do anything more at this point other
than call switch-to-buffer that_files_buffer, and then that's the end of
switch-to-buffer
OK, maybe what is making this impossible is
save-some-buffers-action-alist. But this is getting over my head.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#3625: save-some-buffers won't buzz off and let me just visit a file
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
@ 2019-10-13 19:41 ` Lars Ingebrigtsen
1 sibling, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-13 19:41 UTC (permalink / raw)
To: jidanni; +Cc: 3625
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-10-13 19:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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).