unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#10345: 24.0.92; `save-buffer' and `basic-save-buffer': add MSG arg
@ 2011-12-21 22:09 Drew Adams
  2012-09-17  0:20 ` Drew Adams
  2016-04-28 11:48 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 5+ messages in thread
From: Drew Adams @ 2011-12-21 22:09 UTC (permalink / raw)
  To: 10345

Please make it possible to call this function without it displaying a
message.  E.g., add an optional MSG argument that is always non-nil
interactively.
 
One motivation:
 
An Emacs function might do a series of things, including calling
`save-buffer'.  Sometimes the whole series could take a while, and a
caller of the function might want to give a specific progress message:
"Foo-barring..." and end with "Foo-barring...done".  When the series of
operations includes `save-buffer' this messaging is interrupted, and the
user sees a message from `save-buffer', with no `...' to indicate that
the overall operation (series) is not finished.
 
In sum, since this function is sometimes called from Lisp, it makes
little sense for it to systematically display a message.  A caller
should be able to control the messaging behavior.
 
Same thing applies for `basic-save-buffer'.  These functions are called
from Lisp.  They deserve optional MSG args to control message display.
(Obviously, this applies only to the use of `message', not also to
reading input or raising errors.)

In GNU Emacs 24.0.92.1 (i386-mingw-nt5.1.2600) of 2011-12-06 on MARVIN
 Windowing system distributor `Microsoft Corp.', version 5.1.2600
 configured using `configure --with-gcc (4.6) --no-opt --cflags
 -ID:/devel/emacs/libs/libXpm-3.5.8/include
 -ID:/devel/emacs/libs/libXpm-3.5.8/src
 -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include
 -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include
 -ID:/devel/emacs/libs/giflib-4.1.4-1/include
 -ID:/devel/emacs/libs/jpeg-6b-4/include
 -ID:/devel/emacs/libs/tiff-3.8.2-1/include
 -ID:/devel/emacs/libs/gnutls-2.10.1/include --ldflags
 -LD:/devel/emacs/libs/gnutls-2.10.1/lib'
 






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

* bug#10345: 24.0.92; `save-buffer' and `basic-save-buffer': add MSG arg
  2011-12-21 22:09 bug#10345: 24.0.92; `save-buffer' and `basic-save-buffer': add MSG arg Drew Adams
@ 2012-09-17  0:20 ` Drew Adams
  2016-04-28 11:48 ` Lars Ingebrigtsen
  1 sibling, 0 replies; 5+ messages in thread
From: Drew Adams @ 2012-09-17  0:20 UTC (permalink / raw)
  To: 10345

ping






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

* bug#10345: 24.0.92; `save-buffer' and `basic-save-buffer': add MSG arg
  2011-12-21 22:09 bug#10345: 24.0.92; `save-buffer' and `basic-save-buffer': add MSG arg Drew Adams
  2012-09-17  0:20 ` Drew Adams
@ 2016-04-28 11:48 ` Lars Ingebrigtsen
  2016-04-28 14:09   ` Drew Adams
  1 sibling, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2016-04-28 11:48 UTC (permalink / raw)
  To: Drew Adams; +Cc: 10345

"Drew Adams" <drew.adams@oracle.com> writes:

> Please make it possible to call this function without it displaying a
> message.  E.g., add an optional MSG argument that is always non-nil
> interactively.
>
> One motivation:
>
> An Emacs function might do a series of things, including calling
> `save-buffer'.  Sometimes the whole series could take a while, and a
> caller of the function might want to give a specific progress message:
> "Foo-barring..." and end with "Foo-barring...done".  When the series of
> operations includes `save-buffer' this messaging is interrupted, and the
> user sees a message from `save-buffer', with no `...' to indicate that
> the overall operation (series) is not finished.
>
> In sum, since this function is sometimes called from Lisp, it makes
> little sense for it to systematically display a message.  A caller
> should be able to control the messaging behavior.
>
> Same thing applies for `basic-save-buffer'.  These functions are called
> from Lisp.  They deserve optional MSG args to control message display.
> (Obviously, this applies only to the use of `message', not also to
> reading input or raising errors.)

If you wish to save buffers without messaging, you use `write-region' or
the like.  `save-buffers' is a very user level function.  Closing.

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





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

* bug#10345: 24.0.92; `save-buffer' and `basic-save-buffer': add MSG arg
  2016-04-28 11:48 ` Lars Ingebrigtsen
@ 2016-04-28 14:09   ` Drew Adams
  2016-04-28 14:15     ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Drew Adams @ 2016-04-28 14:09 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 10345

> If you wish to save buffers without messaging, you use `write-region' or
> the like.  `save-buffers' is a very user level function.  Closing.

No. `write-region' does not do the same thing at all.
And no, `save-buffers' is not only "a very user level function".

As I said:

 > In sum, since this function is sometimes called from Lisp,
 > it makes little sense for it to systematically display a
 > message.  A caller should be able to control the messaging
 > behavior.

Do you deny that this function is sometimes called from Lisp?
If you instead accept that, then why shouldn't a caller of it
be able to control the messaging behavior?

What does it cost Emacs to add an optional MSG argument?





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

* bug#10345: 24.0.92; `save-buffer' and `basic-save-buffer': add MSG arg
  2016-04-28 14:09   ` Drew Adams
@ 2016-04-28 14:15     ` Eli Zaretskii
  0 siblings, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2016-04-28 14:15 UTC (permalink / raw)
  To: Drew Adams; +Cc: larsi, 10345

> Date: Thu, 28 Apr 2016 07:09:26 -0700 (PDT)
> From: Drew Adams <drew.adams@oracle.com>
> Cc: 10345@debbugs.gnu.org
> 
> Do you deny that this function is sometimes called from Lisp?
> If you instead accept that, then why shouldn't a caller of it
> be able to control the messaging behavior?
> 
> What does it cost Emacs to add an optional MSG argument?

Emacs 25 has the inhibit-message variable for this purpose, so I think
this argument is no longer relevant.





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

end of thread, other threads:[~2016-04-28 14:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-21 22:09 bug#10345: 24.0.92; `save-buffer' and `basic-save-buffer': add MSG arg Drew Adams
2012-09-17  0:20 ` Drew Adams
2016-04-28 11:48 ` Lars Ingebrigtsen
2016-04-28 14:09   ` Drew Adams
2016-04-28 14:15     ` Eli Zaretskii

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