* emacs exiting
@ 2011-12-07 22:16 sergio
2011-12-08 4:07 ` Alexander
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: sergio @ 2011-12-07 22:16 UTC (permalink / raw)
To: help-gnu-emacs
Hello.
How to leave emacs without saving after some modification were made
without leaving #file# (with moving it or switching off)?
--
sergio.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: emacs exiting
2011-12-07 22:16 emacs exiting sergio
@ 2011-12-08 4:07 ` Alexander
2011-12-08 6:27 ` sergio
2011-12-08 8:57 ` Eric S Fraga
2011-12-08 16:11 ` Peter Münster
2 siblings, 1 reply; 8+ messages in thread
From: Alexander @ 2011-12-08 4:07 UTC (permalink / raw)
To: sergio; +Cc: help-gnu-emacs
On Wed, Dec 7, 2011 at 5:16 PM, sergio <mailbox@sergio.spb.ru> wrote:
>
> Hello.
>
> How to leave emacs without saving after some modification were made
> without leaving #file# (with moving it or switching off)?
>
> --
> sergio.
>
I'm not sure what you're asking but try C-x C-c.
--
Alexander
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: emacs exiting
2011-12-08 4:07 ` Alexander
@ 2011-12-08 6:27 ` sergio
2011-12-08 7:20 ` Tassilo Horn
0 siblings, 1 reply; 8+ messages in thread
From: sergio @ 2011-12-08 6:27 UTC (permalink / raw)
To: help-gnu-emacs
On 12/08/2011 08:07 AM, Alexander wrote:
>> How to leave emacs without saving after some modification were made
>> without leaving #file# (with moving it or switching off)?
> I'm not sure what you're asking but try C-x C-c.
This leaves auto save #file# after exit.
--
sergio.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: emacs exiting
2011-12-08 6:27 ` sergio
@ 2011-12-08 7:20 ` Tassilo Horn
2011-12-08 10:20 ` sergio
2011-12-08 10:24 ` Andreas Röhler
0 siblings, 2 replies; 8+ messages in thread
From: Tassilo Horn @ 2011-12-08 7:20 UTC (permalink / raw)
To: help-gnu-emacs
sergio <mailbox@sergio.spb.ru> writes:
Hi Sergio,
>>> How to leave emacs without saving after some modification were made
>>> without leaving #file# (with moving it or switching off)?
>
>> I'm not sure what you're asking but try C-x C-c.
>
> This leaves auto save #file# after exit.
But only if you say "no" when being queried if the changes should be
saved to the file. Well, in that case it might be ok not to auto-save,
because the user already stated that he doesn't want to persist his
changes. But I don't see how that could be done easily. One way would
be to write your own version of `server-kill-emacs-query-function' and
replace the original with yours in `kill-emacs-query-functions'...
You could also disable auto-saving completely:
,----[ C-h v auto-save-default RET ]
| auto-save-default is a variable defined in `files.el'.
| Its value is t
|
| Documentation:
| Non-nil says by default do auto-saving of every file-visiting buffer.
|
| You can customize this variable.
`----
But I don't think it's a good idea to turn off auto saving.
Bye,
Tassilo
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: emacs exiting
2011-12-07 22:16 emacs exiting sergio
2011-12-08 4:07 ` Alexander
@ 2011-12-08 8:57 ` Eric S Fraga
2011-12-08 16:11 ` Peter Münster
2 siblings, 0 replies; 8+ messages in thread
From: Eric S Fraga @ 2011-12-08 8:57 UTC (permalink / raw)
To: help-gnu-emacs
sergio <mailbox@sergio.spb.ru> writes:
> Hello.
>
> How to leave emacs without saving after some modification were made
> without leaving #file# (with moving it or switching off)?
If this is something you are going to do often and with many modified
files, I cannot help you. However, if this is something that will crop
up now and again, I would simply suggest you manually visit and kill
each of the buffers (C-x k) you don't want to save.
HTH,
eric
--
Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: emacs exiting
2011-12-08 7:20 ` Tassilo Horn
@ 2011-12-08 10:20 ` sergio
2011-12-08 10:24 ` Andreas Röhler
1 sibling, 0 replies; 8+ messages in thread
From: sergio @ 2011-12-08 10:20 UTC (permalink / raw)
To: help-gnu-emacs
On 12/08/2011 11:20 AM, Tassilo Horn wrote:
> But only if you say "no" when being queried if the changes should be
> saved to the file.
The main question is "exit without saving", so I must answer "no".
> One way would be to write your own version ...
It's very difficult. But as I just realized kill-buffer removes #file#
even if modification were made. It doesn't close emacs, so it doesn't
solve problem, but I think it's not very difficult to write own function
which kills buffer and closes emacs.
> You could also disable auto-saving completely:
No, as I said this is absolutely impossible. I used to that vim takes
care about this and I don't have (and don't want to have) habit to save
file.
> But I don't think it's a good idea to turn off auto saving.
I think it's very bad idea.
--
sergio.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: emacs exiting
2011-12-08 7:20 ` Tassilo Horn
2011-12-08 10:20 ` sergio
@ 2011-12-08 10:24 ` Andreas Röhler
1 sibling, 0 replies; 8+ messages in thread
From: Andreas Röhler @ 2011-12-08 10:24 UTC (permalink / raw)
To: help-gnu-emacs
> But I don't think it's a good idea to turn off auto saving.
>
> Bye,
> Tassilo
>
+1
made a script, which deletes files I usually don't want to see then.
a version runs from Emacs called on a dired-buffer, the other from bash
from Emacs it reads
(defun dak ()
"Delete files not wanted. "
(interactive)
(shell-command "
rm \$(find . -maxdepth 1 -type f -name \"\\#\*#\" \\
-o -type f -name \"\*.OTHER\" \\
-o -type f -name \"\*.THIS\" \\
-o -type f -name \"\*.BASE\" \\
-o -type f -name \"\*.\* \*~\" \\
...
Andreas
--
http://launchpad.net/python-mode
http://launchpad.net/s-x-emacs-werkstatt/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: emacs exiting
2011-12-07 22:16 emacs exiting sergio
2011-12-08 4:07 ` Alexander
2011-12-08 8:57 ` Eric S Fraga
@ 2011-12-08 16:11 ` Peter Münster
2 siblings, 0 replies; 8+ messages in thread
From: Peter Münster @ 2011-12-08 16:11 UTC (permalink / raw)
To: help-gnu-emacs
On Wed, Dec 07 2011, sergio wrote:
> How to leave emacs without saving after some modification were made
> without leaving #file# (with moving it or switching off)?
Perhaps like this:
(defadvice save-buffers-kill-terminal (before my-before-exit activate)
(kill-all-unsaved-buffers))
You would just need to write (kill-all-unsaved-buffers).
--
Peter
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-12-08 16:11 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-07 22:16 emacs exiting sergio
2011-12-08 4:07 ` Alexander
2011-12-08 6:27 ` sergio
2011-12-08 7:20 ` Tassilo Horn
2011-12-08 10:20 ` sergio
2011-12-08 10:24 ` Andreas Röhler
2011-12-08 8:57 ` Eric S Fraga
2011-12-08 16:11 ` Peter Münster
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).