Gnus development mailing list
 help / color / mirror / Atom feed
* bug#8300: save-some-buffers no longer asks user about each one
@ 2011-03-20  5:02 jidanni
  2011-03-20 10:11 ` Deniz Dogan
  0 siblings, 1 reply; 20+ messages in thread
From: jidanni @ 2011-03-20  5:02 UTC (permalink / raw)
  To: 8300; +Cc: ding

X-Debbugs-Cc: ding@gnus.org

Gentlemen,
   C-x s runs the command save-some-buffers, which is an interactive
   compiled Lisp function in `files.el'.

   It is bound to C-x s.

   (save-some-buffers &optional ARG PRED)

   Save some modified file-visiting buffers.  Asks user about each one.
                                              ^^^^^^^^^^^^^^^^^^^^^^^^^
                                              ^^^^^^^^^^^^^^^^^^^^^^^^^

Not any more.
Try it.
You'll see "(Saved .newsrc-dribble)", even before asking.





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

* bug#8300: save-some-buffers no longer asks user about each one
  2011-03-20  5:02 bug#8300: save-some-buffers no longer asks user about each one jidanni
@ 2011-03-20 10:11 ` Deniz Dogan
  2011-03-20 11:09   ` David Engster
  2011-03-20 11:33   ` R. Fourquet
  0 siblings, 2 replies; 20+ messages in thread
From: Deniz Dogan @ 2011-03-20 10:11 UTC (permalink / raw)
  To: jidanni; +Cc: 8300, ding

2011/3/20  <jidanni@jidanni.org>:
> X-Debbugs-Cc: ding@gnus.org
>
> Gentlemen,
>   C-x s runs the command save-some-buffers, which is an interactive
>   compiled Lisp function in `files.el'.
>
>   It is bound to C-x s.
>
>   (save-some-buffers &optional ARG PRED)
>
>   Save some modified file-visiting buffers.  Asks user about each one.
>                                              ^^^^^^^^^^^^^^^^^^^^^^^^^
>                                              ^^^^^^^^^^^^^^^^^^^^^^^^^
>
> Not any more.
> Try it.
> You'll see "(Saved .newsrc-dribble)", even before asking.
>

You're not passing ARG are you?

What version are you using? I cannot reproduce it on:

GNU Emacs 24.0.50.1 (i386-mingw-nt6.1.7600) of 2011-03-07 on 3249CTO

-- 
Deniz Dogan





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

* Re: bug#8300: save-some-buffers no longer asks user about each one
  2011-03-20 10:11 ` Deniz Dogan
@ 2011-03-20 11:09   ` David Engster
  2011-03-20 11:36     ` jidanni
  2011-03-20 11:33   ` R. Fourquet
  1 sibling, 1 reply; 20+ messages in thread
From: David Engster @ 2011-03-20 11:09 UTC (permalink / raw)
  To: Deniz Dogan; +Cc: jidanni, 8300, ding

Deniz Dogan writes:
> 2011/3/20  <jidanni@jidanni.org>:
>> X-Debbugs-Cc: ding@gnus.org
>>
>> Gentlemen,
>>   C-x s runs the command save-some-buffers, which is an interactive
>>   compiled Lisp function in `files.el'.
>>
>>   It is bound to C-x s.
>>
>>   (save-some-buffers &optional ARG PRED)
>>
>>   Save some modified file-visiting buffers.  Asks user about each one.
>>                                              ^^^^^^^^^^^^^^^^^^^^^^^^^
>>                                              ^^^^^^^^^^^^^^^^^^^^^^^^^
>>
>> Not any more.
>> Try it.
>> You'll see "(Saved .newsrc-dribble)", even before asking.
>>
>
> You're not passing ARG are you?
>
> What version are you using? I cannot reproduce it on:

This is because Gnus now sets buffer-save-without-query for the dribble
file. This is desired behavior and hence only a documentation bug. The
doc-string for save-some-buffers should say something like

"Asking can be disabled for a buffer by setting the buffer-local
variable `buffer-save-without-query' to a non-nil value."

