unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: master f0cd91067d: Improve `C-h b' output for remapped commands.
       [not found] ` <20220609144240.9D08DC01682@vcs2.savannah.gnu.org>
@ 2022-06-09 16:44   ` Stefan Monnier
  2022-06-09 17:45     ` [External] : " Drew Adams
  2022-06-10  9:07     ` Lars Ingebrigtsen
  0 siblings, 2 replies; 10+ messages in thread
From: Stefan Monnier @ 2022-06-09 16:44 UTC (permalink / raw)
  To: emacs-devel; +Cc: Lars Ingebrigtsen

>     <remap> <display-buffer>                ido-display-buffer
>     C-x 4 C-o                               display-buffer
>     <remap> <display-buffer-other-frame>    ido-display-buffer-other-frame
>     C-x 5 C-o                               display-buffer-other-frame

Nice.  But could we get rid of the duplication, as in:

    <remap> <display-buffer>                ido-display-buffer
      C-x 4 C-o
    <remap> <display-buffer-other-frame>    ido-display-buffer-other-frame
      C-x 5 C-o

or maybe even make it fit on a single line, as in something like:

    <remap> <display-buffer> (C-x 4 C-o)             ido-display-buffer
    <remap> <display-buffer-other-frame> (C-x 5 C-o) ido-display-buffer-other-frame


-- Stefan




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

* RE: [External] : Re: master f0cd91067d: Improve `C-h b' output for remapped commands.
  2022-06-09 16:44   ` master f0cd91067d: Improve `C-h b' output for remapped commands Stefan Monnier
@ 2022-06-09 17:45     ` Drew Adams
  2022-06-10  9:07     ` Lars Ingebrigtsen
  1 sibling, 0 replies; 10+ messages in thread
From: Drew Adams @ 2022-06-09 17:45 UTC (permalink / raw)
  To: Stefan Monnier, emacs-devel@gnu.org; +Cc: Lars Ingebrigtsen

See also bug #14084.

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=14084




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

* Re: master f0cd91067d: Improve `C-h b' output for remapped commands.
  2022-06-09 16:44   ` master f0cd91067d: Improve `C-h b' output for remapped commands Stefan Monnier
  2022-06-09 17:45     ` [External] : " Drew Adams
@ 2022-06-10  9:07     ` Lars Ingebrigtsen
  2022-06-10 11:23       ` Stefan Kangas
  2022-06-10 13:01       ` Stefan Monnier
  1 sibling, 2 replies; 10+ messages in thread
From: Lars Ingebrigtsen @ 2022-06-10  9:07 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>     <remap> <display-buffer>                ido-display-buffer
>>     C-x 4 C-o                               display-buffer
>>     <remap> <display-buffer-other-frame>    ido-display-buffer-other-frame
>>     C-x 5 C-o                               display-buffer-other-frame
>
> Nice.  But could we get rid of the duplication, as in:
>
>     <remap> <display-buffer>                ido-display-buffer
>       C-x 4 C-o
>     <remap> <display-buffer-other-frame>    ido-display-buffer-other-frame
>       C-x 5 C-o

Hm...  looks slightly like an error.

> or maybe even make it fit on a single line, as in something like:
>
>     <remap> <display-buffer> (C-x 4 C-o)             ido-display-buffer
>     <remap> <display-buffer-other-frame> (C-x 5 C-o) ido-display-buffer-other-frame

The problem is that these remap things are already very wide, and this
makes them even wider.

Hm...  What about just flipping things around and using our words?  That
would also make the lines shorter.  I.e.,

     C-x 4 C-o     ido-display-buffer
       (Remapped via <remap> <display-buffer>.)
     C-x 5 C-o     ido-display-buffer-other-frame
       (Remapped via <remap> <display-buffer-other-frame>.)

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



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

* Re: master f0cd91067d: Improve `C-h b' output for remapped commands.
  2022-06-10  9:07     ` Lars Ingebrigtsen
@ 2022-06-10 11:23       ` Stefan Kangas
  2022-06-10 12:07         ` Michael Heerdegen
  2022-06-10 13:01       ` Stefan Monnier
  1 sibling, 1 reply; 10+ messages in thread
