GNU bug report logs - #79480
[PATCH] add `log-view-copy-revision-as-kill' function

Previous Next

Package: emacs;

Reported by: Timo Myyrä <timo.myyra <at> bittivirhe.fi>

Date: Sun, 21 Sep 2025 08:29:02 UTC

Severity: normal

Tags: patch

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Timo Myyrä <timo.myyra <at> bittivirhe.fi>
Cc: 79480 <at> debbugs.gnu.org
Subject: bug#79480: [PATCH] add `log-view-copy-revision-as-kill' function
Date: Sun, 21 Sep 2025 11:39:31 +0300
> From: Timo Myyrä <timo.myyra <at> bittivirhe.fi>
> Date: Sun, 21 Sep 2025 11:27:44 +0300
> 
> Here is an patch to implement `w' binding in the log-view-mode-map to
> copy the revision string to kill-ring. Helps when the revision is
> required in some other command.
> This tries to follow the same idiom as in the dired mode where `w'
> copies the filename under point to kill ring.

Thanks.

> --- a/etc/NEWS
> +++ b/etc/NEWS
> @@ -2330,6 +2330,12 @@ You can get back the old behavior with something like this:
>      (with-eval-after-load 'log-view
>        (keymap-set log-view-mode-map "m" #'log-view-toggle-mark-entry))
>  
> +---
> +*** A new function `log-view-copy-revision-as-kill' added

Heading lines in NEWS must end in a period.  Also, please quote 'like
this' in NEWS.

> +The log-view now provides new `log-view-copy-revision-as-kill' function
                                                                  ^^^^^^^^
"command".

Also, there's no need to tell which package provided the new command.
So something like

  The new command 'log-view-copy-revision-as-kill' allows copying ...

is better.

And IMO the "-as-kill" part of the command's name is redundant.

> +to copy the revision string under point to the kill-ring. The command is
> +bound by default to `w' in log-view-mode-map.

Please use "at point", not "under point".  (Actually, I believe a more
accurate wording is "revision string of the log entry at point".)




This bug report was last modified 3 days ago.

Previous Next


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