unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#52074: 29.0.50; Add key binding for find-library
@ 2021-11-24  6:54 Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-11-24  7:20 ` Lars Ingebrigtsen
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-11-24  6:54 UTC (permalink / raw)
  To: 52074

Hello everyone,

I was just wondering if to anyone other than me it would make sense to have a 
default key binding for find-library. This is something I use regularly to 
explore the source code of built-in features and external packages to understand 
more about them.

In my init.el, I have this setting:

(keymap-global-set "C-h C-l" #'find-library)

I picked this key binding for mnemonic reasons (h -> help, l -> library) and 
because 'C-h C-l' seems to be unbound in emacs -Q.

What do you think?

-- 
Manuel Uberti
www.manueluberti.eu



In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.18, cairo 
version 1.16.0)
  of 2021-11-24 built on hathaway
Repository revision: d112c75f53c690e6f13ec3b340dbc384425bb04d
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'

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: Fundamental

Minor modes in effect:
   electric-pair-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
   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 message yank-media rmc puny rfc822 mml
mml-sec epa derived epg rfc6068 epg-config gnus-util rmail
rmail-loaddefs mm-decode mm-bodies mm-encode mailabbrev gmm-utils
mailheader sendmail mail-utils completion dos-w32 find-cmd grep
find-dired eieio-opt speedbar ezimage dframe shortdoc help-fns
radix-tree hl-line ibuf-ext ibuffer ibuffer-loaddefs add-log log-view
pcvs-util vc-dir ewoc pp vc-git diff-mode vc vc-dispatcher noutline
outline easy-mmode checkdoc lisp-mnt mail-parse rfc2231 rfc2047 rfc2045
mm-util ietf-drums mail-prsvr dired-x dired dired-loaddefs view
elec-pair flymake-proc flymake compile text-property-search comint
flyspell ispell goto-addr jka-compr cursor-sensor thingatpt find-func
time-date modus-vivendi-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 288911 46166)
  (symbols 48 18679 1)
  (strings 32 60963 4075)
  (string-bytes 1 2148371)
  (vectors 16 30316)
  (vector-slots 8 561302 16807)
  (floats 8 188 703)
  (intervals 56 677 0)
  (buffers 992 15))

-- 
Manuel Uberti
www.manueluberti.eu





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#52074: 29.0.50; Add key binding for find-library
  2021-11-24  6:54 bug#52074: 29.0.50; Add key binding for find-library Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-11-24  7:20 ` Lars Ingebrigtsen
  2021-11-24  7:26   ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-11-24 12:00   ` Phil Sainty
  2021-11-24 18:21 ` bug#52074: [External] : " Drew Adams
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 10+ messages in thread
From: Lars Ingebrigtsen @ 2021-11-24  7:20 UTC (permalink / raw)
  To: Manuel Uberti; +Cc: 52074

Manuel Uberti <manuel.uberti@inventati.org> writes:

> I was just wondering if to anyone other than me it would make sense to
> have a default key binding for find-library. This is something I use
> regularly to explore the source code of built-in features and external
> packages to understand more about them.

Yes, it's a useful command, so perhaps we should have a default binding
for it.

