From: Joseph Vidal-Rosset <joseph.vidal.rosset@gmail.com>
To: Ihor Radchenko <yantar92@gmail.com>
Cc: emacs-orgmode@gnu.org, Daryl Manning <dwm+orgmode@wakatara.com>
Subject: Re: Inserting org-mode heading links the org-refile way
Date: Mon, 04 May 2020 19:41:36 +0200 [thread overview]
Message-ID: <874ksv61in.fsf@gmail.com> (raw)
In-Reply-To: <87y2q8mawy.fsf@localhost> (Ihor Radchenko's message of "Mon, 04 May 2020 15:11:57 +0800")
Le lun. 05/04/20 mai 2020 à 03:11:57 , Ihor Radchenko
<yantar92@gmail.com> a envoyé ce message:
> Can you try the following simplified code?
Hello,
I confirm that the simplified code below does not break the code of my
setup and that org-links for gnus work. Thanks !
> (defun org-id-prompt-id ()
> "Prompt for the id during completion of id: link."
> (let ((org-refile-history nil)
> (org-refile-cache nil)
> (org-refile-target-verify-function nil))
> (let ((prompt-ans (org-refile-get-location "Select org entry")))
> (prog1
> (or (org-id-get (seq-find #'markerp
> prompt-ans)
> 'create)
> (user-error "Cannot find ID of the entry: %s" prompt-ans))
> (setq org-id-history org-refile-history)
> (setq org-id-cache org-refile-cache)))))
>
> (defun org-id-link-complete (&optional arg)
> "Completion function for id: link."
> (let* ((id (org-id-prompt-id)))
> (format "id:%s" id)))
>
> (org-link-set-parameters "id"
> :complete #'org-id-link-complete)
>
> P.S. You can use %^t instead of %(org-insert-time-stamp ...).
>
> From org-capture-templates docstring:
>> %^t Like %t, but prompt for date. Similarly %^T, %^u, %^U.
>> You may define a prompt like: %^{Please specify birthday}t.
>> The default date is that of %t, see above.
>
> Best,
> Ihor
next prev parent reply other threads:[~2020-05-04 17:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-03 20:04 Inserting org-mode heading links the org-refile way Daryl Manning
2020-05-04 5:09 ` Ihor Radchenko
2020-05-04 6:28 ` Joseph Vidal-Rosset
2020-05-04 7:11 ` Ihor Radchenko
2020-05-04 17:41 ` Joseph Vidal-Rosset [this message]
2020-05-05 14:19 ` Daryl Manning
2020-05-05 14:32 ` Ihor Radchenko
2020-05-07 2:13 ` Josh Moller-Mara
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874ksv61in.fsf@gmail.com \
--to=joseph.vidal.rosset@gmail.com \
--cc=dwm+orgmode@wakatara.com \
--cc=emacs-orgmode@gnu.org \
--cc=yantar92@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
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 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.