GNU bug report logs - #73763
31.0.50; [PATCH] Remove unnecessary trailing white space from SRC revision number

Previous Next

Package: emacs;

Reported by: Alex Bochannek <alex <at> bochannek.com>

Date: Sat, 12 Oct 2024 04:25:01 UTC

Severity: minor

Tags: patch

Found in version 31.0.50

Done: Sean Whitton <spwhitton <at> spwhitton.name>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 73763 in the body.
You can then email your comments to 73763 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#73763; Package emacs. (Sat, 12 Oct 2024 04:25:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alex Bochannek <alex <at> bochannek.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 12 Oct 2024 04:25:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Alex Bochannek <alex <at> bochannek.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 31.0.50; [PATCH] Remove unnecessary trailing white space from SRC
 revision number
Date: Fri, 11 Oct 2024 20:45:53 -0700
[Message part 1 (text/plain, inline)]
Hello!

I am using the SRC back end to VC and noticed `^J' after the revision
number in the mode line. This appears to be due to the way the output of
the `src list' command is converted to a string, which keeps the
newline.

The following patch has been tested under macOS Sequoia 15.0.1 and
should be equally applicable to other platforms.

[0001-Remove-unnecessary-trailing-white-space-from-SRC-rev.patch (text/x-patch, inline)]
From 37d0c418b633f588c8162704630e422afecbf5df Mon Sep 17 00:00:00 2001
From: Alex Bochannek <awb <at> awb-mbp-m3.local>
Date: Fri, 11 Oct 2024 20:32:41 -0700
Subject: [PATCH] Remove unnecessary trailing white space from SRC revision
 number

---
 lisp/vc/vc-src.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/vc/vc-src.el b/lisp/vc/vc-src.el
index 27f58cb3369..ff19b0f7696 100644
--- a/lisp/vc/vc-src.el
+++ b/lisp/vc/vc-src.el
@@ -222,8 +222,9 @@ vc-src-command
 (defun vc-src-working-revision (file)
   "SRC-specific version of `vc-working-revision'."
   (let ((result (ignore-errors
-		  (with-output-to-string
-		    (vc-src-command standard-output file "list" "-f{1}" "@")))))
+                  (string-trim-right
+                   (with-output-to-string
+                     (vc-src-command standard-output file "list" "-f{1}" "@"))))))
     (if (zerop (length result)) "0" result)))
 
 ;;;
-- 
2.39.5 (Apple Git-154)

[Message part 3 (text/plain, inline)]
-- 
Alex.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73763; Package emacs. (Sat, 12 Oct 2024 13:10:02 GMT) Full text and rfc822 format available.

Message #8 received at 73763 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Alex Bochannek <alex <at> bochannek.com>, Dmitry Gutov <dmitry <at> gutov.dev>
Cc: 73763 <at> debbugs.gnu.org
Subject: Re: bug#73763: 31.0.50;
 [PATCH] Remove unnecessary trailing white space from SRC revision
 number
Date: Sat, 12 Oct 2024 15:40:55 +0300
> From: Alex Bochannek <alex <at> bochannek.com>
> Date: Fri, 11 Oct 2024 20:45:53 -0700
> 
> I am using the SRC back end to VC and noticed `^J' after the revision
> number in the mode line. This appears to be due to the way the output of
> the `src list' command is converted to a string, which keeps the
> newline.
> 
> The following patch has been tested under macOS Sequoia 15.0.1 and
> should be equally applicable to other platforms.

Looks correct to me.

Dmitry?




Severity set to 'minor' from 'normal' Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Sat, 12 Oct 2024 13:41:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73763; Package emacs. (Sat, 12 Oct 2024 17:24:03 GMT) Full text and rfc822 format available.

Message #13 received at 73763 <at> debbugs.gnu.org (full text, mbox):

From: "Dmitry Gutov" <dmitry <at> gutov.dev>
To: "Eli Zaretskii" <eliz <at> gnu.org>, "Alex Bochannek" <alex <at> bochannek.com>
Cc: 73763 <at> debbugs.gnu.org
Subject: Re: bug#73763: 31.0.50;
 [PATCH] Remove unnecessary trailing white space from
 SRC revision number
