* bug#16071: Erc re-binds [home] even if not beginning-of-line
@ 2013-12-06 11:37 Ivan Shmakov
2013-12-06 17:59 ` Stefan Monnier
2015-12-27 21:07 ` Lars Ingebrigtsen
0 siblings, 2 replies; 5+ messages in thread
From: Ivan Shmakov @ 2013-12-06 11:37 UTC (permalink / raw
To: 16071
Package: emacs
Severity: minor
As of 0dd4ebbcf94d, erc-mode-map unconditionally binds both C-a
and Home to erc-bol. Which is problematic, as:
• either (or both) of them may happen to /not/ be bound to
beginning-of-line (as, for example, when using an older,
Emacs 20-or-so, binding of Home to beginning-of-buffer);
• the user may’ve previously bound additional key sequences to
beginning-of-line, which are not rebound by the current
erc-mode-map.
It’s arguably more semantically correct (and convenient) to
re-map beginning-of-line to erc-bol, instead of using an
explicit list of key sequences to be bound to erc-bol.
--
FSF associate member #7257
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#16071: Erc re-binds [home] even if not beginning-of-line
2013-12-06 11:37 bug#16071: Erc re-binds [home] even if not beginning-of-line Ivan Shmakov
@ 2013-12-06 17:59 ` Stefan Monnier
2013-12-06 18:26 ` Ivan Shmakov
2015-12-27 21:07 ` Lars Ingebrigtsen
1 sibling, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2013-12-06 17:59 UTC (permalink / raw
To: Ivan Shmakov; +Cc: 16071
> As of 0dd4ebbcf94d, erc-mode-map unconditionally binds both C-a
> and Home to erc-bol. Which is problematic, as:
Good points.
But please note that doing it with remap is intrusive because the user
may actually like to have a key bound to beginning-of-line.
I guess rebinding with substitute-key-definition is OK.
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#16071: Erc re-binds [home] even if not beginning-of-line
2013-12-06 17:59 ` Stefan Monnier
@ 2013-12-06 18:26 ` Ivan Shmakov
2013-12-07 3:17 ` Stefan Monnier
0 siblings, 1 reply; 5+ messages in thread
From: Ivan Shmakov @ 2013-12-06 18:26 UTC (permalink / raw
To: 16071
>>>>> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> As of 0dd4ebbcf94d, erc-mode-map unconditionally binds both C-a and
>> Home to erc-bol. Which is problematic, as:
> Good points.
> But please note that doing it with remap is intrusive because the
> user may actually like to have a key bound to beginning-of-line.
Indeed, it’s intrusive either way.
> I guess rebinding with substitute-key-definition is OK.
Does that mean binding only to the sequences which are
beginning-of-line in global-map /and/ also not overridden by the
user in erc-mode-map, or something like that? As per my reading
of substitute-key-definition, it implies more or less the same
effect as the use of [remap] with define-key.
--
FSF associate member #7257
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#16071: Erc re-binds [home] even if not beginning-of-line
2013-12-06 18:26 ` Ivan Shmakov
@ 2013-12-07 3:17 ` Stefan Monnier
0 siblings, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2013-12-07 3:17 UTC (permalink / raw
To: Ivan Shmakov; +Cc: 16071
>> I guess rebinding with substitute-key-definition is OK.
> Does that mean binding only to the sequences which are
> beginning-of-line in global-map /and/ also not overridden by the
> user in erc-mode-map, or something like that?
Yes.
> As per my reading of substitute-key-definition, it implies more
> or less the same effect as the use of [remap] with define-key.
No: people can still bind a key to beginning-of-line in erc-mode-map and
it won't be remapped.
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#16071: Erc re-binds [home] even if not beginning-of-line
2013-12-06 11:37 bug#16071: Erc re-binds [home] even if not beginning-of-line Ivan Shmakov
2013-12-06 17:59 ` Stefan Monnier
@ 2015-12-27 21:07 ` Lars Ingebrigtsen
1 sibling, 0 replies; 5+ messages in thread
From: Lars Ingebrigtsen @ 2015-12-27 21:07 UTC (permalink / raw
To: Ivan Shmakov; +Cc: 16071
Ivan Shmakov <ivan@siamics.net> writes:
> As of 0dd4ebbcf94d, erc-mode-map unconditionally binds both C-a
> and Home to erc-bol. Which is problematic, as:
>
> • either (or both) of them may happen to /not/ be bound to
> beginning-of-line (as, for example, when using an older,
> Emacs 20-or-so, binding of Home to beginning-of-buffer);
>
> • the user may’ve previously bound additional key sequences to
> beginning-of-line, which are not rebound by the current
> erc-mode-map.
>
> It’s arguably more semantically correct (and convenient) to
> re-map beginning-of-line to erc-bol, instead of using an
> explicit list of key sequences to be bound to erc-bol.
Well, I think that users who want to rebind keys in a mode should use
the mode hooks -- there's nothing special about beginning-of-line and
friends. So I'm closing this report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-12-27 21:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-06 11:37 bug#16071: Erc re-binds [home] even if not beginning-of-line Ivan Shmakov
2013-12-06 17:59 ` Stefan Monnier
2013-12-06 18:26 ` Ivan Shmakov
2013-12-07 3:17 ` Stefan Monnier
2015-12-27 21:07 ` 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.