emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [RFC] Sloppy `org-element-context'?


From: Nicolas Goaziou
Subject: Re: [O] [RFC] Sloppy `org-element-context'?
Date: Tue, 29 Apr 2014 23:20:41 +0200

Correcting myself: 

Nicolas Goaziou <address@hidden> writes:

> Bastien <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]