From: Ihor Radchenko <yantar92@gmail.com> To: Maxim Nikulin <manikulin@gmail.com>, emacs-orgmode@gnu.org Subject: Re: org-store-link and help for a key Date: Thu, 10 Sep 2020 11:32:33 +0800 Message-ID: <87eenajoha.fsf@localhost> (raw) In-Reply-To: <rjaqb7$dsl$1@ciao.gmane.io> > Such behavior exists for ages, at least since 8.2.10 till current master. I can reproduce this. The reason of error is simple: help buffers for key combinations where not considered when writing help: link type. Current code does not even store the link to such help buffers correctly - when the key sequence has more than a single key only the first key will be stored (tested in <f1> k <f1> k help buffer). The code to open help: link type also does not know that help: link can point to anything other than function or variable. I can see two solutions: 1. Avoid storing links to help buffers describing key sequences. Show error when trying to store such link instead 2. Write proper handlers for storing and following links to help buffers other than just function/variable help (in addition to key sequence help buffers, org-store/follow-link also fails to work with describe-face buffers at least) To do this, one need to change org-link--open-help and org-store-link (see "(eq major-mode 'help-mode)" line). Patches are welcome. P.S. Would it be cleaner to have separate :store link properties for standard link types instead of hard-coding them into org-store-link? Best, Ihor Maxim Nikulin <manikulin@gmail.com> writes: > Either I missed something obvious or org-store-link from a help page for > a keystroke works incorrectly > > Let's try to save a link to the *keystroke* help for e.g. org-insert-link: > > 1. Open help page with =C-h k C-c C-l= > 2. Switch to the help buffer =C-x o= > 3. Store link =M-x org-store-link RET= > 4. Switch back to the org file =C-x o= > 5. Insert link =C-c C-l RET RET= > > I get =[[help:C-c]]= and an error if I try to follow the link with =C-c C-o= > > user-error: Unknown function or variable: C-c > > If I ask a help page for the *function* > > 1b, =C-h f org-insert-link RET= > > I get the working link =[[help:org-inser-link]]=. I expect the similar > result for the keystroke help link or maybe something special that leads > to the description of the current keystroke binding. > > Such behavior exists for ages, at least since 8.2.10 till current master.
next prev parent reply other threads:[~2020-09-10 3:34 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-09-09 14:54 Maxim Nikulin 2020-09-10 3:32 ` Ihor Radchenko [this message] 2020-09-13 20:01 ` Bastien 2020-09-14 7:21 ` 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://orgmode.org * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=87eenajoha.fsf@localhost \ --to=yantar92@gmail.com \ --cc=emacs-orgmode@gnu.org \ --cc=manikulin@gmail.com \ /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
Org-mode mailing list This inbox may be cloned and mirrored by anyone: git clone --mirror https://orgmode.org/list/0 list/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 list list/ https://orgmode.org/list \ emacs-orgmode@gnu.org public-inbox-index list Example config snippet for mirrors. Newsgroups are available over NNTP: nntp://news.yhetil.org/yhetil.emacs.orgmode nntp://news.gmane.io/gmane.emacs.orgmode AGPL code for this site: git clone https://public-inbox.org/public-inbox.git