From: Stefan Kangas @ 2022-06-10 11:23 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Stefan Monnier, Emacs developers

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Hm...  What about just flipping things around and using our words?  That
> would also make the lines shorter.  I.e.,
>
>      C-x 4 C-o     ido-display-buffer
>        (Remapped via <remap> <display-buffer>.)

To avoid saying "remap" twice, how about:

       (Remapped from display-buffer.)

We could dynamically put it on the same line or the next depending on
the length.



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

* Re: master f0cd91067d: Improve `C-h b' output for remapped commands.
  2022-06-10 11:23       ` Stefan Kangas
@ 2022-06-10 12:07         ` Michael Heerdegen
  2022-06-10 13:02           ` Po Lu
  0 siblings, 1 reply; 10+ messages in thread
From: Michael Heerdegen @ 2022-06-10 12:07 UTC (permalink / raw)
  To: emacs-devel

Stefan Kangas <stefan@marxist.se> writes:

> Lars Ingebrigtsen <larsi@gnus.org> writes:
>
> > Hm...  What about just flipping things around and using our words?  That
> > would also make the lines shorter.  I.e.,
> >
> >      C-x 4 C-o     ido-display-buffer
> >        (Remapped via <remap> <display-buffer>.)
>
> To avoid saying "remap" twice, how about:
>
>        (Remapped from display-buffer.)

I would prefer

  (via <remap> <display-buffer>)

instead if we want to get rid of the doubled word "remap".  For some
reason I find your version harder to understand.

Maybe because there are a lot of components involved: the explained key
binding, the remapping key binding, the command remapped, and the
"target" command - and it's not trivial to get them into the right order
in my head to understand what is going on.

Michael.




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

* Re: master f0cd91067d: Improve `C-h b' output for remapped commands.
  2022-06-10  9:07     ` Lars Ingebrigtsen
  2022-06-10 11:23       ` Stefan Kangas
@ 2022-06-10 13:01       ` Stefan Monnier
  2022-06-11 10:48         ` Lars Ingebrigtsen
  1 sibling, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2022-06-10 13:01 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: emacs-devel

> Hm...  What about just flipping things around and using our words?
> That would also make the lines shorter.  I.e.,
>
>      C-x 4 C-o     ido-display-buffer
>        (Remapped via <remap> <display-buffer>.)
>      C-x 5 C-o     ido-display-buffer-other-frame
>        (Remapped via <remap> <display-buffer-other-frame>.)

Sounds good to me.  I don't have an opinion on the specific wording
within the parens, but I'll mention that a single `remap display-buffer`
can cause various key bindings to be remapped, which is why I suggested

    <remap> <display-buffer>                ido-display-buffer
      C-x 4 C-o

which naturally generalizes to things like:

    <remap> <display-buffer>                ido-display-buffer
      C-x 4 C-o, C-c C-o C-o

Also, a remap entry can have 0 corresponding keybindings, in which case
we should keep something like

    <remap> <display-buffer>                ido-display-buffer


-- Stefan




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

* Re: master f0cd91067d: Improve `C-h b' output for remapped commands.
  2022-06-10 12:07         ` Michael Heerdegen
@ 2022-06-10 13:02           ` Po Lu
  2022-06-10 13:13             ` Michael Heerdegen
  0 siblings, 1 reply; 10+ messages in thread
From: Po Lu @ 2022-06-10 13:02 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: emacs-devel

Michael Heerdegen <michael_heerdegen@web.de> writes:

> I would prefer
>
>   (via <remap> <display-buffer>)
>
> instead if we want to get rid of the doubled word "remap".  For some
> reason I find your version harder to understand.

I think Lars' version is better, since it both makes clear how the key
binding was set, and what <remap> means.



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

* Re: master f0cd91067d: Improve `C-h b' output for remapped commands.
  2022-06-10 13:02           ` Po Lu
@ 2022-06-10 13:13             ` Michael Heerdegen
  2022-06-11 10:36               ` Lars Ingebrigtsen
  0 siblings, 1 reply; 10+ messages in thread
From: Michael Heerdegen @ 2022-06-10 13:13 UTC (permalink / raw)
  To: Po Lu; +Cc: emacs-devel

Po Lu <luangruo@yahoo.com> writes:

> I think Lars' version is better, since it both makes clear how the key
> binding was set, and what <remap> means.

I'm also ok with Lars' version - would remove the the final dot though,
like

     C-x 4 C-o     ido-display-buffer
       (Remapped via <remap> <display-buffer>)
     C-x 5 C-o     ido-display-buffer-other-frame
       (Remapped via <remap> <display-buffer-other-frame>)

Michael.



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

* Re: master f0cd91067d: Improve `C-h b' output for remapped commands.
  2022-06-10 13:13             ` Michael Heerdegen
@ 2022-06-11 10:36               ` Lars Ingebrigtsen
  0 siblings, 0 replies; 10+ messages in thread
