From: Tom Weissmann <trmsw@yahoo.co.uk>
To: emacs-orgmode@gnu.org
Subject: Re: Feature request: custom link handlers
Date: Fri, 30 Nov 2007 13:50:55 +0000 (UTC) [thread overview]
Message-ID: <loom.20071130T132530-597@post.gmane.org> (raw)
In-Reply-To: 87wsrzkiim.fsf@bzg.ath.cx
Bastien <bzg <at> altern.org> writes:
> Are you suggesting to replace "http://www.google.com/search?q=%s" by a
> function that would handle the text after "::" in a different way than
> `format' is currently doing?
No.
Here's an example. I sometimes create links to Emacs bookmarks, eg
"bmk:org-mode-tweaks"
The bmk abbreviation is expanded to a link Org mode understands, by
this function:
(defun org-link-abbrev-bookmark (bookmark)
"Opens a bookmark in another window"
(bookmark-jump-other-window bookmark))
- which happens to return nil, NOT a link that Org mode understands,
so even though it opens the bookmark I still get an error -
essentially because I'm using a function that expands an
abbreviation simply for its side effects.
If possible I would like Org mode to display a message like "Opening
bookmark org-mode-tweaks" instead of "if: Wrong type argument:
stringp, nil", which is why I suggested the multiple return value.
On the other hand I could return an elisp link and set
`org-confirm-elisp-link-function' to nil, to avoid having to confirm
every time I clicked one of these links
---
The other suggestion I realise doesn't make sense because when you
create a link with C-c C-l, the only minibuffer completion is of the
link type (file, new, mailto, etc.), not what follows.
It would be very cool to do C-c C-l, entry "bmk:" as the bookmark
type, and then have minibuffer completion of all the existing
bookmarks, but `org-store-link' works fine :)
next prev parent reply other threads:[~2007-11-30 13:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-30 10:25 Feature request: custom link handlers Tom Weissmann
2007-11-30 12:46 ` Bastien
2007-11-30 13:50 ` Tom Weissmann [this message]
2007-11-30 14:02 ` Bastien
2007-11-30 14:14 ` Bastien
2007-11-30 14:44 ` Tom Weissmann
2007-11-30 15:01 ` Bastien
2007-11-30 16:22 ` Tom Weissmann
2007-11-30 16:37 ` Tom Weissmann
2007-11-30 16:51 ` Bastien
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=loom.20071130T132530-597@post.gmane.org \
--to=trmsw@yahoo.co.uk \
--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).