* [BUG] org-open-at-point does not work anymore in comment blocks
@ 2014-07-18 7:34 Samuel Loury
2014-07-18 10:28 ` Nicolas Goaziou
0 siblings, 1 reply; 4+ messages in thread
From: Samuel Loury @ 2014-07-18 7:34 UTC (permalink / raw)
To: OrgMode ML
[-- Attachment #1: Type: text/plain, Size: 819 bytes --]
Hi,
On version baa2c5943a4afce71a6336cbd957139e840bd952.
Links are not followed anymore in comment blocks.
You may test it by launching (org-open-at-point) with the cursor into
the link in the following example.
--8<---------------cut here---------------start------------->8---
* Test
#+BEGIN_COMMENT
[[http://orgmode.org/]]
#+END_COMMENT
--8<---------------cut here---------------end--------------->8---
It triggers a user error in lisp/org.el at line 10641 since there is no
computed context.
Indeed, org-element-context does not appear to do anything for this
case.
I have no time left to investigate further, but I think someone out
there could find this bit of information useful.
--
Konubinix
GPG Key : 7439106A
Fingerprint: 5993 BE7A DA65 E2D9 06CE 5C36 75D2 3CED 7439 106A
[-- Attachment #2: Type: application/pgp-signature, Size: 472 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [BUG] org-open-at-point does not work anymore in comment blocks
2014-07-18 7:34 [BUG] org-open-at-point does not work anymore in comment blocks Samuel Loury
@ 2014-07-18 10:28 ` Nicolas Goaziou
2014-07-18 10:35 ` Samuel Loury
2014-07-28 13:42 ` Bastien
0 siblings, 2 replies; 4+ messages in thread
From: Nicolas Goaziou @ 2014-07-18 10:28 UTC (permalink / raw)
To: Samuel Loury; +Cc: OrgMode ML
Hello,
Samuel Loury <konubinix@gmail.com> writes:
> On version baa2c5943a4afce71a6336cbd957139e840bd952.
>
> Links are not followed anymore in comment blocks.
>
> You may test it by launching (org-open-at-point) with the cursor into
> the link in the following example.
> * Test #+BEGIN_COMMENT [[http://orgmode.org/]] #+END_COMMENT
>
> It triggers a user error in lisp/org.el at line 10641 since there is no
> computed context.
This is to be expected. Commenting some part of a buffer tells the
parser to ignore it. The only purpose of comments is to deactivate some
syntax (e.g., a link, a timestamp...) in the buffer, which is exactly
what happens here.
If you want to ignore that part only during export, but still want to
use keep it active in the buffer, I suggest to use a drawer, with an
appropriate `org-export-with-drawers' value, e.g.,
#+OPTIONS: d:(not "IGNORE_ME")
:IGNORE_ME:
[[http://orgmode.org]]
:END:
This was discussed before on this ML. Some users made a point that
`org-open-at-point' should process links in node properties. In the case
of comments, though, I think we should be strict and use drawers
instead.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [BUG] org-open-at-point does not work anymore in comment blocks
2014-07-18 10:28 ` Nicolas Goaziou
@ 2014-07-18 10:35 ` Samuel Loury
2014-07-28 13:42 ` Bastien
1 sibling, 0 replies; 4+ messages in thread
From: Samuel Loury @ 2014-07-18 10:35 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: OrgMode ML
[-- Attachment #1: Type: text/plain, Size: 974 bytes --]
Hi,
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> Samuel Loury <konubinix@gmail.com> writes:
>
>> On version baa2c5943a4afce71a6336cbd957139e840bd952.
>>
>> Links are not followed anymore in comment blocks.
>>
>> You may test it by launching (org-open-at-point) with the cursor into
>> the link in the following example.
>> * Test #+BEGIN_COMMENT [[http://orgmode.org/]] #+END_COMMENT
>>
>> It triggers a user error in lisp/org.el at line 10641 since there is no
>> computed context.
>
> If you want to ignore that part only during export, but still want to
> use keep it active in the buffer, I suggest to use a drawer, with an
> appropriate `org-export-with-drawers' value, e.g.,
>
> #+OPTIONS: d:(not "IGNORE_ME")
>
> :IGNORE_ME:
> [[http://orgmode.org]]
> :END:
Thank you for the answer. It is exactly what I want to do.
--
Konubinix
GPG Key : 7439106A
Fingerprint: 5993 BE7A DA65 E2D9 06CE 5C36 75D2 3CED 7439 106A
[-- Attachment #2: Type: application/pgp-signature, Size: 472 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [BUG] org-open-at-point does not work anymore in comment blocks
2014-07-18 10:28 ` Nicolas Goaziou
2014-07-18 10:35 ` Samuel Loury
@ 2014-07-28 13:42 ` Bastien
1 sibling, 0 replies; 4+ messages in thread
From: Bastien @ 2014-07-28 13:42 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: OrgMode ML, Samuel Loury
Hi Samuel and Nicolas,
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> This was discussed before on this ML. Some users made a point that
> `org-open-at-point' should process links in node properties. In the case
> of comments, though, I think we should be strict and use drawers
> instead.
I disagree, as you know. We already support opening links from
standard comments (as an exception), I don't see why the exception
should not extend to #+BEGIN_COMMENT blocks.
I pushed a change so that links in comment blocks are now opened.
--
Bastien
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-07-28 17:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-18 7:34 [BUG] org-open-at-point does not work anymore in comment blocks Samuel Loury
2014-07-18 10:28 ` Nicolas Goaziou
2014-07-18 10:35 ` Samuel Loury
2014-07-28 13:42 ` Bastien
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).