emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: emacs-orgmode@gnu.org
Subject: How to set org-make-link-description-function
Date: Thu, 12 Apr 2018 17:54:41 -0700	[thread overview]
Message-ID: <87bmeo53ji.fsf@ericabrahamsen.net> (raw)

I've coded Org link support for EBDB, a contact management package,
where the :complete key looks like:

(lambda ()
  (format "ebdb:uuid/%s"
	  (ebdb-record-uuid
	   (ebdb-prompt-for-record
	    (ebdb-records)))))

Which prompts for a record based on the contact name, then inserts the
contact's UUID as the link.

The problem is that Org then prompts for a link description. I'd like to
provide the contact name as a default description (the user has just
typed it in, after all), but haven't figured out how to do that.

Clearly `org-make-link-description-function' is meant to play this role,
and it would work perfectly, but I don't know to set it. I can't set it
globally, but also don't know how to let-bind it locally.

How am I supposed to use it?

Thanks,
Eric

             reply	other threads:[~2018-04-13  0:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-13  0:54 Eric Abrahamsen [this message]
2018-04-13  2:05 ` How to set org-make-link-description-function John Kitchin
2018-04-13  4:12   ` Eric Abrahamsen
2018-04-13  4:39     ` John Kitchin
2018-04-13 17:23       ` Eric Abrahamsen
2018-04-13 20:32         ` John Kitchin
2018-04-13 23:58           ` Eric Abrahamsen

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=87bmeo53ji.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --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).