From: Lars Ingebrigtsen @ 2022-06-11 10:36 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: Po Lu, emacs-devel

Michael Heerdegen <michael_heerdegen@web.de> writes:

> I'm also ok with Lars' version - would remove the the final dot though,
> like
>
>      C-x 4 C-o     ido-display-buffer
>        (Remapped via <remap> <display-buffer>)
>      C-x 5 C-o     ido-display-buffer-other-frame
>        (Remapped via <remap> <display-buffer-other-frame>)

I've now gone with this.  I agree with Stefan that it would be nice to
avoid the repetition of "remap", but the variants suggested all seem a
bit obscure to me -- i.e., they don't really explain what we're trying
to convey unless you already know about remapped commands, while
spelling it out in this way should give the users a hint they can look
up in the manual.

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



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

* Re: master f0cd91067d: Improve `C-h b' output for remapped commands.
  2022-06-10 13:01       ` Stefan Monnier
@ 2022-06-11 10:48         ` Lars Ingebrigtsen
  0 siblings, 0 replies; 10+ messages in thread
From: Lars Ingebrigtsen @ 2022-06-11 10:48 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Sounds good to me.  I don't have an opinion on the specific wording
> within the parens, but I'll mention that a single `remap display-buffer`
> can cause various key bindings to be remapped, which is why I suggested
>
>     <remap> <display-buffer>                ido-display-buffer
>       C-x 4 C-o
>
> which naturally generalizes to things like:
>
>     <remap> <display-buffer>                ido-display-buffer
>       C-x 4 C-o, C-c C-o C-o

Oh yeah, I only show the first binding now.  Hm...  On the other hand,
we do show those other bindings (for `display-buffer') elsewhere in the
buffer, but it'd be nice to show them all here, too.

> Also, a remap entry can have 0 corresponding keybindings, in which case
> we should keep something like
>
>     <remap> <display-buffer>                ido-display-buffer

Yes, those are displayed as before.

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



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

end of thread, other threads:[~2022-06-11 10:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <165478576035.737.9544262446139689575@vcs2.savannah.gnu.org>
     [not found] ` <20220609144240.9D08DC01682@vcs2.savannah.gnu.org>
2022-06-09 16:44   ` master f0cd91067d: Improve `C-h b' output for remapped commands Stefan Monnier
2022-06-09 17:45     ` [External] : " Drew Adams
2022-06-10  9:07     ` Lars Ingebrigtsen
2022-06-10 11:23       ` Stefan Kangas
2022-06-10 12:07         ` Michael Heerdegen
2022-06-10 13:02           ` Po Lu
2022-06-10 13:13             ` Michael Heerdegen
2022-06-11 10:36               ` Lars Ingebrigtsen
2022-06-10 13:01       ` Stefan Monnier
2022-06-11 10:48         ` Lars Ingebrigtsen

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