From: Ihor Radchenko <yantar92@posteo.net>
To: alain.cochard@unistra.fr
Cc: emacs-orgmode@gnu.org
Subject: Re: Completion mechanism for headlines when creating a link between 2 Org files?
Date: Mon, 04 Sep 2023 08:14:44 +0000 [thread overview]
Message-ID: <87h6oawe17.fsf@localhost> (raw)
In-Reply-To: <25845.34743.825131.486943@gargle.gargle.HOWL>
Alain.Cochard@unistra.fr writes:
> C-c C-l (org-insert-link)
>
> [...]
>
> Completion support
>
> Completion with TAB helps you to insert valid link prefixes
> like ‘http’ or ‘ftp’, including the prefixes defined
> through link abbreviations (see Link Abbreviations). If you
> press RET after inserting only the prefix, Org offers
> specific completion support for some link types.
>
> but, after I complete for a given file, I cannot find a way to further
> complete for a specific (sub)headline. Is there a way that I missed,
> even after searching the Internet a bit?
You would need to extend the default file: link completion function -
`org-link-complete-file'.
You can override it with any custom function:
(org-link-set-parameters "file" :complete #'your-custom-completion-function)
> If not, I am making it a feature request. Indeed it would be great,
> especially if one does not really remember where, in a (known) file,
> the headline is, nor --even more importantly-- what its name exactly
> is.
>
> (In my naive view, as the completion mechanism already exists for
> internal files, it should be easy to extend it for external files...)
It is, although even more common request is simply inserting a link to a
heading in _a_ file (not known).
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
next prev parent reply other threads:[~2023-09-04 8:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-04 7:31 Completion mechanism for headlines when creating a link between 2 Org files? Alain.Cochard
2023-09-04 8:14 ` Ihor Radchenko [this message]
2023-09-05 21:35 ` David Masterson
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=87h6oawe17.fsf@localhost \
--to=yantar92@posteo.net \
--cc=alain.cochard@unistra.fr \
--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).