emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Bastien <bzg@gnu.org>
Cc: Org Mode List <emacs-orgmode@gnu.org>
Subject: Re: [RFC] Sloppy `org-element-context'?
Date: Tue, 29 Apr 2014 23:20:41 +0200	[thread overview]
Message-ID: <874n1bq1cm.fsf@gmail.com> (raw)
In-Reply-To: <87tx9jlr6z.fsf@gmail.com> (Nicolas Goaziou's message of "Wed, 23 Apr 2014 22:35:32 +0200")

Correcting myself: 

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> Bastien <bzg@gnu.org> writes:
>
>> (defun org-open-links-in-comment-and-properties ()
>>   "Open links in a comment or in a property."
>>   (interactive)
>>   (let ((string-ahead (and (looking-at ".+") (match-string 0)))
>>         (value (org-element-property :value (org-element-at-point))))
>>     (with-temp-buffer
>>       (org-mode)
>>       (insert value)
>>       (goto-char (point-min))
>>       (search-forward string-ahead)
>>       (org-open-at-point))))
>>
>> which do work right now.
>
> Indeed.

Actually, it will not work in comments (point is X):

  # Some http://orgmode.org/file.html
  # and http://orgmode.org/other-fileX.html

The code will open the first link, not the second one.


Regards,

-- 
Nicolas Goaziou

  reply	other threads:[~2014-04-29 21:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-27 15:28 [RFC] Sloppy `org-element-context'? Nicolas Goaziou
2014-03-27 21:34 ` Rasmus
2014-03-28  9:26   ` Nicolas Goaziou
2014-04-19  8:47 ` Bastien
2014-04-19  9:15   ` Nicolas Richard
2014-04-19  9:30     ` Bastien
2014-04-23 20:35   ` Nicolas Goaziou
2014-04-29 21:20     ` Nicolas Goaziou [this message]
2014-05-06  9:25       ` Bastien
2014-05-26 15:50         ` 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=874n1bq1cm.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=bzg@gnu.org \
    --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).