-David



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

* bug#8300: save-some-buffers no longer asks user about each one
  2011-03-20 10:11 ` Deniz Dogan
  2011-03-20 11:09   ` David Engster
@ 2011-03-20 11:33   ` R. Fourquet
  2011-03-20 11:44     ` jidanni
  1 sibling, 1 reply; 20+ messages in thread
From: R. Fourquet @ 2011-03-20 11:33 UTC (permalink / raw)
  To: Deniz Dogan; +Cc: 8300, ding, jidanni

Deniz Dogan <deniz.a.m.dogan@gmail.com> writes:

>> Not any more.
>> Try it.
>> You'll see "(Saved .newsrc-dribble)", even before asking.
>
> You're not passing ARG are you?
>
> What version are you using? I cannot reproduce it on:
>
> GNU Emacs 24.0.50.1 (i386-mingw-nt6.1.7600) of 2011-03-07 on 3249CTO

I can (partially) reproduce on the same version: save-some-buffers will
automatically save ".newsrc-dribble" if needed. But with my other
buffers, the behavior is as usual. So we can see the message "(Saved
.newsrc-dribble)" in the echo area only if there is no other buffer to
save (but it is always recorded in the *Message* buffer).





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

* Re: bug#8300: save-some-buffers no longer asks user about each one
  2011-03-20 11:09   ` David Engster
@ 2011-03-20 11:36     ` jidanni
  0 siblings, 0 replies; 20+ messages in thread
From: jidanni @ 2011-03-20 11:36 UTC (permalink / raw)
  To: deniz.a.m.dogan; +Cc: 8300, ding

Glad this was tracked down.

Too bad there is no longer such an easy way to find out what buffers are
not saved yet without saving them just by asking.

The other ways to find out are much harder.

> What version are you using?
Ha ha ha very funny. We are all using the same version number
emacs-version "24.0.50.1" for years because it is stuck.



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

* Re: bug#8300: save-some-buffers no longer asks user about each one
  2011-03-20 11:33   ` R. Fourquet
@ 2011-03-20 11:44     ` jidanni
  2011-03-20 11:59       ` David Engster
  0 siblings, 1 reply; 20+ messages in thread
From: jidanni @ 2011-03-20 11:44 UTC (permalink / raw)
  To: fourquet.d; +Cc: deniz.a.m.dogan, 8300, ding

I think the documentation should stay put.
It is only some kiddie MicroSoft system that insists it is smarter than
you and saves things just because you ask. What if the cops sent a car
just because you called 911 and even before they asked what the problem was.



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

* Re: bug#8300: save-some-buffers no longer asks user about each one
  2011-03-20 11:44     ` jidanni
@ 2011-03-20 11:59       ` David Engster
  2011-03-20 12:16         ` jidanni
  0 siblings, 1 reply; 20+ messages in thread
From: David Engster @ 2011-03-20 11:59 UTC (permalink / raw)
  To: jidanni; +Cc: fourquet.d, deniz.a.m.dogan, 8300, ding

'jidanni' writes:
> I think the documentation should stay put.
> It is only some kiddie MicroSoft system that insists it is smarter than
> you and saves things just because you ask. What if the cops sent a car
> just because you called 911 and even before they asked what the problem was.

save-some-buffers gets called a lot when you use packages which call
external tools (like AucTeX, compile, magit, etc.), and people were
annoyed to get asked every time if the dribble file should be saved, so
in the end Lars decided to set buffer-save-without-query. I think this
is a very minor issue (and hence perfect for bikeshedding, strange
analogies and MS bashing).

-David



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

* Re: bug#8300: save-some-buffers no longer asks user about each one
  2011-03-20 11:59       ` David Engster
@ 2011-03-20 12:16         ` jidanni
  2011-03-20 12:45           ` David Engster
  2011-03-29 18:33           ` Lars Magne Ingebrigtsen
  0 siblings, 2 replies; 20+ messages in thread
From: jidanni @ 2011-03-20 12:16 UTC (permalink / raw)
  To: fourquet.d; +Cc: deniz.a.m.dogan, 8300, ding

