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

2014-05-26 Thread Bastien
Hi Nicolas, Bastien b...@gnu.org writes: Indeed -- but this can easily be fixed. Thanks for the comment on my dirty hack, I will implement something based on this idea and we'll see if it fits. This is now implemented in http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=b11570 Best, --

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

2014-05-06 Thread Bastien
Hi Nicolas, Nicolas Goaziou n.goaz...@gmail.com writes: 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. Indeed -- but this can easily be fixed.

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

2014-04-29 Thread Nicolas Goaziou
Correcting myself: Nicolas Goaziou n.goaz...@gmail.com writes: Bastien b...@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

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

2014-04-23 Thread Nicolas Goaziou
Hello, Bastien b...@gnu.org writes: I don't think `org-element-context' should be sloppy *at all*. [...] For example, on a comment, (eq 'comment (car (org-element-at-point))) *coughs* (eq 'comment (org-element-type (org-element-at-point))) should always return `t'. But if the user wants

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

2014-04-19 Thread Bastien
Hi Nicolas, Nicolas Goaziou n.goaz...@gmail.com writes: As you may know, `org-element-context' returns the object under point, according to Org Syntax. The questions are: should it be a little sloppy, for convenience? And, if it should, what degree of sloppiness is acceptable? I don't think

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

2014-04-19 Thread Nicolas Richard
Bastien b...@gnu.org writes: I don't think `org-element-context' should be sloppy *at all*. Hope this all makes sense -- let me know what you think. It makes sense to me, and I agree with you : org element should not parse the syntax differently just because e.g. we put a link in a comment and

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

2014-04-19 Thread Bastien
Nicolas Richard theonewiththeevill...@yahoo.fr writes: For comparison, AucTeX has a variable LaTeX-syntactic-comments which controls that kind of thing : If non-nil comments will be handled according to LaTeX syntax. That's interesting indeed, thanks for sharing. -- Bastien

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

2014-03-28 Thread Nicolas Goaziou
Hello, Rasmus ras...@gmx.us writes: Would it make sense to make it optional? I thought about it. But adding an optional argument to determine if `org-element-context' should be strict or sloppy doesn't help in practice, since one will probably often wonder if he needs to switch to sloppy mode

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

2014-03-27 Thread Nicolas Goaziou
Hello, As you may know, `org-element-context' returns the object under point, according to Org Syntax. The questions are: should it be a little sloppy, for convenience? And, if it should, what degree of sloppiness is acceptable? Note that, at the time being, the function is already somewhat

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

2014-03-27 Thread Rasmus
Hi, Nicolas Goaziou n.goaz...@gmail.com writes: As you may know, `org-element-context' returns the object under point, according to Org Syntax. The questions are: should it be a little sloppy, for convenience? And, if it should, what degree of sloppiness is acceptable? Would it make sense