GNU bug report logs - #52158
29.0.50; Add key binding fo vc-git-stash

Previous Next

Package: emacs;

Reported by: Manuel Uberti <manuel.uberti <at> inventati.org>

Date: Sun, 28 Nov 2021 08:37:01 UTC

Severity: normal

Found in version 29.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 52158 in the body.
You can then email your comments to 52158 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#52158; Package emacs. (Sun, 28 Nov 2021 08:37:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Manuel Uberti <manuel.uberti <at> inventati.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 28 Nov 2021 08:37:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Manuel Uberti <manuel.uberti <at> inventati.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; Add key binding fo vc-git-stash
Date: Sun, 28 Nov 2021 09:36:27 +0100
In my init.el I have this code:

(defun mu-vc-git-stash (pop-or-delete)
  "Create, pop, or delete Git stashes.
With no POP-OR-DELETE call `vc-git-stash'. With one prefix
argument call `vc-git-stash-pop'. With two prefix arguments call
`vc-git-stash-delete'."
  (interactive "P" vc-dir-mode)
  (cond ((= (prefix-numeric-value pop-or-delete) 4)
         (call-interactively #'vc-git-stash-pop))
        ((= (prefix-numeric-value pop-or-delete) 16)
         (call-interactively #'vc-git-stash-delete))
        (t (call-interactively #'vc-git-stash))))

(with-eval-after-load 'vc-dir
  (keymap-set vc-dir-mode-map "z" #'mu-vc-git-stash))

Stashing is something I do regularly, so I was missing a key binding for it in 
`vc-dir-mode'.

I am not suggesting to add something like `mu-vc-git-stash', though, that is 
just an example of me wrapping useful and related Emacs commands in order to 
make them easily available. Nonetheless, 'z' is free in `vc-dir-mode-map' right 
now and `vc-git-stash' is not bound to any key.

What do you think?


In GNU Emacs 29.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.18, cairo 
version 1.16.0)
 of 2021-11-28 built on hathaway
Repository revision: 08d1c405073f614d89bcdf7f6bd19e8c8aaf8356
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12009000
System Description: Ubuntu 20.04 LTS

Configured using:
 'configure --with-harfbuzz --with-native-compilation CC=gcc-10'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES
NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF
TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB

Important settings:
  value of $LC_MONETARY: it_IT.UTF-8
  value of $LC_NUMERIC: it_IT.UTF-8
  value of $LC_TIME: it_IT.UTF-8
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: ELisp/l

Minor modes in effect:
  electric-pair-mode: t
  flymake-mode: t
  flyspell-mode: t
  goto-address-prog-mode: t
  savehist-mode: t
  global-so-long-mode: t
  global-subword-mode: t
  subword-mode: t
  windmove-mode: t
  winner-mode: t
  global-company-mode: t
  company-mode: t
  envrc-global-mode: t
  envrc-mode: t
  fido-vertical-mode: t
  icomplete-vertical-mode: t
  icomplete-mode: t
  fido-mode: t
  delete-selection-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  window-divider-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/home/manuel/.emacs.d/elpa/transient-0.3.7.0.20211105.10020/transient hides 
/usr/local/share/emacs/29.0.50/lisp/transient

Features:
(shadow sort mail-extr emacsbug sendmail imenu noutline outline checkdoc
lisp-mnt elec-pair flymake-proc flymake compile comint flyspell ispell
goto-addr thingatpt vc-git diff-mode easy-mmode vc vc-dispatcher
cursor-sensor mm-archive message yank-media dired-x dired dired-loaddefs
rfc822 mml mml-sec epa derived gnus-util rmail rmail-loaddefs
text-property-search mailabbrev gmm-utils mailheader mm-decode mm-bodies
mm-encode mail-utils mule-util gnutls network-stream url-http mail-parse
rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr url-gw nsm rmc
puny url-cache url-auth epg rfc6068 epg-config hl-line finder-inf
time-date modus-operandi-theme modus-themes delight comp comp-cstr
warnings cl-extra help-mode savehist so-long cap-words superword subword
windmove winner company-oddmuse company-keywords company-etags etags
fileloop generator xref project ring company-gtags company-dabbrev-code
company-dabbrev company-files company-clang company-capf company-cmake
company-semantic company-template company-bbdb company pcase envrc
inheritenv ansi-color icomplete ibuf-macs rx delsel info tex-site
package browse-url url url-proxy url-privacy url-expand url-methods
url-history url-cookie url-domsuf url-util mailcap url-handlers
url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json map url-vars seq gv subr-x byte-opt bytecomp
byte-compile cconv cl-loaddefs cl-lib iso-transl tooltip eldoc paren
electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite emoji-zwj charscript charprop case-table
epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice
button loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit x multi-tty make-network-process
native-compile emacs)

Memory information:
((conses 16 420915 346814)
 (symbols 48 22702 4)
 (strings 32 106480 66469)
 (string-bytes 1 4598076)
 (vectors 16 37577)
 (vector-slots 8 1024474 89574)
 (floats 8 288 2182)
 (intervals 56 2322 271)
 (buffers 992 14))

-- 
Manuel Uberti
www.manueluberti.eu




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52158; Package emacs. (Sun, 28 Nov 2021 13:52:01 GMT) Full text and rfc822 format available.

Message #8 received at 52158 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Manuel Uberti <manuel.uberti <at> inventati.org>
Cc: 52158 <at> debbugs.gnu.org
Subject: Re: bug#52158: 29.0.50; Add key binding fo vc-git-stash
Date: Sun, 28 Nov 2021 14:51:37 +0100
Manuel Uberti <manuel.uberti <at> inventati.org> writes:

> Stashing is something I do regularly, so I was missing a key binding
> for it in `vc-dir-mode'.

If you go up to the "Stash" line in vc-dir buffers, there's a bunch of
stash-related commands bound there.  `C' is bound to `vc-git-stash'
there, for instance.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52158; Package emacs. (Sun, 28 Nov 2021 13:56:02 GMT) Full text and rfc822 format available.

Message #11 received at 52158 <at> debbugs.gnu.org (full text, mbox):

From: Manuel Uberti <manuel.uberti <at> inventati.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 52158 <at> debbugs.gnu.org
Subject: Re: bug#52158: 29.0.50; Add key binding fo vc-git-stash
Date: Sun, 28 Nov 2021 14:55:23 +0100
On 28/11/21 14:51, Lars Ingebrigtsen wrote:
> Manuel Uberti <manuel.uberti <at> inventati.org> writes:
> 
>> Stashing is something I do regularly, so I was missing a key binding
>> for it in `vc-dir-mode'.
> 
> If you go up to the "Stash" line in vc-dir buffers, there's a bunch of
> stash-related commands bound there.  `C' is bound to `vc-git-stash'
> there, for instance.
> 

Interesting, I didn't know about this. Although that's probably because when I 
do C-h m in vc-dir buffers I don't see key bindings related to stash-related 
commands, so I thought it was unbound.

-- 
Manuel Uberti
www.manueluberti.eu




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52158; Package emacs. (Sun, 28 Nov 2021 14:13:01 GMT) Full text and rfc822 format available.

Message #14 received at 52158 <at> debbugs.gnu.org (full text, mbox):

From: Manuel Uberti <manuel.uberti <at> inventati.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 52158 <at> debbugs.gnu.org
Subject: Re: bug#52158: 29.0.50; Add key binding fo vc-git-stash
Date: Sun, 28 Nov 2021 15:12:20 +0100
On 28/11/21 14:55, Manuel Uberti wrote:
>> If you go up to the "Stash" line in vc-dir buffers, there's a bunch of
>> stash-related commands bound there.  `C' is bound to `vc-git-stash'
>> there, for instance.
>>
> 
> Interesting, I didn't know about this. Although that's probably because when I 
> do C-h m in vc-dir buffers I don't see key bindings related to stash-related 
> commands, so I thought it was unbound.

Actually, I've now discovered that P is bound to vc-git-stash-pop-at-point when 
I move to a line that refers to a stash, so I have no need for my previous 
wrapper any more.

Thank you for pointing out the key binding. This can be closed, I guess.

-- 
Manuel Uberti
www.manueluberti.eu




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52158; Package emacs. (Mon, 29 Nov 2021 13:59:02 GMT) Full text and rfc822 format available.

Message #17 received at 52158 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Manuel Uberti <manuel.uberti <at> inventati.org>
Cc: 52158 <at> debbugs.gnu.org
Subject: Re: bug#52158: 29.0.50; Add key binding fo vc-git-stash
Date: Mon, 29 Nov 2021 14:58:35 +0100
Manuel Uberti <manuel.uberti <at> inventati.org> writes:

>> Interesting, I didn't know about this. Although that's probably
>> because when I do C-h m in vc-dir buffers I don't see key bindings
>> related to stash-related commands, so I thought it was unbound.
>
> Actually, I've now discovered that P is bound to
> vc-git-stash-pop-at-point when I move to a line that refers to a
> stash, so I have no need for my previous wrapper any more.
>
> Thank you for pointing out the key binding. This can be closed, I guess.

I'm wondering whether we could make these commands more discoverable,
though.  If you put point there and hit `C-h b', it'll list the
commands, but not elsewhere in the buffer (since these are text property
keymaps).

Anybody got any ideas here?  Adding some text to the major mode doc
string about how there could be more commands available at certain
points in the "header" of the buffer?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52158; Package emacs. (Mon, 29 Nov 2021 14:04:02 GMT) Full text and rfc822 format available.

Message #20 received at 52158 <at> debbugs.gnu.org (full text, mbox):

From: Manuel Uberti <manuel.uberti <at> inventati.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 52158 <at> debbugs.gnu.org
Subject: Re: bug#52158: 29.0.50; Add key binding fo vc-git-stash
Date: Mon, 29 Nov 2021 15:03:07 +0100
On 29/11/21 14:58, Lars Ingebrigtsen wrote:
> I'm wondering whether we could make these commands more discoverable,
> though.  If you put point there and hit `C-h b', it'll list the
> commands, but not elsewhere in the buffer (since these are text property
> keymaps).

Another thing I did not know, thanks.

> Anybody got any ideas here?  Adding some text to the major mode doc
> string about how there could be more commands available at certain
> points in the "header" of the buffer?

It'd be helpful to have them documented on C-h m. That's the first I thing I hit 
in a major mode I am not familiar with.

-- 
Manuel Uberti
www.manueluberti.eu




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52158; Package emacs. (Mon, 29 Nov 2021 14:13:01 GMT) Full text and rfc822 format available.

Message #23 received at 52158 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Manuel Uberti <manuel.uberti <at> inventati.org>, 52158 <at> debbugs.gnu.org
Subject: Re: bug#52158: 29.0.50; Add key binding fo vc-git-stash
Date: Mon, 29 Nov 2021 15:12:19 +0100
>>>>> On Mon, 29 Nov 2021 14:58:35 +0100, Lars Ingebrigtsen <larsi <at> gnus.org> said:

    Lars> Manuel Uberti <manuel.uberti <at> inventati.org> writes:
    >>> Interesting, I didn't know about this. Although that's probably
    >>> because when I do C-h m in vc-dir buffers I don't see key bindings
    >>> related to stash-related commands, so I thought it was unbound.
    >> 
    >> Actually, I've now discovered that P is bound to
    >> vc-git-stash-pop-at-point when I move to a line that refers to a
    >> stash, so I have no need for my previous wrapper any more.
    >> 
    >> Thank you for pointing out the key binding. This can be closed, I guess.

    Lars> I'm wondering whether we could make these commands more discoverable,
    Lars> though.  If you put point there and hit `C-h b', it'll list the
    Lars> commands, but not elsewhere in the buffer (since these are text property
    Lars> keymaps).

    Lars> Anybody got any ideas here?  Adding some text to the major mode doc
    Lars> string about how there could be more commands available at certain
    Lars> points in the "header" of the buffer?

Either that or add commands that go to the first stash and pops
etc. They'd have to unhide the stash list if it were hidden,
though (and I wouldnʼt bind the 'kill-stash' thingy).

Robert
-- 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52158; Package emacs. (Mon, 29 Nov 2021 14:19:02 GMT) Full text and rfc822 format available.

Message #26 received at 52158 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: Manuel Uberti <manuel.uberti <at> inventati.org>, 52158 <at> debbugs.gnu.org
Subject: Re: bug#52158: 29.0.50; Add key binding fo vc-git-stash
Date: Mon, 29 Nov 2021 15:18:11 +0100
Robert Pluim <rpluim <at> gmail.com> writes:

> Either that or add commands that go to the first stash and pops
> etc. They'd have to unhide the stash list if it were hidden,
> though (and I wouldnʼt bind the 'kill-stash' thingy).

The problem is that vc-mode is generic and stashes are very specific to
Git.  Perhaps we should have introduced a bunch of minor modes, really.
Like `vc-dir-git-mode' etc.  These might be pretty empty modes, but at
least they'd offer a convenient place to put doc strings, if nothing
else.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52158; Package emacs. (Mon, 29 Nov 2021 14:31:02 GMT) Full text and rfc822 format available.

Message #29 received at 52158 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Manuel Uberti <manuel.uberti <at> inventati.org>, 52158 <at> debbugs.gnu.org
Subject: Re: bug#52158: 29.0.50; Add key binding fo vc-git-stash
Date: Mon, 29 Nov 2021 15:30:18 +0100
>>>>> On Mon, 29 Nov 2021 15:18:11 +0100, Lars Ingebrigtsen <larsi <at> gnus.org> said:

    Lars> Robert Pluim <rpluim <at> gmail.com> writes:
    >> Either that or add commands that go to the first stash and pops
    >> etc. They'd have to unhide the stash list if it were hidden,
    >> though (and I wouldnʼt bind the 'kill-stash' thingy).

This wouldnʼt work anyway, since the bindings conflict with vc-dir

    Lars> The problem is that vc-mode is generic and stashes are very specific to
    Lars> Git.  Perhaps we should have introduced a bunch of minor modes, really.
    Lars> Like `vc-dir-git-mode' etc.  These might be pretty empty modes, but at
    Lars> least they'd offer a convenient place to put doc strings, if nothing
    Lars> else.

We could steal^Wborrow from magit, which puts all the stash commands
on the 'z' prefix. To be honest I never do much with vc mode anymore,
magit does everything I need and more, and git has taken over the
world, so Iʼm not sure we should work too hard on vc mode.

Robert
-- 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52158; Package emacs. (Mon, 29 Nov 2021 14:41:01 GMT) Full text and rfc822 format available.

Message #32 received at 52158 <at> debbugs.gnu.org (full text, mbox):

From: Manuel Uberti <manuel.uberti <at> inventati.org>
To: Robert Pluim <rpluim <at> gmail.com>, Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 52158 <at> debbugs.gnu.org
Subject: Re: bug#52158: 29.0.50; Add key binding fo vc-git-stash
Date: Mon, 29 Nov 2021 15:40:52 +0100
On 29/11/21 15:30, Robert Pluim wrote:
> We could steal^Wborrow from magit, which puts all the stash commands
> on the 'z' prefix. To be honest I never do much with vc mode anymore,
> magit does everything I need and more, and git has taken over the
> world, so Iʼm not sure we should work too hard on vc mode.

'z' is the key binding I am using for the custom function I wrote about in the 
opening mail of this ticket, and I agree the Magit does a lot of good things, 
but I have been using vc-mode every day for more than a week[1] so may I just 
say "please don't stop working on vc-mode!"?

[1] https://www.manueluberti.eu/emacs/2021/11/27/vc/

-- 
Manuel Uberti
www.manueluberti.eu




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52158; Package emacs. (Mon, 29 Nov 2021 15:34:01 GMT) Full text and rfc822 format available.

Message #35 received at 52158 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: Manuel Uberti <manuel.uberti <at> inventati.org>, 52158 <at> debbugs.gnu.org,
 Dmitry Gutov <dgutov <at> yandex.ru>
Subject: Re: bug#52158: 29.0.50; Add key binding fo vc-git-stash
Date: Mon, 29 Nov 2021 16:32:57 +0100
Robert Pluim <rpluim <at> gmail.com> writes:

> We could steal^Wborrow from magit, which puts all the stash commands
> on the 'z' prefix.

Sure, the new vc-dir-git-mode could add a `z' keymap.

Dmitry, does adding some vc-specific minor modes to vc-dir buffers sound
OK to you?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52158; Package emacs. (Mon, 29 Nov 2021 17:23:02 GMT) Full text and rfc822 format available.

Message #38 received at 52158 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Robert Pluim <rpluim <at> gmail.com>,
 Manuel Uberti <manuel.uberti <at> inventati.org>, 52158 <at> debbugs.gnu.org
Subject: Re: bug#52158: 29.0.50; Add key binding fo vc-git-stash
Date: Mon, 29 Nov 2021 19:12:15 +0200
> The problem is that vc-mode is generic and stashes are very specific to
> Git.  Perhaps we should have introduced a bunch of minor modes, really.
> Like `vc-dir-git-mode' etc.  These might be pretty empty modes, but at
> least they'd offer a convenient place to put doc strings, if nothing
> else.

Indeed, we have vc-git-dir-extra-headers.  So why not have also
vc-git-dir-extra-keys.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52158; Package emacs. (Mon, 29 Nov 2021 18:47:02 GMT) Full text and rfc822 format available.

Message #41 received at 52158 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: Robert Pluim <rpluim <at> gmail.com>,
 Manuel Uberti <manuel.uberti <at> inventati.org>, 52158 <at> debbugs.gnu.org
Subject: Re: bug#52158: 29.0.50; Add key binding fo vc-git-stash
Date: Mon, 29 Nov 2021 19:46:03 +0100
Juri Linkov <juri <at> linkov.net> writes:

>> The problem is that vc-mode is generic and stashes are very specific to
>> Git.  Perhaps we should have introduced a bunch of minor modes, really.
>> Like `vc-dir-git-mode' etc.  These might be pretty empty modes, but at
>> least they'd offer a convenient place to put doc strings, if nothing
>> else.
>
> Indeed, we have vc-git-dir-extra-headers.  So why not have also
> vc-git-dir-extra-keys.

Well, by using the normal minor mode mechanism, we get better support
(via `C-h b' and `C-h m') than if we add some sort of special mechanism
to vc-dir for this.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52158; Package emacs. (Mon, 29 Nov 2021 22:18:02 GMT) Full text and rfc822 format available.

Message #44 received at 52158 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Lars Ingebrigtsen <larsi <at> gnus.org>, Robert Pluim <rpluim <at> gmail.com>
Cc: Manuel Uberti <manuel.uberti <at> inventati.org>, 52158 <at> debbugs.gnu.org
Subject: Re: bug#52158: 29.0.50; Add key binding fo vc-git-stash
Date: Tue, 30 Nov 2021 01:16:35 +0300
On 29.11.2021 18:32, Lars Ingebrigtsen wrote:
> Dmitry, does adding some vc-specific minor modes to vc-dir buffers sound
> OK to you?

Perhaps adding a derived major mode would be a more succinct solution?

Similar to how we have vc-git-log-edit-mode.

vc-git's addition to the new major mode would be to add a keymap with 
extra commands.

OTOH, for better user experience this will probably require duplicating 
the contents of vc-dir-mode's docstring. Or would adding a reference to 
it suffice?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52158; Package emacs. (Tue, 30 Nov 2021 13:00:02 GMT) Full text and rfc822 format available.

Message #47 received at 52158 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: Robert Pluim <rpluim <at> gmail.com>,
 Manuel Uberti <manuel.uberti <at> inventati.org>, 52158 <at> debbugs.gnu.org
Subject: Re: bug#52158: 29.0.50; Add key binding fo vc-git-stash
Date: Tue, 30 Nov 2021 13:59:11 +0100
Dmitry Gutov <dgutov <at> yandex.ru> writes:

> OTOH, for better user experience this will probably require
> duplicating the contents of vc-dir-mode's docstring. Or would adding a
> reference to it suffice?

Does a derived mode give us anything more than a minor mode would?  We
basically need a place to put helpful text in the doc string, as well as
binding some Git-specific commands, and that seems like a perfect fit
for a minor mode.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52158; Package emacs. (Mon, 06 Dec 2021 01:02:02 GMT) Full text and rfc822 format available.

Message #50 received at 52158 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Robert Pluim <rpluim <at> gmail.com>,
 Manuel Uberti <manuel.uberti <at> inventati.org>, 52158 <at> debbugs.gnu.org
Subject: Re: bug#52158: 29.0.50; Add key binding fo vc-git-stash
Date: Mon, 6 Dec 2021 04:00:50 +0300
On 30.11.2021 15:59, Lars Ingebrigtsen wrote:
> Dmitry Gutov<dgutov <at> yandex.ru>  writes:
> 
>> OTOH, for better user experience this will probably require
>> duplicating the contents of vc-dir-mode's docstring. Or would adding a
>> reference to it suffice?
> Does a derived mode give us anything more than a minor mode would?

Only in the way of retaining more uniformity in the approach.

> We
> basically need a place to put helpful text in the doc string, as well as
> binding some Git-specific commands, and that seems like a perfect fit
> for a minor mode.

Perhaps minor modes are indeed good to use here. Especially if it's only 
one per backend (for this particular command).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52158; Package emacs. (Mon, 06 Dec 2021 05:43:02 GMT) Full text and rfc822 format available.

Message #53 received at 52158 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: Robert Pluim <rpluim <at> gmail.com>,
 Manuel Uberti <manuel.uberti <at> inventati.org>, 52158 <at> debbugs.gnu.org
Subject: Re: bug#52158: 29.0.50; Add key binding fo vc-git-stash
Date: Mon, 06 Dec 2021 06:42:28 +0100
Dmitry Gutov <dgutov <at> yandex.ru> writes:

> Perhaps minor modes are indeed good to use here. Especially if it's
> only one per backend (for this particular command).

I've now added this, and put the two relevant stash commands on the `z'
map.  Feel free to adjust, rename or move things around.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 29.1, send any further explanations to 52158 <at> debbugs.gnu.org and Manuel Uberti <manuel.uberti <at> inventati.org> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 06 Dec 2021 05:44:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52158; Package emacs. (Mon, 06 Dec 2021 06:30:02 GMT) Full text and rfc822 format available.

Message #58 received at 52158 <at> debbugs.gnu.org (full text, mbox):

From: Manuel Uberti <manuel.uberti <at> inventati.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>, Dmitry Gutov <dgutov <at> yandex.ru>
Cc: Robert Pluim <rpluim <at> gmail.com>, 52158 <at> debbugs.gnu.org
Subject: Re: bug#52158: 29.0.50; Add key binding fo vc-git-stash
Date: Mon, 6 Dec 2021 07:29:48 +0100
On 06/12/21 06:42, Lars Ingebrigtsen wrote:
> Dmitry Gutov <dgutov <at> yandex.ru> writes:
> 
>> Perhaps minor modes are indeed good to use here. Especially if it's
>> only one per backend (for this particular command).
> 
> I've now added this, and put the two relevant stash commands on the `z'
> map.  Feel free to adjust, rename or move things around.
> 

Thank you for this. May I suggest to add 'z p' bound to vc-git-stash-pop to 
vc-dir-git-mode-map?

-- 
Manuel Uberti
www.manueluberti.eu




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52158; Package emacs. (Mon, 06 Dec 2021 06:32:01 GMT) Full text and rfc822 format available.

Message #61 received at 52158 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Manuel Uberti <manuel.uberti <at> inventati.org>
Cc: Robert Pluim <rpluim <at> gmail.com>, 52158 <at> debbugs.gnu.org,
 Dmitry Gutov <dgutov <at> yandex.ru>
Subject: Re: bug#52158: 29.0.50; Add key binding fo vc-git-stash
Date: Mon, 06 Dec 2021 07:31:01 +0100
Manuel Uberti <manuel.uberti <at> inventati.org> writes:

> Thank you for this. May I suggest to add 'z p' bound to
> vc-git-stash-pop to vc-dir-git-mode-map?

But that command pops the stash under point, so you have to move point
to a stash line first.  So it doesn't seem very helpful to have in the
minor mode map.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52158; Package emacs. (Mon, 06 Dec 2021 06:33:02 GMT) Full text and rfc822 format available.

Message #64 received at 52158 <at> debbugs.gnu.org (full text, mbox):

From: Manuel Uberti <manuel.uberti <at> inventati.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Robert Pluim <rpluim <at> gmail.com>, 52158 <at> debbugs.gnu.org,
 Dmitry Gutov <dgutov <at> yandex.ru>
Subject: Re: bug#52158: 29.0.50; Add key binding fo vc-git-stash
Date: Mon, 6 Dec 2021 07:32:33 +0100
On 06/12/21 07:31, Lars Ingebrigtsen wrote:
> Manuel Uberti <manuel.uberti <at> inventati.org> writes:
> 
>> Thank you for this. May I suggest to add 'z p' bound to
>> vc-git-stash-pop to vc-dir-git-mode-map?
> 
> But that command pops the stash under point, so you have to move point
> to a stash line first.  So it doesn't seem very helpful to have in the
> minor mode map.
> 

I thought vc-git-stash-pop-at-point did that.

-- 
Manuel Uberti
www.manueluberti.eu




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52158; Package emacs. (Mon, 06 Dec 2021 08:59:03 GMT) Full text and rfc822 format available.

Message #67 received at 52158 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Manuel Uberti <manuel.uberti <at> inventati.org>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 52158 <at> debbugs.gnu.org,
 Dmitry Gutov <dgutov <at> yandex.ru>
Subject: Re: bug#52158: 29.0.50; Add key binding fo vc-git-stash
Date: Mon, 06 Dec 2021 09:58:24 +0100
>>>>> On Mon, 6 Dec 2021 07:32:33 +0100, Manuel Uberti <manuel.uberti <at> inventati.org> said:

    Manuel> On 06/12/21 07:31, Lars Ingebrigtsen wrote:
    >> Manuel Uberti <manuel.uberti <at> inventati.org> writes:
    >> 
    >>> Thank you for this. May I suggest to add 'z p' bound to
    >>> vc-git-stash-pop to vc-dir-git-mode-map?
    >> But that command pops the stash under point, so you have to move
    >> point
    >> to a stash line first.  So it doesn't seem very helpful to have in the
    >> minor mode map.
    >> 

    Manuel> I thought vc-git-stash-pop-at-point did that.

It does, and thatʼs the one bound to 'P' in the stash area
keymap. 'pop' is destructive, so I think it should be bound only when
youʼre actually looking at the stash list (unlike the new 'z c' and 'z
s' bindings).

BTW, the stash area bindings are all upper case, and the new ones are
lower case. Can we make them more consistent?

Robert
-- 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52158; Package emacs. (Mon, 06 Dec 2021 17:35:01 GMT) Full text and rfc822 format available.

Message #70 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Manuel Uberti via "Bug reports for GNU Emacs, the Swiss army knife of
 text editors" <bug-gnu-emacs <at> gnu.org>
Cc: 52158 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>,
 Robert Pluim <rpluim <at> gmail.com>, Manuel Uberti <manuel.uberti <at> inventati.org>,
 Dmitry Gutov <dgutov <at> yandex.ru>
Subject: Re: bug#52158: 29.0.50; Add key binding fo vc-git-stash
Date: Mon, 06 Dec 2021 19:32:58 +0200
> May I suggest to add 'z p' bound to vc-git-stash-pop to vc-dir-git-mode-map?

Good idea, please add it - I spend too much time every day navigating
several lines upwards to the vc-dir header before typing a key to pop a stash,
and then back after typing a key.

Whereas typing 'z p' bound to vc-git-stash-pop everywhere in the buffer
will allow to type TAB in stash name completion when only one stash
is in use, so just 'z p TAB RET' - and done.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52158; Package emacs. (Mon, 06 Dec 2021 17:35:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52158; Package emacs. (Tue, 07 Dec 2021 05:07:01 GMT) Full text and rfc822 format available.

Message #76 received at 52158 <at> debbugs.gnu.org (full text, mbox):

From: Manuel Uberti <manuel.uberti <at> inventati.org>
To: Juri Linkov <juri <at> linkov.net>,
 Manuel Uberti via Bug reports for GNU "Emacs," the Swiss army knife of text
 editors <bug-gnu-emacs <at> gnu.org>
Cc: 52158 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>,
 Robert Pluim <rpluim <at> gmail.com>, Dmitry Gutov <dgutov <at> yandex.ru>
Subject: Re: bug#52158: 29.0.50; Add key binding fo vc-git-stash
Date: Tue, 7 Dec 2021 06:06:49 +0100
On 06/12/21 18:32, Juri Linkov wrote:
> Good idea, please add it - I spend too much time every day navigating
> several lines upwards to the vc-dir header before typing a key to pop a stash,
> and then back after typing a key.
> 
> Whereas typing 'z p' bound to vc-git-stash-pop everywhere in the buffer
> will allow to type TAB in stash name completion when only one stash
> is in use, so just 'z p TAB RET' - and done.

The stash name completion you mention is what I was doing with my custom 
function in the opening message: 'C-u z TAB RET'. That's why I suggested 'z p'.

-- 
Manuel Uberti
www.manueluberti.eu




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52158; Package emacs. (Tue, 07 Dec 2021 05:08:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52158; Package emacs. (Tue, 07 Dec 2021 07:07:01 GMT) Full text and rfc822 format available.

Message #82 received at 52158 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Manuel Uberti <manuel.uberti <at> inventati.org>
Cc: Robert Pluim <rpluim <at> gmail.com>, 52158 <at> debbugs.gnu.org,
 Dmitry Gutov <dgutov <at> yandex.ru>
Subject: Re: bug#52158: 29.0.50; Add key binding fo vc-git-stash
Date: Tue, 07 Dec 2021 08:06:30 +0100
Manuel Uberti <manuel.uberti <at> inventati.org> writes:

>> But that command pops the stash under point, so you have to move
>> point
>> to a stash line first.  So it doesn't seem very helpful to have in the
>> minor mode map.
>
> I thought vc-git-stash-pop-at-point did that.

Oh, right.  Now added.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52158; Package emacs. (Tue, 07 Dec 2021 07:08:02 GMT) Full text and rfc822 format available.

Message #85 received at 52158 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: Manuel Uberti <manuel.uberti <at> inventati.org>, 52158 <at> debbugs.gnu.org,
 Dmitry Gutov <dgutov <at> yandex.ru>
Subject: Re: bug#52158: 29.0.50; Add key binding fo vc-git-stash
Date: Tue, 07 Dec 2021 08:07:12 +0100
Robert Pluim <rpluim <at> gmail.com> writes:

> BTW, the stash area bindings are all upper case, and the new ones are
> lower case. Can we make them more consistent?

Sure.  Feel free to adjust as you wish.  (Or, rather, as Dmitry wishes,
I guess. 😀)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52158; Package emacs. (Tue, 07 Dec 2021 07:20:01 GMT) Full text and rfc822 format available.

Message #88 received at 52158 <at> debbugs.gnu.org (full text, mbox):

From: Manuel Uberti <manuel.uberti <at> inventati.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Robert Pluim <rpluim <at> gmail.com>, 52158 <at> debbugs.gnu.org,
 Dmitry Gutov <dgutov <at> yandex.ru>
Subject: Re: bug#52158: 29.0.50; Add key binding fo vc-git-stash
Date: Tue, 7 Dec 2021 08:19:47 +0100
On 07/12/21 08:06, Lars Ingebrigtsen wrote:
>> I thought vc-git-stash-pop-at-point did that.
> 
> Oh, right.  Now added.

Thanks a lot, Lars!

-- 
Manuel Uberti
www.manueluberti.eu




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52158; Package emacs. (Tue, 07 Dec 2021 09:10:02 GMT) Full text and rfc822 format available.

Message #91 received at 52158 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Manuel Uberti <manuel.uberti <at> inventati.org>, 52158 <at> debbugs.gnu.org,
 Dmitry Gutov <dgutov <at> yandex.ru>
Subject: Re: bug#52158: 29.0.50; Add key binding fo vc-git-stash
Date: Tue, 07 Dec 2021 10:08:48 +0100
>>>>> On Tue, 07 Dec 2021 08:07:12 +0100, Lars Ingebrigtsen <larsi <at> gnus.org> said:

    Lars> Robert Pluim <rpluim <at> gmail.com> writes:
    >> BTW, the stash area bindings are all upper case, and the new ones are
    >> lower case. Can we make them more consistent?

    Lars> Sure.  Feel free to adjust as you wish.  (Or, rather, as Dmitry wishes,
    Lars> I guess. 😀)

Well, I could say "damn backwards compatibility" and just move your
new bindings to upper case, since they've existed for all of 2 days,
or I could boldly trample over the vc-dir map and add lower case
versions of the stash area ones. Or I could say "itʼs a prefix map,
and itʼs consistent with magit, and who uses their <shift> key these
days anyways".

Iʼm getting a strong "do nothing" feeling for the outcome here. 🙂 

Robert
-- 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52158; Package emacs. (Tue, 07 Dec 2021 12:58:02 GMT) Full text and rfc822 format available.

Message #94 received at 52158 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Lars Ingebrigtsen <larsi <at> gnus.org>, Robert Pluim <rpluim <at> gmail.com>
Cc: Manuel Uberti <manuel.uberti <at> inventati.org>, 52158 <at> debbugs.gnu.org
Subject: Re: bug#52158: 29.0.50; Add key binding fo vc-git-stash
Date: Tue, 7 Dec 2021 15:56:38 +0300
On 07.12.2021 10:07, Lars Ingebrigtsen wrote:
> Or, rather, as Dmitry wishes,
> I guess. 😀)

I'm really fine with either decision here. Not that I'm likely to use 
these bindings myself either.

Most of my efforts in the keybinding-related discussions has been spent 
on arguing against one Emacs maintainer (who worries about backward 
compatibility -- sometimes too much, IMO), and if you don't see any 
conflicts (or don't assign much importance to them), and there is a 
consensus among users -- please go ahead.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 05 Jan 2022 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 73 days ago.

Previous Next


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