OK fine. Better get used to
  Gnus auto-save file exists.  Do you want to read it? (y or n)  y
often the next time you start emacs. Because there is nothing left to
remind you you haven't closed gnus properly last session.



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

* Re: bug#8300: save-some-buffers no longer asks user about each one
  2011-03-20 12:16         ` jidanni
@ 2011-03-20 12:45           ` David Engster
  2011-03-29 18:33           ` Lars Magne Ingebrigtsen
  1 sibling, 0 replies; 20+ messages in thread
From: David Engster @ 2011-03-20 12:45 UTC (permalink / raw)
  To: jidanni; +Cc: fourquet.d, deniz.a.m.dogan, 8300, ding

'jidanni' writes:
> OK fine. Better get used to
>   Gnus auto-save file exists.  Do you want to read it? (y or n)  y
> often the next time you start emacs. Because there is nothing left to
> remind you you haven't closed gnus properly last session.

(add-hook 'kill-emacs-hook
	  (lambda ()
	    (when (gnus-alive-p)
	      (unless (y-or-n-p "Gnus still running! Really quit?")
		(error "User aborted kill-emacs. Quit Gnus and exit again.")))))

Although using this implies that Emacs thinks it's smarter than
you... ;-)

-David



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

* Re: bug#8300: save-some-buffers no longer asks user about each one
  2011-03-20 12:16         ` jidanni
  2011-03-20 12:45           ` David Engster
@ 2011-03-29 18:33           ` Lars Magne Ingebrigtsen
  2011-03-29 18:37             ` Robert Pluim
  1 sibling, 1 reply; 20+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-03-29 18:33 UTC (permalink / raw)
  To: ding

jidanni@jidanni.org writes:

> OK fine. Better get used to
>   Gnus auto-save file exists.  Do you want to read it? (y or n)  y
> often the next time you start emacs.

Yes, perhaps Gnus should just read it automatically without prompting?

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




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

* Re: bug#8300: save-some-buffers no longer asks user about each one
  2011-03-29 18:33           ` Lars Magne Ingebrigtsen
@ 2011-03-29 18:37             ` Robert Pluim
  2011-03-29 18:41               ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 20+ messages in thread
From: Robert Pluim @ 2011-03-29 18:37 UTC (permalink / raw)
  To: ding

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> jidanni@jidanni.org writes:
>
>> OK fine. Better get used to
>>   Gnus auto-save file exists.  Do you want to read it? (y or n)  y
>> often the next time you start emacs.
>
> Yes, perhaps Gnus should just read it automatically without prompting?

No. Sometimes I fat-finger something and 'Q' out of gnus deliberately,
and then I definitely want to say 'n' to that question.

Robert




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

* Re: bug#8300: save-some-buffers no longer asks user about each one
  2011-03-29 18:37             ` Robert Pluim
@ 2011-03-29 18:41               ` Lars Magne Ingebrigtsen
  2011-03-30 11:30                 ` Dave Goldberg
  0 siblings, 1 reply; 20+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-03-29 18:41 UTC (permalink / raw)
  To: ding

Robert Pluim <rpluim@gmail.com> writes:

> No. Sometimes I fat-finger something and 'Q' out of gnus deliberately,
> and then I definitely want to say 'n' to that question.

`Q' would still ask the question, of course.  :-)

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




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

* Re: bug#8300: save-some-buffers no longer asks user about each one
  2011-03-29 18:41               ` Lars Magne Ingebrigtsen
@ 2011-03-30 11:30                 ` Dave Goldberg
  2011-03-30 18:12                   ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 20+ messages in thread
From: Dave Goldberg @ 2011-03-30 11:30 UTC (permalink / raw)
  To: ding


> Robert Pluim <rpluim@gmail.com> writes:
>> No. Sometimes I fat-finger something and 'Q' out of gnus deliberately,
>> and then I definitely want to say 'n' to that question.

> `Q' would still ask the question, of course.  :-)

