unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: master cd0a795: Output number of characters added to file (Bug#354)
       [not found] ` <20170407022531.17D812084C@vcs0.savannah.gnu.org>
@ 2017-04-07  3:30   ` Mark Oteiza
  2017-04-07  7:14     ` Eli Zaretskii
  2017-04-07 12:06     ` Noam Postavsky
  2017-04-07 13:42   ` Michael Albinus
  2017-04-07 16:48   ` Glenn Morris
  2 siblings, 2 replies; 15+ messages in thread
From: Mark Oteiza @ 2017-04-07  3:30 UTC (permalink / raw)
  To: emacs-devel; +Cc: Jeff Clough, Noam Postavsky

npostavs@gmail.com (Noam Postavsky) writes:

> branch: master
> commit cd0a7951fb762570c4b9c2cdbb43c94cb68910d4
> Author: Jeff Clough <kb1vqh@gmail.com>
> Commit: Noam Postavsky <npostavs@gmail.com>
>
>     Output number of characters added to file (Bug#354)
>     
>     * fileio.c (write_region):
>     * epa-file.el (epa-file-write-region):
>     * jka-compr.el (jka-compr-write-region):
>     * ange-ftp.el (ange-ftp-write-region):
>     * tramp-gvfs.el (tramp-gvfs-handle-write-region):
>     * tramp-sh.el (tramp-sh-handle-write-region):
>     * mm-util.el (mm-append-to-file): Functions now output
>     characters written in addition to file name.
>     * files.texi: Added documentation to write-region and
>     append-to-file describing their output.

This behavior is unnecessarily verbose, at least when just interactively
saving buffers.  Haven't tested this otherwise.  If I cared about the
number of characters in the buffer I'd look in the mode line or just do
C-x =.

I can't say I've ever been surprised as described in the original
report.



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

* Re: master cd0a795: Output number of characters added to file (Bug#354)
  2017-04-07  3:30   ` master cd0a795: Output number of characters added to file (Bug#354) Mark Oteiza
@ 2017-04-07  7:14     ` Eli Zaretskii
  2017-04-07 22:50       ` Paul Eggert
  2017-04-08  0:16       ` Mark Oteiza
  2017-04-07 12:06     ` Noam Postavsky
  1 sibling, 2 replies; 15+ messages in thread
From: Eli Zaretskii @ 2017-04-07  7:14 UTC (permalink / raw)
  To: Mark Oteiza; +Cc: kb1vqh, npostavs, emacs-devel

> From: Mark Oteiza <mvoteiza@udel.edu>
> Date: Thu, 06 Apr 2017 23:30:41 -0400
> Cc: Jeff Clough <kb1vqh@gmail.com>, Noam Postavsky <npostavs@gmail.com>
> 
> >     Output number of characters added to file (Bug#354)
> >     
> >     * fileio.c (write_region):
> >     * epa-file.el (epa-file-write-region):
> >     * jka-compr.el (jka-compr-write-region):
> >     * ange-ftp.el (ange-ftp-write-region):
> >     * tramp-gvfs.el (tramp-gvfs-handle-write-region):
> >     * tramp-sh.el (tramp-sh-handle-write-region):
> >     * mm-util.el (mm-append-to-file): Functions now output
> >     characters written in addition to file name.
> >     * files.texi: Added documentation to write-region and
> >     append-to-file describing their output.
> 
> This behavior is unnecessarily verbose, at least when just interactively
> saving buffers.  Haven't tested this otherwise.  If I cared about the
> number of characters in the buffer I'd look in the mode line or just do
> C-x =.
> 
> I can't say I've ever been surprised as described in the original
> report.

Thanks for the comments.  Would making this an optional feature take
care of your concerns?

P.S. In the future, it might be better to voice such objections while
the patch is being discussed, to avoid unnecessary reworking and
possible frustration caused by that.  TIA.



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

* Re: master cd0a795: Output number of characters added to file (Bug#354)
  2017-04-07  3:30   ` master cd0a795: Output number of characters added to file (Bug#354) Mark Oteiza
  2017-04-07  7:14     ` Eli Zaretskii
@ 2017-04-07 12:06     ` Noam Postavsky
  2017-04-08  0:17       ` Mark Oteiza
  2017-04-09 20:03       ` Mark Oteiza
  1 sibling, 2 replies; 15+ messages in thread
From: Noam Postavsky @ 2017-04-07 12:06 UTC (permalink / raw)
  To: Mark Oteiza; +Cc: Jeff Clough, Emacs developers

On Thu, Apr 6, 2017 at 11:30 PM, Mark Oteiza <mvoteiza@udel.edu> wrote:
>>
>>     Output number of characters added to file (Bug#354)
>
> This behavior is unnecessarily verbose, at least when just interactively
> saving buffers.  Haven't tested this otherwise.  If I cared about the
> number of characters in the buffer I'd look in the mode line or just do
> C-x =.

Would it help if we rearranged the message so that the number of
characters go at the end? Something like:

Wrote /foo/bar/blah (1314 characters)



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

* Re: master cd0a795: Output number of characters added to file (Bug#354)
       [not found] ` <20170407022531.17D812084C@vcs0.savannah.gnu.org>
  2017-04-07  3:30   ` master cd0a795: Output number of characters added to file (Bug#354) Mark Oteiza
@ 2017-04-07 13:42   ` Michael Albinus
  2017-04-07 22:27     ` Noam Postavsky
  2017-04-07 16:48   ` Glenn Morris
  2 siblings, 1 reply; 15+ messages in thread
From: Michael Albinus @ 2017-04-07 13:42 UTC (permalink / raw)
  To: emacs-devel; +Cc: Jeff Clough

npostavs@gmail.com (Noam Postavsky) writes:

> diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
> index 9977162..f78f541 100644
> --- a/lisp/net/tramp-sh.el
> +++ b/lisp/net/tramp-sh.el
> @@ -3411,7 +3411,8 @@ the result will be a local, non-Tramp, file name."
>          (when need-chown
>            (tramp-set-file-uid-gid filename uid gid))
>  	(when (or (eq visit t) (null visit) (stringp visit))
> -	  (tramp-message v 0 "Wrote %s" filename))
> +          (tramp-message v 0 "Wrote %d characters to `%s'"
> +                         (- end start) filename))

This breaks Tramp tests. In `write-region', START could be also nil or a
string.

Likely, the other changes suffer from the same problem.

Best regards, Michael.



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

* Re: master cd0a795: Output number of characters added to file (Bug#354)
       [not found] ` <20170407022531.17D812084C@vcs0.savannah.gnu.org>
  2017-04-07  3:30   ` master cd0a795: Output number of characters added to file (Bug#354) Mark Oteiza
  2017-04-07 13:42   ` Michael Albinus
@ 2017-04-07 16:48   ` Glenn Morris
  2017-04-07 21:41     ` Glenn Morris
  2 siblings, 1 reply; 15+ messages in thread
From: Glenn Morris @ 2017-04-07 16:48 UTC (permalink / raw)
  To: emacs-devel; +Cc: Jeff Clough, npostavs


> branch: master
> commit cd0a7951fb762570c4b9c2cdbb43c94cb68910d4
> Author: Jeff Clough <kb1vqh@gmail.com>
> Commit: Noam Postavsky <npostavs@gmail.com>
>
>     Output number of characters added to file (Bug#354)

This change causes files-test-bug-18141 to fail.

Eg http://hydra.nixos.org/build/51309278




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

* Re: master cd0a795: Output number of characters added to file (Bug#354)
  2017-04-07 16:48   ` Glenn Morris
@ 2017-04-07 21:41     ` Glenn Morris
  0 siblings, 0 replies; 15+ messages in thread
From: Glenn Morris @ 2017-04-07 21:41 UTC (permalink / raw)
  To: emacs-devel; +Cc: Jeff Clough, npostavs


PS you can see the same problem simply by trying to save any compressed file.



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

* Re: master cd0a795: Output number of characters added to file (Bug#354)
  2017-04-07 13:42   ` Michael Albinus
@ 2017-04-07 22:27     ` Noam Postavsky
  0 siblings, 0 replies; 15+ messages in thread
From: Noam Postavsky @ 2017-04-07 22:27 UTC (permalink / raw)
  To: Michael Albinus; +Cc: Jeff Clough, Emacs developers

On Fri, Apr 7, 2017 at 9:42 AM, Michael Albinus <michael.albinus@gmx.de> wrote:
>> -       (tramp-message v 0 "Wrote %s" filename))
>> +          (tramp-message v 0 "Wrote %d characters to `%s'"
>> +                         (- end start) filename))
>
> This breaks Tramp tests. In `write-region', START could be also nil or a
> string.
>
> Likely, the other changes suffer from the same problem.

Yup, as noted by Glenn, it breaks the compressed file handler too,
fixed in [1: 9e27e0d1a6].

1: 2017-04-07 18:24:35 -0400 9e27e0d1a6c90d0d29e41884155245b6c3378b0a
  Fix handling of non-integer START param to write-region



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

* Re: master cd0a795: Output number of characters added to file (Bug#354)
  2017-04-07  7:14     ` Eli Zaretskii
@ 2017-04-07 22:50       ` Paul Eggert
  2017-04-07 23:02         ` Kaushal Modi
  2017-04-08  0:16       ` Mark Oteiza
  1 sibling, 1 reply; 15+ messages in thread
From: Paul Eggert @ 2017-04-07 22:50 UTC (permalink / raw)
  To: emacs-devel

On 04/07/2017 12:14 AM, Eli Zaretskii wrote:
> P.S. In the future, it might be better to voice such objections while
> the patch is being discussed,

All true. Still, I didn't realize how annoying the new behavior would be 
until I started using it. Formerly, when I typed C-x C-s I would 
typically get a little message in the echo area that I could ignore. Now 
the extra length often causes the message to take more than one line, 
which causes the lowest mode line to do a little dance to get out of the 
way so that the echo area can temporarily take two lines, and this is 
quite irritating.

So, having tried it, I would rather not see these character counts and 
would rather have the default be the way things were.




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

* Re: master cd0a795: Output number of characters added to file (Bug#354)
  2017-04-07 22:50       ` Paul Eggert
@ 2017-04-07 23:02         ` Kaushal Modi
  2017-04-08  0:13           ` Noam Postavsky
  0 siblings, 1 reply; 15+ messages in thread
From: Kaushal Modi @ 2017-04-07 23:02 UTC (permalink / raw)
  To: Paul Eggert, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1026 bytes --]

On Fri, Apr 7, 2017 at 6:50 PM Paul Eggert <eggert@cs.ucla.edu> wrote:

> On 04/07/2017 12:14 AM, Eli Zaretskii wrote:
> > P.S. In the future, it might be better to voice such objections while
> > the patch is being discussed,
>
> All true. Still, I didn't realize how annoying the new behavior would be
> until I started using it. Formerly, when I typed C-x C-s I would
> typically get a little message in the echo area that I could ignore. Now
> the extra length often causes the message to take more than one line,
> which causes the lowest mode line to do a little dance to get out of the
> way so that the echo area can temporarily take two lines, and this is
> quite irritating.
>
> So, having tried it, I would rather not see these character counts and
> would rather have the default be the way things were.
>

+1! Please make this an option, defaulting to the prior state (disabled).

I never have wondered how many characters actually got written.. It just
creates a random noise in the echo area.
-- 

Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 1701 bytes --]

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

* Re: master cd0a795: Output number of characters added to file (Bug#354)
  2017-04-07 23:02         ` Kaushal Modi
@ 2017-04-08  0:13           ` Noam Postavsky
  0 siblings, 0 replies; 15+ messages in thread
From: Noam Postavsky @ 2017-04-08  0:13 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: Paul Eggert, Emacs developers

On Fri, Apr 7, 2017 at 7:02 PM, Kaushal Modi <kaushal.modi@gmail.com> wrote:
> On Fri, Apr 7, 2017 at 6:50 PM Paul Eggert <eggert@cs.ucla.edu> wrote:
>>
>> On 04/07/2017 12:14 AM, Eli Zaretskii wrote:
>> > P.S. In the future, it might be better to voice such objections while
>> > the patch is being discussed,
>>
>> All true. Still, I didn't realize how annoying the new behavior would be
>> until I started using it. Formerly, when I typed C-x C-s I would
>> typically get a little message in the echo area that I could ignore. Now
>> the extra length often causes the message to take more than one line,
>> which causes the lowest mode line to do a little dance to get out of the
>> way so that the echo area can temporarily take two lines, and this is
>> quite irritating.
>>
>> So, having tried it, I would rather not see these character counts and
>> would rather have the default be the way things were.
>
>
> +1! Please make this an option, defaulting to the prior state (disabled).
>
> I never have wondered how many characters actually got written.. It just
> creates a random noise in the echo area.

Yeah, after trying it out more, I do find it more disruptive than I
expected. I think part of it is because it puts the character count at
the beginning of the message where we've gotten used to seeing the
file name. I've changed it around in [1: c323659344], if it's still
too annoying I'll look at adding an option.

1: 2017-04-07 19:54:11 -0400 c323659344ba4db7a0b074b2e29d0a5f33d5eb80
  Adjust write-region so file name is at the beginning again



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

* Re: master cd0a795: Output number of characters added to file (Bug#354)
  2017-04-07  7:14     ` Eli Zaretskii
  2017-04-07 22:50       ` Paul Eggert
@ 2017-04-08  0:16       ` Mark Oteiza
  1 sibling, 0 replies; 15+ messages in thread
From: Mark Oteiza @ 2017-04-08  0:16 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: kb1vqh, npostavs, emacs-devel

On 07/04/17 at 10:14am, Eli Zaretskii wrote:
> > From: Mark Oteiza <mvoteiza@udel.edu>
> > Date: Thu, 06 Apr 2017 23:30:41 -0400
> > Cc: Jeff Clough <kb1vqh@gmail.com>, Noam Postavsky <npostavs@gmail.com>
> > 
> > >     Output number of characters added to file (Bug#354)
> > >     
> > >     * fileio.c (write_region):
> > >     * epa-file.el (epa-file-write-region):
> > >     * jka-compr.el (jka-compr-write-region):
> > >     * ange-ftp.el (ange-ftp-write-region):
> > >     * tramp-gvfs.el (tramp-gvfs-handle-write-region):
> > >     * tramp-sh.el (tramp-sh-handle-write-region):
> > >     * mm-util.el (mm-append-to-file): Functions now output
> > >     characters written in addition to file name.
> > >     * files.texi: Added documentation to write-region and
> > >     append-to-file describing their output.
> > 
> > This behavior is unnecessarily verbose, at least when just interactively
> > saving buffers.  Haven't tested this otherwise.  If I cared about the
> > number of characters in the buffer I'd look in the mode line or just do
> > C-x =.
> > 
> > I can't say I've ever been surprised as described in the original
> > report.
> 
> Thanks for the comments.  Would making this an optional feature take
> care of your concerns?

Indeed it would, and IMO it should default to disabled.

> P.S. In the future, it might be better to voice such objections while
> the patch is being discussed, to avoid unnecessary reworking and
> possible frustration caused by that.  TIA.

Of course; however, this only grabbed my attention seeing it after
rebuilding.



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

* Re: master cd0a795: Output number of characters added to file (Bug#354)
  2017-04-07 12:06     ` Noam Postavsky
@ 2017-04-08  0:17       ` Mark Oteiza
  2017-04-08  7:34         ` Eli Zaretskii
  2017-04-09 20:03       ` Mark Oteiza
  1 sibling, 1 reply; 15+ messages in thread
From: Mark Oteiza @ 2017-04-08  0:17 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: Jeff Clough, Emacs developers

On 07/04/17 at 08:06am, Noam Postavsky wrote:
> On Thu, Apr 6, 2017 at 11:30 PM, Mark Oteiza <mvoteiza@udel.edu> wrote:
> >>
> >>     Output number of characters added to file (Bug#354)
> >
> > This behavior is unnecessarily verbose, at least when just interactively
> > saving buffers.  Haven't tested this otherwise.  If I cared about the
> > number of characters in the buffer I'd look in the mode line or just do
> > C-x =.
> 
> Would it help if we rearranged the message so that the number of
> characters go at the end? Something like:
> 
> Wrote /foo/bar/blah (1314 characters)

I still don't understand the purpose of this change, as I've never been
troubled by not knowing the number of characters written, and the original
report didn't outline a recipe.  So, I'm not sure I can really comment
other than suggesting a revert.



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

* Re: master cd0a795: Output number of characters added to file (Bug#354)
  2017-04-08  0:17       ` Mark Oteiza
@ 2017-04-08  7:34         ` Eli Zaretskii
  2017-04-08 14:08           ` Mark Oteiza
  0 siblings, 1 reply; 15+ messages in thread
From: Eli Zaretskii @ 2017-04-08  7:34 UTC (permalink / raw)
  To: Mark Oteiza; +Cc: kb1vqh, npostavs, emacs-devel

> Date: Fri, 7 Apr 2017 20:17:56 -0400
> From: Mark Oteiza <mvoteiza@udel.edu>
> Cc: Jeff Clough <kb1vqh@gmail.com>, Emacs developers <emacs-devel@gnu.org>
> 
> > Wrote /foo/bar/blah (1314 characters)
> 
> I still don't understand the purpose of this change

Maybe the fact that the vi family of editors show that?  Just
guessing.



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

* Re: master cd0a795: Output number of characters added to file (Bug#354)
  2017-04-08  7:34         ` Eli Zaretskii
@ 2017-04-08 14:08           ` Mark Oteiza
  0 siblings, 0 replies; 15+ messages in thread
From: Mark Oteiza @ 2017-04-08 14:08 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: kb1vqh, npostavs, emacs-devel

On 08/04/17 at 10:34am, Eli Zaretskii wrote:
> > Date: Fri, 7 Apr 2017 20:17:56 -0400
> > From: Mark Oteiza <mvoteiza@udel.edu>
> > Cc: Jeff Clough <kb1vqh@gmail.com>, Emacs developers <emacs-devel@gnu.org>
> > 
> > > Wrote /foo/bar/blah (1314 characters)
> > 
> > I still don't understand the purpose of this change
> 
> Maybe the fact that the vi family of editors show that?  Just
> guessing.

Good idea, though the report talks about some unknown issue with emacs
not writing what's expected.  The only editor where I've paid any
attention to that number is ed.



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

* Re: master cd0a795: Output number of characters added to file (Bug#354)
  2017-04-07 12:06     ` Noam Postavsky
  2017-04-08  0:17       ` Mark Oteiza
@ 2017-04-09 20:03       ` Mark Oteiza
  1 sibling, 0 replies; 15+ messages in thread
From: Mark Oteiza @ 2017-04-09 20:03 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: Jeff Clough, Emacs developers

On 07/04/17 at 08:06am, Noam Postavsky wrote:
> On Thu, Apr 6, 2017 at 11:30 PM, Mark Oteiza <mvoteiza@udel.edu> wrote:
> >>
> >>     Output number of characters added to file (Bug#354)
> >
> > This behavior is unnecessarily verbose, at least when just interactively
> > saving buffers.  Haven't tested this otherwise.  If I cared about the
> > number of characters in the buffer I'd look in the mode line or just do
> > C-x =.
> 
> Would it help if we rearranged the message so that the number of
> characters go at the end? Something like:
> 
> Wrote /foo/bar/blah (1314 characters)

Also, why were quotes added?  More wasted space.



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

end of thread, other threads:[~2017-04-09 20:03 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20170407022529.14820.30445@vcs0.savannah.gnu.org>
     [not found] ` <20170407022531.17D812084C@vcs0.savannah.gnu.org>
2017-04-07  3:30   ` master cd0a795: Output number of characters added to file (Bug#354) Mark Oteiza
2017-04-07  7:14     ` Eli Zaretskii
2017-04-07 22:50       ` Paul Eggert
2017-04-07 23:02         ` Kaushal Modi
2017-04-08  0:13           ` Noam Postavsky
2017-04-08  0:16       ` Mark Oteiza
2017-04-07 12:06     ` Noam Postavsky
2017-04-08  0:17       ` Mark Oteiza
2017-04-08  7:34         ` Eli Zaretskii
2017-04-08 14:08           ` Mark Oteiza
2017-04-09 20:03       ` Mark Oteiza
2017-04-07 13:42   ` Michael Albinus
2017-04-07 22:27     ` Noam Postavsky
2017-04-07 16:48   ` Glenn Morris
2017-04-07 21:41     ` Glenn Morris

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