From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alex Bochannek Newsgroups: gmane.emacs.bugs Subject: bug#73763: 31.0.50; [PATCH] Remove unnecessary trailing white space from SRC revision number Date: Fri, 11 Oct 2024 20:45:53 -0700 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8465"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: 73763@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 12 06:25:09 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1szTgj-00024g-BV for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 12 Oct 2024 06:25:09 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1szTgR-0006JK-Oa; Sat, 12 Oct 2024 00:24:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1szTgP-0006JA-EB for bug-gnu-emacs@gnu.org; Sat, 12 Oct 2024 00:24:49 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1szTgO-0000QP-Vm for bug-gnu-emacs@gnu.org; Sat, 12 Oct 2024 00:24:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=YOUANut7XPEpmGBt/0/fpGHpfSSrfpJkBTQRDSSaBGQ=; b=NAFkBJWCQU+9qhZtvEg+Q7E4ZrtzDDuZpT2icXc/yOTEa0BHktlF+uwerU33ug1qZviQDkR5dKhL34iFgQwnWrzOkoKTGDzAMpjPeOFrRm3vwuH6XIxjnYIwGWcjnqY5+IebkdrPkW5MvUWPagV0Z7FjiN6YdOmKAtoFbgWcrYKzlFAW938ZWJtt7rzDVpzs+8tojlzCRVitxscrfaZiMFyZkRq5b8HurrJoQPbDF+gD2ImoEw1uDaLefJ9YkrB7Cbtu1LxLKHGH+NUY+d1v5JIvpLBkM58Meo76dov9vJtN0EAeD5EQLy0q3asHNGYXgjEW2EtBjuRNUDxcj13QkA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1szTgc-0000ea-62 for bug-gnu-emacs@gnu.org; Sat, 12 Oct 2024 00:25:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alex Bochannek Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 12 Oct 2024 04:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 73763 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.17287070542438 (code B ref -1); Sat, 12 Oct 2024 04:25:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Oct 2024 04:24:14 +0000 Original-Received: from localhost ([127.0.0.1]:35977 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1szTfp-0000dF-Nw for submit@debbugs.gnu.org; Sat, 12 Oct 2024 00:24:14 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:45740) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1szTfn-0000d7-Sj for submit@debbugs.gnu.org; Sat, 12 Oct 2024 00:24:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1szTfV-0006Gf-Vh for bug-gnu-emacs@gnu.org; Sat, 12 Oct 2024 00:23:56 -0400 Original-Received: from ns.lapseofthought.com ([50.0.39.240] helo=mail.lapseofthought.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1szTfT-0000NH-RY for bug-gnu-emacs@gnu.org; Sat, 12 Oct 2024 00:23:53 -0400 Original-Received: from awb-mbp-m3.local (unknown [IPv6:2601:646:4200:73a0:1c26:90a6:82d0:13b6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.lapseofthought.com (Postfix) with ESMTPSA id 4XQTt96b0qz3pfG8 for ; Fri, 11 Oct 2024 20:45:53 -0700 (PDT) Authentication-Results: ORIGINATING; auth=pass smtp.auth=alex smtp.mailfrom=alex@bochannek.com Received-SPF: pass client-ip=50.0.39.240; envelope-from=alex@bochannek.com; helo=mail.lapseofthought.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:293395 Archived-At: --=-=-= Content-Type: text/plain 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. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Remove-unnecessary-trailing-white-space-from-SRC-rev.patch >From 37d0c418b633f588c8162704630e422afecbf5df Mon Sep 17 00:00:00 2001 From: Alex Bochannek 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) --=-=-= Content-Type: text/plain -- Alex. --=-=-=--