> In my init.el, I have this setting:
>
> (keymap-global-set "C-h C-l" #'find-library)
>
> I picked this key binding for mnemonic reasons (h -> help, l ->
> library) and because 'C-h C-l' seems to be unbound in emacs -Q.

Hm...  Finding a library isn't exactly a help command, so I think it
would be somewhat confusing to put it there.  But I don't have a good
suggestion for where to put otherwise.

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





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#52074: 29.0.50; Add key binding for find-library
  2021-11-24  7:20 ` Lars Ingebrigtsen
@ 2021-11-24  7:26   ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-11-24 17:16     ` Lars Ingebrigtsen
  2021-11-24 12:00   ` Phil Sainty
  1 sibling, 1 reply; 10+ messages in thread
From: Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-11-24  7:26 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 52074

On 24/11/21 08:20, Lars Ingebrigtsen wrote:
> Hm...  Finding a library isn't exactly a help command, so I think it
> would be somewhat confusing to put it there.  But I don't have a good
> suggestion for where to put otherwise.

You're right. What about using a prefix like C-x 7 and add something like:

- C-x 7 l for find-library

Then these can be considered as well:

- C-x 7 f for find-function
- C-x 7 v for find-variable

-- 
Manuel Uberti
www.manueluberti.eu





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#52074: 29.0.50; Add key binding for find-library
  2021-11-24  7:20 ` Lars Ingebrigtsen
  2021-11-24  7:26   ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-11-24 12:00   ` Phil Sainty
  1 sibling, 0 replies; 10+ messages in thread
From: Phil Sainty @ 2021-11-24 12:00 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Manuel Uberti, 52074

On 2021-11-24 20:20, Lars Ingebrigtsen wrote:
> Manuel Uberti <manuel.uberti@inventati.org> writes:
>> I picked this key binding for mnemonic reasons (h -> help, l ->
>> library) and because 'C-h C-l' seems to be unbound in emacs -Q.
> 
> Hm...  Finding a library isn't exactly a help command, so I think it
> would be somewhat confusing to put it there.  But I don't have a good
> suggestion for where to put otherwise.

Library commentaries are one of the primary sources of documentation
in Emacs, so I think it's pretty help-related.

FWIW I use this same binding, and in my mind it makes excellent sense
to use C-h C-l for `find-library' if you also have:

C-h C-v for `find-variable'
C-h C-f for `find-function'
C-h C-k for `find-function-on-key'

All of which feel (to me) analogous to C-h v, C-h f, and C-h k: Without
the Ctrl modifier you view the docstrings; with it you view the code.

(Admittedly C-h l is unconnected, but that hasn't bothered me.  
Following
my pattern that would probably be bound to `finder-commentary', but I'm
not suggesting we move `view-lossage' elsewhere.)

I guess my main point is that I do think of *all* of these things as
help-related, as I consider reading the code as just the next step up
from reading the docstrings.


-Phil






^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#52074: 29.0.50; Add key binding for find-library
  2021-11-24  7:26   ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-11-24 17:16     ` Lars Ingebrigtsen
  2021-11-24 18:29       ` Juri Linkov
  2021-11-24 18:55       ` bug#52074: [External] : " Drew Adams
  0 siblings, 2 replies; 10+ messages in thread
From: Lars Ingebrigtsen @ 2021-11-24 17:16 UTC (permalink / raw)
  To: Manuel Uberti; +Cc: 52074

Manuel Uberti <manuel.uberti@inventati.org> writes:

> You're right. What about using a prefix like C-x 7 and add something like:
>
> - C-x 7 l for find-library
>
> Then these can be considered as well:
>
> - C-x 7 f for find-function
> - C-x 7 v for find-variable

Hm...  We've got a variety of stuff on `C-x <num>', but mostly things
that deal with windows/tabs/frames.  But perhaps it might make sense to
put a `find-*' keymap there.

Phil Sainty <psainty@orcon.net.nz> writes:

> FWIW I use this same binding, and in my mind it makes excellent sense
> to use C-h C-l for `find-library' if you also have:
>
> C-h C-v for `find-variable'
> C-h C-f for `find-function'
> C-h C-k for `find-function-on-key'
>
> All of which feel (to me) analogous to C-h v, C-h f, and C-h k: Without
> the Ctrl modifier you view the docstrings; with it you view the code.

Unfortunately `C-h C-f' is taken, but this makes sense.

> (Admittedly C-h l is unconnected, but that hasn't bothered me.
> Following
> my pattern that would probably be bound to `finder-commentary', but I'm
> not suggesting we move `view-lossage' elsewhere.)
>
> I guess my main point is that I do think of *all* of these things as
> help-related, as I consider reading the code as just the next step up
> from reading the docstrings.

That's a good point.

I doubt `C-h C-f' is used that often, so perhaps we could consider
moving it and binding these four find-* commands to the `C-h' map.

Anybody else with opinions or ideas here?

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





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#52074: [External] : bug#52074: 29.0.50; Add key binding for find-library
  2021-11-24  6:54 bug#52074: 29.0.50; Add key binding for find-library Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-11-24  7:20 ` Lars Ingebrigtsen
@ 2021-11-24 18:21 ` Drew Adams
  2021-11-24 18:32 ` Drew Adams
  2021-11-24 21:06 ` Drew Adams
  3 siblings, 0 replies; 10+ messages in thread
From: Drew Adams @ 2021-11-24 18:21 UTC (permalink / raw)
  To: Manuel Uberti, 52074@debbugs.gnu.org

> I was just wondering if to anyone other than me it would make sense to have
> a default key binding for find-library. This is something I use regularly to
> explore the source code of built-in features and external packages to
> understand more about them.
> 
> In my init.el, I have this setting:
> (keymap-global-set "C-h C-l" #'find-library)
> 
> I picked this key binding for mnemonic reasons (h -> help, l -> library) and
> because 'C-h C-l' seems to be unbound in emacs -Q.
> 
> What do you think?

Yes. See bug #51240. I use `C-x 4 l' for my
`find-library-other-window'.  (I almost never
want to switch to the library in the same window.)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#52074: 29.0.50; Add key binding for find-library
  2021-11-24 17:16     ` Lars Ingebrigtsen
@ 2021-11-24 18:29       ` Juri Linkov
  2021-11-24 18:55       ` bug#52074: [External] : " Drew Adams
  1 sibling, 0 replies; 10+ messages in thread
From: Juri Linkov @ 2021-11-24 18:29 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Manuel Uberti, 52074

forcemerge 51240 52074
quit

> Anybody else with opinions or ideas here?

This is duplicate of https://debbugs.gnu.org/51240
where both using the C-h keymap or C-x L/C-x 4 L/C-x 5 L
were proposed without a conclusive decision which one to prefer.





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#52074: [External] : bug#52074: 29.0.50; Add key binding for find-library
  2021-11-24  6:54 bug#52074: 29.0.50; Add key binding for find-library Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-11-24  7:20 ` Lars Ingebrigtsen
  2021-11-24 18:21 ` bug#52074: [External] : " Drew Adams
@ 2021-11-24 18:32 ` Drew Adams
  2021-11-24 21:06 ` Drew Adams
  3 siblings, 0 replies; 10+ messages in thread
From: Drew Adams @ 2021-11-24 18:32 UTC (permalink / raw)
  To: Manuel Uberti, 52074@debbugs.gnu.org

> Yes. See bug #51240.

Even that one was a duplicate of #26712? and #2270.
Those haven't gotten anywhere.  But maybe you'll have 
better luck...  This goes back at least 14 years.

See, for example: 

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26712#8


^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#52074: [External] : bug#52074: 29.0.50; Add key binding for find-library
  2021-11-24 17:16     ` Lars Ingebrigtsen
  2021-11-24 18:29       ` Juri Linkov
@ 2021-11-24 18:55       ` Drew Adams
  1 sibling, 0 replies; 10+ messages in thread
From: Drew Adams @ 2021-11-24 18:55 UTC (permalink / raw)
  To: Lars Ingebrigtsen, Manuel Uberti; +Cc: 52074@debbugs.gnu.org

> Anybody else with opinions or ideas here?

Yes, and they've been expressed many times, in
the multiple emacs-devel and duplicate bug threads
about this.





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#52074: [External] : bug#52074: 29.0.50; Add key binding for find-library
  2021-11-24  6:54 bug#52074: 29.0.50; Add key binding for find-library Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
                   ` (2 preceding siblings ...)
  2021-11-24 18:32 ` Drew Adams
@ 2021-11-24 21:06 ` Drew Adams
  3 siblings, 0 replies; 10+ messages in thread
From: Drew Adams @ 2021-11-24 21:06 UTC (permalink / raw)
  To: Phil Sainty, Lars Ingebrigtsen; +Cc: Manuel Uberti, 52074@debbugs.gnu.org

[Sending again.  Didn't show up in the bug list for some reason.] 

> Library commentaries are one of the primary sources of documentation
> in Emacs, so I think it's pretty help-related.

True.  But we also have `finder-commentary' for that aspect.

> FWIW I use this same binding, and in my mind it makes excellent sense
> to use C-h C-l for `find-library' if you also have:
> 
> C-h C-v for `find-variable'
> C-h C-f for `find-function'
> C-h C-k for `find-function-on-key'
> 
> All of which feel (to me) analogous to C-h v, C-h f, and C-h k: Without
> the Ctrl modifier you view the docstrings; with it you view the code.
> 
> (Admittedly C-h l is unconnected, but that hasn't bothered me.
> Following
> my pattern that would probably be bound to `finder-commentary', but I'm
> not suggesting we move `view-lossage' elsewhere.)
> 
> I guess my main point is that I do think of *all* of these things as
> help-related, as I consider reading the code as just the next step up
> from reading the docstrings.

It's good to discuss this, and I'm glad to see
people giving _reasons_ for proposals/opinions.
I wish that were more often the case.

To my mind `find-library' fits most closely with
`find-file'.  I put my `other-window' version on
`C-x 4 l' as analogy to `C-x 4 f'.





^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-11-24 21:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-24  6:54 bug#52074: 29.0.50; Add key binding for find-library Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-24  7:20 ` Lars Ingebrigtsen
2021-11-24  7:26   ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-24 17:16     ` Lars Ingebrigtsen
2021-11-24 18:29       ` Juri Linkov
2021-11-24 18:55       ` bug#52074: [External] : " Drew Adams
2021-11-24 12:00   ` Phil Sainty
2021-11-24 18:21 ` bug#52074: [External] : " Drew Adams
2021-11-24 18:32 ` Drew Adams
2021-11-24 21:06 ` Drew Adams

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).