Subject: bug#73763: closed (Re: bug#73763: 31.0.50; [PATCH] Remove unnecessary trailing white space from SRC revision number)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 13 Oct 2024 08:38:02 +0000

Your bug report

#73763: 31.0.50; [PATCH] Remove unnecessary trailing white space from SRC revision number

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
73763: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=73763
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#73763: 31.0.50; [PATCH] Remove unnecessary trailing white space from SRC revision number
From: Sean Whitton <[email-masked]>
To: Alex Bochannek <[email-masked]>
Cc: [email-masked]
Date: Sun, 13 Oct 2024 16:36:28 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,

Thank you, installed on master.

-- 
Sean Whitton

Subject: 31.0.50; [PATCH] Remove unnecessary trailing white space from SRC revision number
From: Alex Bochannek <[email-masked]>
To: [email-masked]
Date: Fri, 11 Oct 2024 20:45:53 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

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.

>From 37d0c418b633f588c8162704630e422afecbf5df Mon Sep 17 00:00:00 2001
From: Alex Bochannek <[email-masked]>
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)

-- 
Alex.