* bug#52158: 29.0.50; Add key binding fo vc-git-stash
@ 2021-11-28 8:36 Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-28 13:51 ` Lars Ingebrigtsen
0 siblings, 1 reply; 28+ messages in thread
From: Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-11-28 8:36 UTC (permalink / raw)
To: 52158
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
^ permalink raw reply [flat|nested] 28+ messages in thread
* bug#52158: 29.0.50; Add key binding fo vc-git-stash
2021-11-28 8:36 bug#52158: 29.0.50; Add key binding fo vc-git-stash Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-11-28 13:51 ` Lars Ingebrigtsen
2021-11-28 13:55 ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 28+ messages in thread
From: Lars Ingebrigtsen @ 2021-11-28 13:51 UTC (permalink / raw)
To: Manuel Uberti; +Cc: 52158
Manuel Uberti <manuel.uberti@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
^ permalink raw reply [flat|nested] 28+ messages in thread
* bug#52158: 29.0.50; Add key binding fo vc-git-stash
2021-11-28 13:51 ` Lars Ingebrigtsen
@ 2021-11-28 13:55 ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-28 14:12 ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 28+ messages in thread
From: Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-11-28 13:55 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 52158
On 28/11/21 14:51, Lars Ingebrigtsen wrote:
> Manuel Uberti <manuel.uberti@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
^ permalink raw reply [flat|nested] 28+ messages in thread
* bug#52158: 29.0.50; Add key binding fo vc-git-stash
2021-11-28 13:55 ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-11-28 14:12 ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-29 13:58 ` Lars Ingebrigtsen
0 siblings, 1 reply; 28+ messages in thread
From: Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-11-28 14:12 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 52158
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
^ permalink raw reply [flat|nested] 28+ messages in thread
* bug#52158: 29.0.50; Add key binding fo vc-git-stash
2021-11-28 14:12 ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-11-29 13:58 ` Lars Ingebrigtsen
2021-11-29 14:03 ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-29 14:12 ` Robert Pluim
0 siblings, 2 replies; 28+ messages in thread
From: Lars Ingebrigtsen @ 2021-11-29 13:58 UTC (permalink / raw)
To: Manuel Uberti; +Cc: 52158
Manuel Uberti <manuel.uberti@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
^ permalink raw reply [flat|nested] 28+ messages in thread
* bug#52158: 29.0.50; Add key binding fo vc-git-stash
2021-11-29 13:58 ` Lars Ingebrigtsen
@ 2021-11-29 14:03 ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-29 14:12 ` Robert Pluim
1 sibling, 0 replies; 28+ messages in thread
From: Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-11-29 14:03 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 52158
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
^ permalink raw reply [flat|nested] 28+ messages in thread
* bug#52158: 29.0.50; Add key binding fo vc-git-stash
2021-11-29 13:58 ` Lars Ingebrigtsen
2021-11-29 14:03 ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-11-29 14:12 ` Robert Pluim
2021-11-29 14:18 ` Lars Ingebrigtsen
1 sibling, 1 reply; 28+ messages in thread
From: Robert Pluim @ 2021-11-29 14:12 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Manuel Uberti, 52158
>>>>> On Mon, 29 Nov 2021 14:58:35 +0100, Lars Ingebrigtsen <larsi@gnus.org> said:
Lars> Manuel Uberti <manuel.uberti@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
--
^ permalink raw reply [flat|nested] 28+ messages in thread
* bug#52158: 29.0.50; Add key binding fo vc-git-stash
2021-11-29 14:12 ` Robert Pluim
@ 2021-11-29 14:18 ` Lars Ingebrigtsen
2021-11-29 14:30 ` Robert Pluim
2021-11-29 17:12 ` Juri Linkov
0 siblings, 2 replies; 28+ messages in thread
From: Lars Ingebrigtsen @ 2021-11-29 14:18 UTC (permalink / raw)
To: Robert Pluim; +Cc: Manuel Uberti, 52158
Robert Pluim <rpluim@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
^ permalink raw reply [flat|nested] 28+ messages in thread
* bug#52158: 29.0.50; Add key binding fo vc-git-stash
2021-11-29 14:18 ` Lars Ingebrigtsen
@ 2021-11-29 14:30 ` Robert Pluim
2021-11-29 14:40 ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-29 15:32 ` Lars Ingebrigtsen
2021-11-29 17:12 ` Juri Linkov
1 sibling, 2 replies; 28+ messages in thread
From: Robert Pluim @ 2021-11-29 14:30 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Manuel Uberti, 52158
>>>>> On Mon, 29 Nov 2021 15:18:11 +0100, Lars Ingebrigtsen <larsi@gnus.org> said:
Lars> Robert Pluim <rpluim@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
--
^ permalink raw reply [flat|nested] 28+ messages in thread
* bug#52158: 29.0.50; Add key binding fo vc-git-stash
2021-11-29 14:30 ` Robert Pluim
@ 2021-11-29 14:40 ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-29 15:32 ` Lars Ingebrigtsen
1 sibling, 0 replies; 28+ messages in thread
From: Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-11-29 14:40 UTC (permalink / raw)
To: Robert Pluim, Lars Ingebrigtsen; +Cc: 52158
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
^ permalink raw reply [flat|nested] 28+ messages in thread
* bug#52158: 29.0.50; Add key binding fo vc-git-stash
2021-11-29 14:30 ` Robert Pluim
2021-11-29 14:40 ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-11-29 15:32 ` Lars Ingebrigtsen
2021-11-29 22:16 ` Dmitry Gutov
1 sibling, 1 reply; 28+ messages in thread
From: Lars Ingebrigtsen @ 2021-11-29 15:32 UTC (permalink / raw)
To: Robert Pluim; +Cc: Manuel Uberti, 52158, Dmitry Gutov
Robert Pluim <rpluim@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
^ permalink raw reply [flat|nested] 28+ messages in thread
* bug#52158: 29.0.50; Add key binding fo vc-git-stash
2021-11-29 14:18 ` Lars Ingebrigtsen
2021-11-29 14:30 ` Robert Pluim
@ 2021-11-29 17:12 ` Juri Linkov
2021-11-29 18:46 ` Lars Ingebrigtsen
1 sibling, 1 reply; 28+ messages in thread
From: Juri Linkov @ 2021-11-29 17:12 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Robert Pluim, Manuel Uberti, 52158
> 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.
^ permalink raw reply [flat|nested] 28+ messages in thread
* bug#52158: 29.0.50; Add key binding fo vc-git-stash
2021-11-29 17:12 ` Juri Linkov
@ 2021-11-29 18:46 ` Lars Ingebrigtsen
0 siblings, 0 replies; 28+ messages in thread
From: Lars Ingebrigtsen @ 2021-11-29 18:46 UTC (permalink / raw)
To: Juri Linkov; +Cc: Robert Pluim, Manuel Uberti, 52158
Juri Linkov <juri@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
^ permalink raw reply [flat|nested] 28+ messages in thread
* bug#52158: 29.0.50; Add key binding fo vc-git-stash
2021-11-29 15:32 ` Lars Ingebrigtsen
@ 2021-11-29 22:16 ` Dmitry Gutov
2021-11-30 12:59 ` Lars Ingebrigtsen
0 siblings, 1 reply; 28+ messages in thread
From: Dmitry Gutov @ 2021-11-29 22:16 UTC (permalink / raw)
To: Lars Ingebrigtsen, Robert Pluim; +Cc: Manuel Uberti, 52158
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?
^ permalink raw reply [flat|nested] 28+ messages in thread
* bug#52158: 29.0.50; Add key binding fo vc-git-stash
2021-11-29 22:16 ` Dmitry Gutov
@ 2021-11-30 12:59 ` Lars Ingebrigtsen
2021-12-06 1:00 ` Dmitry Gutov
0 siblings, 1 reply; 28+ messages in thread
From: Lars Ingebrigtsen @ 2021-11-30 12:59 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: Robert Pluim, Manuel Uberti, 52158
Dmitry Gutov <dgutov@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
^ permalink raw reply [flat|nested] 28+ messages in thread
* bug#52158: 29.0.50; Add key binding fo vc-git-stash
2021-11-30 12:59 ` Lars Ingebrigtsen
@ 2021-12-06 1:00 ` Dmitry Gutov
2021-12-06 5:42 ` Lars Ingebrigtsen
0 siblings, 1 reply; 28+ messages in thread
From: Dmitry Gutov @ 2021-12-06 1:00 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Robert Pluim, Manuel Uberti, 52158
On 30.11.2021 15:59, Lars Ingebrigtsen wrote:
> Dmitry Gutov<dgutov@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).
^ permalink raw reply [flat|nested] 28+ messages in thread
* bug#52158: 29.0.50; Add key binding fo vc-git-stash
2021-12-06 1:00 ` Dmitry Gutov
@ 2021-12-06 5:42 ` Lars Ingebrigtsen
2021-12-06 6:29 ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 28+ messages in thread
From: Lars Ingebrigtsen @ 2021-12-06 5:42 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: Robert Pluim, Manuel Uberti, 52158
Dmitry Gutov <dgutov@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
^ permalink raw reply [flat|nested] 28+ messages in thread
* bug#52158: 29.0.50; Add key binding fo vc-git-stash
2021-12-06 5:42 ` Lars Ingebrigtsen
@ 2021-12-06 6:29 ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-06 6:31 ` Lars Ingebrigtsen
2021-12-06 17:32 ` Juri Linkov
0 siblings, 2 replies; 28+ messages in thread
From: Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-12-06 6:29 UTC (permalink / raw)
To: Lars Ingebrigtsen, Dmitry Gutov; +Cc: Robert Pluim, 52158
On 06/12/21 06:42, Lars Ingebrigtsen wrote:
> Dmitry Gutov <dgutov@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
^ permalink raw reply [flat|nested] 28+ messages in thread
* bug#52158: 29.0.50; Add key binding fo vc-git-stash
2021-12-06 6:29 ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-12-06 6:31 ` Lars Ingebrigtsen
2021-12-06 6:32 ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-06 17:32 ` Juri Linkov
1 sibling, 1 reply; 28+ messages in thread
From: Lars Ingebrigtsen @ 2021-12-06 6:31 UTC (permalink / raw)
To: Manuel Uberti; +Cc: Robert Pluim, 52158, Dmitry Gutov
Manuel Uberti <manuel.uberti@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
^ permalink raw reply [flat|nested] 28+ messages in thread
* bug#52158: 29.0.50; Add key binding fo vc-git-stash
2021-12-06 6:31 ` Lars Ingebrigtsen
@ 2021-12-06 6:32 ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-06 8:58 ` Robert Pluim
2021-12-07 7:06 ` Lars Ingebrigtsen
0 siblings, 2 replies; 28+ messages in thread
From: Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-12-06 6:32 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Robert Pluim, 52158, Dmitry Gutov
On 06/12/21 07:31, Lars Ingebrigtsen wrote:
> Manuel Uberti <manuel.uberti@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
^ permalink raw reply [flat|nested] 28+ messages in thread
* bug#52158: 29.0.50; Add key binding fo vc-git-stash
2021-12-06 6:32 ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-12-06 8:58 ` Robert Pluim
2021-12-07 7:07 ` Lars Ingebrigtsen
2021-12-07 7:06 ` Lars Ingebrigtsen
1 sibling, 1 reply; 28+ messages in thread
From: Robert Pluim @ 2021-12-06 8:58 UTC (permalink / raw)
To: Manuel Uberti; +Cc: Lars Ingebrigtsen, 52158, Dmitry Gutov
>>>>> On Mon, 6 Dec 2021 07:32:33 +0100, Manuel Uberti <manuel.uberti@inventati.org> said:
Manuel> On 06/12/21 07:31, Lars Ingebrigtsen wrote:
>> Manuel Uberti <manuel.uberti@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
--
^ permalink raw reply [flat|nested] 28+ messages in thread
* bug#52158: 29.0.50; Add key binding fo vc-git-stash
2021-12-06 6:29 ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-06 6:31 ` Lars Ingebrigtsen
@ 2021-12-06 17:32 ` Juri Linkov
2021-12-07 5:06 ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
1 sibling, 1 reply; 28+ messages in thread
From: Juri Linkov @ 2021-12-06 17:32 UTC (permalink / raw)
To: 52158; +Cc: larsi, manuel.uberti, rpluim, dgutov
> 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.
^ permalink raw reply [flat|nested] 28+ messages in thread
* bug#52158: 29.0.50; Add key binding fo vc-git-stash
2021-12-06 17:32 ` Juri Linkov
@ 2021-12-07 5:06 ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 0 replies; 28+ messages in thread
From: Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-12-07 5:06 UTC (permalink / raw)
To: juri, 52158; +Cc: larsi, rpluim, dgutov
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
^ permalink raw reply [flat|nested] 28+ messages in thread
* bug#52158: 29.0.50; Add key binding fo vc-git-stash
2021-12-06 6:32 ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-06 8:58 ` Robert Pluim
@ 2021-12-07 7:06 ` Lars Ingebrigtsen
2021-12-07 7:19 ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
1 sibling, 1 reply; 28+ messages in thread
From: Lars Ingebrigtsen @ 2021-12-07 7:06 UTC (permalink / raw)
To: Manuel Uberti; +Cc: Robert Pluim, 52158, Dmitry Gutov
Manuel Uberti <manuel.uberti@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
^ permalink raw reply [flat|nested] 28+ messages in thread
* bug#52158: 29.0.50; Add key binding fo vc-git-stash
2021-12-06 8:58 ` Robert Pluim
@ 2021-12-07 7:07 ` Lars Ingebrigtsen
2021-12-07 9:08 ` Robert Pluim
2021-12-07 12:56 ` Dmitry Gutov
0 siblings, 2 replies; 28+ messages in thread
From: Lars Ingebrigtsen @ 2021-12-07 7:07 UTC (permalink / raw)
To: Robert Pluim; +Cc: Manuel Uberti, 52158, Dmitry Gutov
Robert Pluim <rpluim@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
^ permalink raw reply [flat|nested] 28+ messages in thread
* bug#52158: 29.0.50; Add key binding fo vc-git-stash
2021-12-07 7:06 ` Lars Ingebrigtsen
@ 2021-12-07 7:19 ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 0 replies; 28+ messages in thread
From: Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-12-07 7:19 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Robert Pluim, 52158, Dmitry Gutov
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
^ permalink raw reply [flat|nested] 28+ messages in thread
* bug#52158: 29.0.50; Add key binding fo vc-git-stash
2021-12-07 7:07 ` Lars Ingebrigtsen
@ 2021-12-07 9:08 ` Robert Pluim
2021-12-07 12:56 ` Dmitry Gutov
1 sibling, 0 replies; 28+ messages in thread
From: Robert Pluim @ 2021-12-07 9:08 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Manuel Uberti, 52158, Dmitry Gutov
>>>>> On Tue, 07 Dec 2021 08:07:12 +0100, Lars Ingebrigtsen <larsi@gnus.org> said:
Lars> Robert Pluim <rpluim@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
--
^ permalink raw reply [flat|nested] 28+ messages in thread
* bug#52158: 29.0.50; Add key binding fo vc-git-stash
2021-12-07 7:07 ` Lars Ingebrigtsen
2021-12-07 9:08 ` Robert Pluim
@ 2021-12-07 12:56 ` Dmitry Gutov
1 sibling, 0 replies; 28+ messages in thread
From: Dmitry Gutov @ 2021-12-07 12:56 UTC (permalink / raw)
To: Lars Ingebrigtsen, Robert Pluim; +Cc: Manuel Uberti, 52158
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.
^ permalink raw reply [flat|nested] 28+ messages in thread
end of thread, other threads:[~2021-12-07 12:56 UTC | newest]
Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-28 8:36 bug#52158: 29.0.50; Add key binding fo vc-git-stash Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-28 13:51 ` Lars Ingebrigtsen
2021-11-28 13:55 ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-28 14:12 ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-29 13:58 ` Lars Ingebrigtsen
2021-11-29 14:03 ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-29 14:12 ` Robert Pluim
2021-11-29 14:18 ` Lars Ingebrigtsen
2021-11-29 14:30 ` Robert Pluim
2021-11-29 14:40 ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-29 15:32 ` Lars Ingebrigtsen
2021-11-29 22:16 ` Dmitry Gutov
2021-11-30 12:59 ` Lars Ingebrigtsen
2021-12-06 1:00 ` Dmitry Gutov
2021-12-06 5:42 ` Lars Ingebrigtsen
2021-12-06 6:29 ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-06 6:31 ` Lars Ingebrigtsen
2021-12-06 6:32 ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-06 8:58 ` Robert Pluim
2021-12-07 7:07 ` Lars Ingebrigtsen
2021-12-07 9:08 ` Robert Pluim
2021-12-07 12:56 ` Dmitry Gutov
2021-12-07 7:06 ` Lars Ingebrigtsen
2021-12-07 7:19 ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-06 17:32 ` Juri Linkov
2021-12-07 5:06 ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-29 17:12 ` Juri Linkov
2021-11-29 18:46 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.