unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* saving buffers options
@ 2008-08-22 11:57 Rustom Mody
  2008-09-01 16:37 ` Kevin Rodgers
  0 siblings, 1 reply; 3+ messages in thread
From: Rustom Mody @ 2008-08-22 11:57 UTC (permalink / raw)
  To: help-gnu-emacs

Some buffers can be closed without any questions but for some --
typically file buffers -- if a changed buffer is (tried to be) closed,
a question is asked: Do you want save this...??

I want to get this question for python-mode, shell-mode etc. Is there
some option for this?

Thanks.




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

* Re: saving buffers options
       [not found] <mailman.17318.1219406286.18990.help-gnu-emacs@gnu.org>
@ 2008-08-22 17:09 ` Rupert Swarbrick
  0 siblings, 0 replies; 3+ messages in thread
From: Rupert Swarbrick @ 2008-08-22 17:09 UTC (permalink / raw)
  To: help-gnu-emacs


[-- Attachment #1.1: Type: text/plain, Size: 638 bytes --]

"Rustom Mody" <rustompmody@gmail.com> writes:

> Some buffers can be closed without any questions but for some --
> typically file buffers -- if a changed buffer is (tried to be) closed,
> a question is asked: Do you want save this...??
>
> I want to get this question for python-mode, shell-mode etc. Is there
> some option for this?
>
> Thanks.

Looking at C-h f kill-buffer, I see that kill-buffer-query-functions is
called on kill, but my emacs only has 

  (gnuserv-kill-buffer-query-function)

in there, so it can't be that which checks whether you want to save
dirty files...

However, I just hacked this up:


[-- Attachment #1.2: a --]
[-- Type: application/emacs-lisp, Size: 324 bytes --]

[-- Attachment #1.3: Type: text/plain, Size: 157 bytes --]


which seems to work here. Clearly you'll want to edit
savable-shell-modes and possibly change more than that... But there's a
quick start I think.


Rupert

[-- Attachment #2: Type: application/pgp-signature, Size: 314 bytes --]

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

* Re: saving buffers options
  2008-08-22 11:57 saving buffers options Rustom Mody
@ 2008-09-01 16:37 ` Kevin Rodgers
  0 siblings, 0 replies; 3+ messages in thread
From: Kevin Rodgers @ 2008-09-01 16:37 UTC (permalink / raw)
  To: help-gnu-emacs

Rustom Mody wrote:
> Some buffers can be closed without any questions but for some --
> typically file buffers -- if a changed buffer is (tried to be) closed,
> a question is asked: Do you want save this...??
> 
> I want to get this question for python-mode, shell-mode etc. Is there
> some option for this?

,----[ C-h v buffer-offer-save RET ]
| buffer-offer-save is a variable defined in `files.el'.
| Its value is nil
|
| Automatically becomes buffer-local when set in any fashion.
|
|
| Documentation:
| Non-nil in a buffer means always offer to save buffer on exit.
| Do so even if the buffer is not visiting a file.
| Automatically local in all buffers.
|
| You can customize this variable.
|
| [back]
`----

So set buffer-offer-save in python-mode-hook, shell-mode-hook, etc.

-- 
Kevin Rodgers
Denver, Colorado, USA





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

end of thread, other threads:[~2008-09-01 16:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-22 11:57 saving buffers options Rustom Mody
2008-09-01 16:37 ` Kevin Rodgers
     [not found] <mailman.17318.1219406286.18990.help-gnu-emacs@gnu.org>
2008-08-22 17:09 ` Rupert Swarbrick

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