From: Michael Heerdegen <michael_heerdegen@web.de>
To: emacs-orgmode@gnu.org
Subject: Re: How to handle both minor mode and major mode remapping a command?
Date: Thu, 19 Dec 2024 20:36:55 +0100 [thread overview]
Message-ID: <875xnfbh2g.fsf@web.de> (raw)
In-Reply-To: <87ikrf7ev6.fsf@localhost> (Ihor Radchenko's message of "Thu, 19 Dec 2024 17:38:05 +0000")
Ihor Radchenko <yantar92@posteo.net> writes:
> That will, of course, work. However, I feel that it will only solve this
> exact problem, but nothing more.
>
> Just in Org mode, we also need special handling of
> `move-beginning-of-line' and `move-end-of-line' for visual mode (for the
> same reasons). Does it mean that we need to introduce yet more
> "*-function" variables? It will not be scalable.
We would factor out the common part (whose semantic changes) and make
that the thing that `add-function' would modify. A function value that
returns the positions of beginning and end of a line when called,
something like that.
> What I was thinking about is some way for command remapping to:
>
> 1. remap overriding minor modes
> 2. be able to access commands (possible remapped) that are shadowed by
> current remapping
>
> Maybe what I want is advice flexibility for keymaps. (not sure)
What would one be able to do using that imagined mechanism that one
cannot do with `add-function'?
Michael.
next prev parent reply other threads:[~2024-12-19 19:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-18 11:53 Bug: org-kill-line shouldn't assume visual-line-mode means kill-visual-line Nathan Collins
2024-12-15 10:48 ` How to handle both minor mode and major mode remapping a command? (was: Bug: org-kill-line shouldn't assume visual-line-mode means kill-visual-line) Ihor Radchenko
2024-12-17 17:33 ` How to handle both minor mode and major mode remapping a command? Michael Heerdegen
2024-12-19 17:38 ` Ihor Radchenko
2024-12-19 19:36 ` Michael Heerdegen [this message]
2024-12-21 12:00 ` Ihor Radchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875xnfbh2g.fsf@web.de \
--to=michael_heerdegen@web.de \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.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).