You mean Q will allow me to eliminate the dribble file entirely?  As of yesterday it didn't do that and yesterday I needed to undo a whole bunch of bad typing that lost nearly all the marks in one of my groups.  I did a Q which did not prompt me for anything, and then n to the question about reading the dribble file.  Which brought my marks back at the slight cost of a few read messages being unread once again.

-- 
Dave Goldberg
david.goldberg6@verizon.net



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

* Re: bug#8300: save-some-buffers no longer asks user about each one
  2011-03-30 11:30                 ` Dave Goldberg
@ 2011-03-30 18:12                   ` Lars Magne Ingebrigtsen
  2011-03-31  4:40                     ` Robert Pluim
  0 siblings, 1 reply; 20+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-03-30 18:12 UTC (permalink / raw)
  To: ding

david.goldberg6@verizon.net (Dave Goldberg) writes:

> You mean Q will allow me to eliminate the dribble file entirely?

No.  When you say `Q', the dribble file records that you did so, and
asks you a different query than what you would get from just quitting
Emacs.

I'm proposing to auto-read the dribble file if you didn't do `Q'.  And
keep the prompt if you did do `Q'.

Doo bee doo bee doo.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




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

* Re: bug#8300: save-some-buffers no longer asks user about each one
  2011-03-30 18:12                   ` Lars Magne Ingebrigtsen
@ 2011-03-31  4:40                     ` Robert Pluim
  2011-04-01  4:41                       ` jidanni
  0 siblings, 1 reply; 20+ messages in thread
From: Robert Pluim @ 2011-03-31  4:40 UTC (permalink / raw)
  To: ding

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> david.goldberg6@verizon.net (Dave Goldberg) writes:
>
>> You mean Q will allow me to eliminate the dribble file entirely?
>
> No.  When you say `Q', the dribble file records that you did so, and
> asks you a different query than what you would get from just quitting
> Emacs.
>
> I'm proposing to auto-read the dribble file if you didn't do `Q'.  And
> keep the prompt if you did do `Q'.
>
> Doo bee doo bee doo.

Anna Suzanna.

Ahem. This sounds fine to me.

Robert




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

* Re: bug#8300: save-some-buffers no longer asks user about each one
  2011-03-31  4:40                     ` Robert Pluim
@ 2011-04-01  4:41                       ` jidanni
  2011-04-01 21:46                         ` Russ Allbery
  0 siblings, 1 reply; 20+ messages in thread
From: jidanni @ 2011-04-01  4:41 UTC (permalink / raw)
  To: ding

Lards> I'm proposing to auto-read the dribble file if

That you found a dribble file means the user did not quit out properly.

Any auto reading will deny the user of his last chance to stop data loss.



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

* Re: bug#8300: save-some-buffers no longer asks user about each one
  2011-04-01  4:41                       ` jidanni
@ 2011-04-01 21:46                         ` Russ Allbery
  2011-04-02 21:39                           ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 20+ messages in thread
From: Russ Allbery @ 2011-04-01 21:46 UTC (permalink / raw)
  To: ding

jidanni@jidanni.org writes:

> Lards> I'm proposing to auto-read the dribble file if

> That you found a dribble file means the user did not quit out properly.

> Any auto reading will deny the user of his last chance to stop data
> loss.

Yeah, I'm kind of leery of this too.

The most common case for me for wanting to ignore the dribble file is
because something has gone horribly wrong (I've done something that I
didn't intend to do in some bad way), and at that point I often end up
killing Emacs.  Sometimes whatever I was doing blocks so that it's not
easy to get to a point where I can do Q.

The most common case for me getting this prompt is when I accidentally
have two copies of Gnus running (usually because I start one remotely from
some other location without realizing that I already had one running
locally), in which case I want the prompt because it lets me go kill the
other one before I tell the new one to read the dribble file and proceed.

I can manually delete the dribble file in that case, but I've always liked
having the prompt.  It's an opportunity to stop and think about why
there's a dribble file.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>



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

* Re: bug#8300: save-some-buffers no longer asks user about each one
  2011-04-01 21:46                         ` Russ Allbery
