GNU bug report logs -
#354
"Added (how many lines, bytes?!) to file.txt"
Previous Next
Reported by: jidanni <at> jidanni.org
Date: Tue, 3 Jun 2008 20:30:07 UTC
Severity: wishlist
Tags: wontfix
Done: npostavs <at> users.sourceforge.net
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: npostavs <at> users.sourceforge.net
> Date: Mon, 13 Mar 2017 20:58:59 -0400
> Cc: 354 <at> debbugs.gnu.org, Paul Eggert <eggert <at> cs.ucla.edu>
>
> Jeff Clough <kb1vqh <at> gmail.com> writes:
>
> > Updated patch at the end of this message.
>
> Looks like this patch was forgotten. It still applies cleanly apart
> from the NEWS and ChangeLog changes, so I'll push to master in a week or
> so if there are no objections.
LGTM, with one comment:
> diff --git a/src/fileio.c b/src/fileio.c
> index acbf76e0d8..bc99ee236c 100644
> --- a/src/fileio.c
> +++ b/src/fileio.c
> @@ -5150,12 +5150,13 @@ write_region (Lisp_Object start, Lisp_Object end, Lisp_Object filename,
> }
>
> if (!auto_saving && !noninteractive)
> - message_with_string ((NUMBERP (append)
> - ? "Updated %s"
> - : ! NILP (append)
> - ? "Added to %s"
> - : "Wrote %s"),
> - visit_file, 1);
> + message ((NUMBERP (append)
> + ? "Updated %"pI"d characters of %s"
> + : ! NILP (append)
> + ? "Added %"pI"d characters to %s"
> + : "Wrote %"pI"d characters to %s"),
> + XINT (end) - XINT (start),
> + SDATA (ENCODE_SYSTEM (visit_file)));
It is incorrect to use ENCODE_SYSTEM here: the file name should be
output with no changes. That's because 'message' normally displays in
the echo area, where the file name should appear unencoded. What is
needed here is to pass to 'message' an encoded file name in
non-interactive case, and the original one in the interactive case.
This bug report was last modified 8 years and 12 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.