unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#73763: 31.0.50; [PATCH] Remove unnecessary trailing white space from SRC revision number
@ 2024-10-12  3:45 Alex Bochannek
  2024-10-12 12:40 ` Eli Zaretskii
  2024-10-13  8:36 ` Sean Whitton
  0 siblings, 2 replies; 6+ messages in thread
From: Alex Bochannek @ 2024-10-12  3:45 UTC (permalink / raw)
  To: 73763

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

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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Remove-unnecessary-trailing-white-space-from-SRC-rev.patch --]
[-- Type: text/x-patch, Size: 958 bytes --]

From 37d0c418b633f588c8162704630e422afecbf5df Mon Sep 17 00:00:00 2001
From: Alex Bochannek <awb@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)


[-- Attachment #3: Type: text/plain, Size: 11 bytes --]


-- 
Alex.

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

* bug#73763: 31.0.50; [PATCH] Remove unnecessary trailing white space from SRC revision number
  2024-10-12  3:45 bug#73763: 31.0.50; [PATCH] Remove unnecessary trailing white space from SRC revision number Alex Bochannek
@ 2024-10-12 12:40 ` Eli Zaretskii
  2024-10-12 17:22   ` Dmitry Gutov
  2024-10-13  8:36 ` Sean Whitton
  1 sibling, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2024-10-12 12:40 UTC (permalink / raw)
  To: Alex Bochannek, Dmitry Gutov; +Cc: 73763

> From: Alex Bochannek <alex@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?





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

* bug#73763: 31.0.50; [PATCH] Remove unnecessary trailing white space from SRC revision number
  2024-10-12 12:40 ` Eli Zaretskii
@ 2024-10-12 17:22   ` Dmitry Gutov
  2024-10-12 18:22     ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Dmitry Gutov @ 2024-10-12 17:22 UTC (permalink / raw)
  To: Eli Zaretskii, Alex Bochannek; +Cc: 73763

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

On Sat, Oct 12, 2024, at 2:40 PM, Eli Zaretskii wrote:
> > From: Alex Bochannek <alex@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.

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

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

* bug#73763: 31.0.50; [PATCH] Remove unnecessary trailing white space from SRC revision number
  2024-10-12 17:22   ` Dmitry Gutov
@ 2024-10-12 18:22     ` Eli Zaretskii
  0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2024-10-12 18:22 UTC (permalink / raw)
  To: Dmitry Gutov, Sean Whitton; +Cc: alex, 73763

> Date: Sat, 12 Oct 2024 19:22:39 +0200
> From: "Dmitry Gutov" <dmitry@gutov.dev>
> Cc: 73763@debbugs.gnu.org
> 
> On Sat, Oct 12, 2024, at 2:40 PM, Eli Zaretskii wrote:
> 
>  > From: Alex Bochannek <alex@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.





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

* bug#73763: 31.0.50; [PATCH] Remove unnecessary trailing white space from SRC revision number
  2024-10-12  3:45 bug#73763: 31.0.50; [PATCH] Remove unnecessary trailing white space from SRC revision number Alex Bochannek
  2024-10-12 12:40 ` Eli Zaretskii
@ 2024-10-13  8:36 ` Sean Whitton
  2024-10-13 17:50   ` Alex Bochannek
  1 sibling, 1 reply; 6+ messages in thread
From: Sean Whitton @ 2024-10-13  8:36 UTC (permalink / raw)
  To: Alex Bochannek; +Cc: 73763-done

Hello,

Thank you, installed on master.

-- 
Sean Whitton





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

* bug#73763: 31.0.50; [PATCH] Remove unnecessary trailing white space from SRC revision number
  2024-10-13  8:36 ` Sean Whitton
@ 2024-10-13 17:50   ` Alex Bochannek
  0 siblings, 0 replies; 6+ messages in thread
From: Alex Bochannek @ 2024-10-13 17:50 UTC (permalink / raw)
  To: Sean Whitton; +Cc: 73763-done

Sean Whitton <spwhitton@spwhitton.name> writes:

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

Thanks!

-- 
Alex.





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

end of thread, other threads:[~2024-10-13 17:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-12  3:45 bug#73763: 31.0.50; [PATCH] Remove unnecessary trailing white space from SRC revision number Alex Bochannek
2024-10-12 12:40 ` Eli Zaretskii
2024-10-12 17:22   ` Dmitry Gutov
2024-10-12 18:22     ` Eli Zaretskii
2024-10-13  8:36 ` Sean Whitton
2024-10-13 17:50   ` Alex Bochannek

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