@ 2011-04-02 21:39                           ` Lars Magne Ingebrigtsen
  2011-04-04 13:45                             ` Ted Zlatanov
  0 siblings, 1 reply; 20+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-04-02 21:39 UTC (permalink / raw)
  To: ding

Russ Allbery <rra@stanford.edu> writes:

> I can manually delete the dribble file in that case, but I've always liked
> having the prompt.  It's an opportunity to stop and think about why
> there's a dribble file.

That's a good point.

I do like the new save-some-buffers behaviour -- getting prompted for
irrelevant buffers is just annoying when trying to compile stuff.  But
since exiting Emacs runs the same function, and we kinda do want to be
prompted on Emacs exit (I think), then we're in kind of a bind.

Overall, I think the new behaviour is an improvement.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




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

* Re: bug#8300: save-some-buffers no longer asks user about each one
  2011-04-02 21:39                           ` Lars Magne Ingebrigtsen
@ 2011-04-04 13:45                             ` Ted Zlatanov
  2011-04-12 16:24                               ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 20+ messages in thread
From: Ted Zlatanov @ 2011-04-04 13:45 UTC (permalink / raw)
  To: ding

On Sat, 02 Apr 2011 23:39:42 +0200 Lars Magne Ingebrigtsen <larsi@gnus.org> wrote: 

LMI> Russ Allbery <rra@stanford.edu> writes:
>> I can manually delete the dribble file in that case, but I've always liked
>> having the prompt.  It's an opportunity to stop and think about why
>> there's a dribble file.

LMI> That's a good point.

LMI> I do like the new save-some-buffers behaviour -- getting prompted for
LMI> irrelevant buffers is just annoying when trying to compile stuff.  But
LMI> since exiting Emacs runs the same function, and we kinda do want to be
LMI> prompted on Emacs exit (I think), then we're in kind of a bind.

LMI> Overall, I think the new behaviour is an improvement.

So maybe exiting Emacs should not run the exact same code the same way?

Maybe an `emacs-is-exiting' global flag could be set?

Ted




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

* Re: bug#8300: save-some-buffers no longer asks user about each one
  2011-04-04 13:45                             ` Ted Zlatanov
@ 2011-04-12 16:24                               ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 20+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-04-12 16:24 UTC (permalink / raw)
  To: ding

Ted Zlatanov <tzz@lifelogs.com> writes:

> Maybe an `emacs-is-exiting' global flag could be set?

Yes, that might help, but I'm not quite sure what the implications would
be.  I mean, here we have an option that one user would want to be
dont-ask-before-saving-unless-we-exiting-and-then-I-want-to-be-prompted-anyway.
I suspect that the user would be better off just adding one of the many
little snippets already suggested to the Emacs exit hook instead.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




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

end of thread, other threads:[~2011-04-12 16:24 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-20  5:02 bug#8300: save-some-buffers no longer asks user about each one jidanni
2011-03-20 10:11 ` Deniz Dogan
2011-03-20 11:09   ` David Engster
2011-03-20 11:36     ` jidanni
2011-03-20 11:33   ` R. Fourquet
2011-03-20 11:44     ` jidanni
2011-03-20 11:59       ` David Engster
2011-03-20 12:16         ` jidanni
2011-03-20 12:45           ` David Engster
2011-03-29 18:33           ` Lars Magne Ingebrigtsen
2011-03-29 18:37             ` Robert Pluim
2011-03-29 18:41               ` Lars Magne Ingebrigtsen
2011-03-30 11:30                 ` Dave Goldberg
2011-03-30 18:12                   ` Lars Magne Ingebrigtsen
2011-03-31  4:40                     ` Robert Pluim
2011-04-01  4:41                       ` jidanni
2011-04-01 21:46                         ` Russ Allbery
2011-04-02 21:39                           ` Lars Magne Ingebrigtsen
2011-04-04 13:45                             ` Ted Zlatanov
2011-04-12 16:24                               ` Lars Magne Ingebrigtsen

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 NNTP newsgroup(s).