Subject: bug#72768: closed (Re: bug#72768: [PATCH] Keep local keymap out of vc-git-stash-get-at-point)

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

Your bug report

#72768: [PATCH] Keep local keymap out of vc-git-stash-get-at-point

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

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

Subject: Re: bug#72768: [PATCH] Keep local keymap out of vc-git-stash-get-at-point
From: Dmitry Gutov <[email-masked]>
To: Eli Zaretskii <[email-masked]>, James Thomas <[email-masked]>
Cc: [email-masked]
Date: Sun, 8 Sep 2024 05:11:29 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

Version: 31.1

On 07/09/2024 10:33, Eli Zaretskii wrote:
>> Date: Tue, 27 Aug 2024 03:37:54 +0530
>> From:  James Thomas via "Bug reports for GNU Emacs,
>>   the Swiss army knife of text editors"<[email-masked]>
>>
>> James Thomas wrote:
>>
>>> emacs -Q
>>> (define-key key-translation-map  [?\C-j] (kbd "RET"))
>>> M-x vc-dir (select a git repo)
>>> (with point on a 'stash' entry) C-x v ! = C-j (fails)
>> Of course, if a 'stash' doesn't exist, it may be created, so that the
>> steps are:
>>
>> emacs -Q
>> C-x C-f (open a git-tracked file, make changes), C-x C-s (and save it)
>> C-x p v (select the above repo)
>> z c (create stash)
>> M-: (define-key key-translation-map  [?\C-j] (kbd "RET"))
>> (with point on the new 'stash' entry) C-x v ! = C-j (fails)
> Dmitry, any comments or suggestions?

Makes sense. Pushed to master, thanks!

Subject: [PATCH] Keep local keymap out of vc-git-stash-get-at-point
From: James Thomas <[email-masked]>
To: [email-masked]
Date: Fri, 23 Aug 2024 10:53:40 +0530
List-Id: <debbugs-submit.debbugs.gnu.org>

emacs -Q
(define-key key-translation-map  [?\C-j] (kbd "RET"))
M-x vc-dir (select a git repo)
(with point on a 'stash' entry) C-x v ! = C-j (fails)

The following seems to work:

From f4769888b8f7c86db58c449b7608604a1a629905 Mon Sep 17 00:00:00 2001
From: James Thomas <[email-masked]>
Date: Fri, 23 Aug 2024 10:43:39 +0530
Subject: [PATCH] Keep local keymap out of vc-git-stash-get-at-point

* lisp/vc/vc-git.el (vc-git-stash-get-at-point): Make the
change.
---
 lisp/vc/vc-git.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index e8257c5dbd0..1133424edeb 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -2135,7 +2135,7 @@ vc-git-stash-get-at-point
     (goto-char point)
     (beginning-of-line)
     (if (looking-at "^ +\\({[0-9]+}\\):")
-	(match-string 1)
+	(match-string-no-properties 1)
       (error "Cannot find stash at point"))))

 ;; vc-git-stash-delete-at-point must be called from a vc-dir buffer.
--
2.43.0