unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* make emacs switch to front unsaved buffer when quit
@ 2012-04-04 15:35 Xah Lee
  2012-04-05  0:50 ` Juanma Barranquero
       [not found] ` <mailman.541.1333587088.20052.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 4+ messages in thread
From: Xah Lee @ 2012-04-04 15:35 UTC (permalink / raw)
  To: help-gnu-emacs

when quitting emacs “save-buffers-kill-terminal” 【Ctrl+x Ctrl+c】,
emacs will ask to save unsaved buffer, but doesn't switch it to front
to let you see.

Is there a hook or variable to make it so?

 Xah


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: make emacs switch to front unsaved buffer when quit
  2012-04-04 15:35 make emacs switch to front unsaved buffer when quit Xah Lee
@ 2012-04-05  0:50 ` Juanma Barranquero
  2012-04-05  1:27   ` Drew Adams
       [not found] ` <mailman.541.1333587088.20052.help-gnu-emacs@gnu.org>
  1 sibling, 1 reply; 4+ messages in thread
From: Juanma Barranquero @ 2012-04-05  0:50 UTC (permalink / raw)
  To: Xah Lee; +Cc: help-gnu-emacs

On Wed, Apr 4, 2012 at 17:35, Xah Lee <xahlee@gmail.com> wrote:
> when quitting emacs “save-buffers-kill-terminal” 【Ctrl+x Ctrl+c】,
> emacs will ask to save unsaved buffer, but doesn't switch it to front
> to let you see.

That runs save-buffers-kill-emacs, which runs save-some-buffers, whose
docstring says:

  You can answer `y' to save, `n' not to save, `C-r' to look at the
  buffer in question with `view-buffer' before deciding or `d' to
  view the differences using `diff-buffer-with-file'.

    Juanma



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: make emacs switch to front unsaved buffer when quit
       [not found] ` <mailman.541.1333587088.20052.help-gnu-emacs@gnu.org>
@ 2012-04-05  1:08   ` Xah Lee
  0 siblings, 0 replies; 4+ messages in thread
From: Xah Lee @ 2012-04-05  1:08 UTC (permalink / raw)
  To: help-gnu-emacs

On Apr 4, 5:50 pm, Juanma Barranquero <lek...@gmail.com> wrote:
> On Wed, Apr 4, 2012 at 17:35, Xah Lee <xah...@gmail.com> wrote:
> > when quitting emacs “save-buffers-kill-terminal” 【Ctrl+x Ctrl+c】,
> > emacs will ask to save unsaved buffer, but doesn't switch it to front
> > to let you see.
>
> That runs save-buffers-kill-emacs, which runs save-some-buffers, whose
> docstring says:
>
>   You can answer `y' to save, `n' not to save, `C-r' to look at the
>   buffer in question with `view-buffer' before deciding or `d' to
>   view the differences using `diff-buffer-with-file'.
>
>     Juanma

i tried Ctrl+r but that doesn't work. But what i actually wanted is
for emacs to switch the buffer in question automatically.

am surprised this wasn't default, till someone asked me, and i
realized being annoyed by it too.

 Xah


^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: make emacs switch to front unsaved buffer when quit
  2012-04-05  0:50 ` Juanma Barranquero
@ 2012-04-05  1:27   ` Drew Adams
  0 siblings, 0 replies; 4+ messages in thread
From: Drew Adams @ 2012-04-05  1:27 UTC (permalink / raw)
  To: 'Juanma Barranquero', 'Xah Lee'; +Cc: help-gnu-emacs

> That runs save-buffers-kill-emacs, which runs save-some-buffers, whose
> docstring says:
> 
>   You can answer `y' to save, `n' not to save, `C-r' to look at the
>   buffer in question with `view-buffer' before deciding or `d' to
>   view the differences using `diff-buffer-with-file'.

`C-x C-c' runs `save-buffers-kill-terminal', by default.  And that calls
`save-buffers-kill-emacs', which runs `save-some-buffers'.  It's not so obvious
which function to check for more info.

Fortunately, the prompt lists the keys you can use.  Unfortunately, it does not
point out that `C-h' will give you more help, telling you what each key does.

Also unfortunately, the doc of `save-some-buffers' (both doc string and Elisp
manual) does not say anything about hitting `C-h' and some of the the other keys
you can use.

I just filed bug #11181 for this.




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-04-05  1:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-04 15:35 make emacs switch to front unsaved buffer when quit Xah Lee
2012-04-05  0:50 ` Juanma Barranquero
2012-04-05  1:27   ` Drew Adams
     [not found] ` <mailman.541.1333587088.20052.help-gnu-emacs@gnu.org>
2012-04-05  1:08   ` Xah Lee

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).