Date: Sat, 12 Oct 2024 19:22:39 +0200
[Message part 1 (text/plain, inline)]
On Sat, Oct 12, 2024, at 2:40 PM, Eli Zaretskii wrote:
> > From: Alex Bochannek <alex <at> bochannek.com>
> > Date: Fri, 11 Oct 2024 20:45:53 -0700
> > 
> > I am using the SRC back end to VC and noticed `^J' after the revision
> > number in the mode line. This appears to be due to the way the output of
> > the `src list' command is converted to a string, which keeps the
> > newline.
> > 
> > The following patch has been tested under macOS Sequoia 15.0.1 and
> > should be equally applicable to other platforms.
> 
> Looks correct to me.
> 
> Dmitry?
Looks reasonable to me too, though as discussed, it might be better to ping Sean.

If the patch is already tested on a live program, great. Note that it has a .local email.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73763; Package emacs. (Sat, 12 Oct 2024 18:41:03 GMT) Full text and rfc822 format available.

Message #16 received at 73763 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Dmitry Gutov" <dmitry <at> gutov.dev>, Sean Whitton <spwhitton <at> spwhitton.name>
Cc: alex <at> bochannek.com, 73763 <at> debbugs.gnu.org
Subject: Re: bug#73763: 31.0.50;
 [PATCH] Remove unnecessary trailing white space from
 SRC revision number
Date: Sat, 12 Oct 2024 21:22:12 +0300
> Date: Sat, 12 Oct 2024 19:22:39 +0200
> From: "Dmitry Gutov" <dmitry <at> gutov.dev>
> Cc: 73763 <at> debbugs.gnu.org
> 
> On Sat, Oct 12, 2024, at 2:40 PM, Eli Zaretskii wrote:
> 
>  > From: Alex Bochannek <alex <at> bochannek.com>
>  > Date: Fri, 11 Oct 2024 20:45:53 -0700
>  > 
>  > I am using the SRC back end to VC and noticed `^J' after the revision
>  > number in the mode line. This appears to be due to the way the output of
>  > the `src list' command is converted to a string, which keeps the
>  > newline.
>  > 
>  > The following patch has been tested under macOS Sequoia 15.0.1 and
>  > should be equally applicable to other platforms.
> 
>  Looks correct to me.
> 
>  Dmitry?
> 
> Looks reasonable to me too, though as discussed, it might be better to ping Sean.
> 
> If the patch is already tested on a live program, great. Note that it has a .local email.

Adding Sean.




Reply sent to Sean Whitton <spwhitton <at> spwhitton.name>:
You have taken responsibility. (Sun, 13 Oct 2024 08:38:02 GMT) Full text and rfc822 format available.

Notification sent to Alex Bochannek <alex <at> bochannek.com>:
bug acknowledged by developer. (Sun, 13 Oct 2024 08:38:02 GMT) Full text and rfc822 format available.

Message #21 received at 73763-done <at> debbugs.gnu.org (full text, mbox):

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: Alex Bochannek <alex <at> bochannek.com>
Cc: 73763-done <at> debbugs.gnu.org
Subject: Re: bug#73763: 31.0.50; [PATCH] Remove unnecessary trailing white
 space from SRC revision number
Date: Sun, 13 Oct 2024 16:36:28 +0800
Hello,

Thank you, installed on master.

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73763; Package emacs. (Sun, 13 Oct 2024 19:26:02 GMT) Full text and rfc822 format available.

Message #24 received at 73763-done <at> debbugs.gnu.org (full text, mbox):

From: Alex Bochannek <alex <at> bochannek.com>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: 73763-done <at> debbugs.gnu.org
Subject: Re: bug#73763: 31.0.50; [PATCH] Remove unnecessary trailing white
 space from SRC revision number
Date: Sun, 13 Oct 2024 10:50:33 -0700
Sean Whitton <spwhitton <at> spwhitton.name> writes:

> Hello,
>
> Thank you, installed on master.

Thanks!

-- 
Alex.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 11 Nov 2024 12:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 312 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.