[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] org-element-at-point fails in programming-modes
From: |
Thorsten Jolitz |
Subject: |
Re: [O] org-element-at-point fails in programming-modes |
Date: |
Tue, 23 Sep 2014 12:29:43 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Nicolas Goaziou <address@hidden> writes:
> Hello,
>
> Thorsten Jolitz <address@hidden> writes:
>
>> Ok, thanks, that sounds promising. OTOH, is the use of "\\S-" really
>> mandatory,
>
> No, it isn't.
>
>> couldn't a more robust construct be used, either something
>> like this (untested) regexp:
>>
>> ,----
>> | "[^[:space:]\\n]+"
>> `----
>
> AFAIK, [:space:] is not compatible with XEmacs. It could be "[^
> \r\t\n]+", but even this could be too broad (e.g., "#+BEGIN_..."). We
> could also limit block names to alphanumeric characters and a bunch of
> symbols.
I noticed this issue again when calling `org-element-at-point` with
point before the stars in
,----
| ** [#A] whatsup :mytag:it:
| hello world
`----
in an emacs-lisp-mode buffer - it results in:
,----
| (paragraph (:begin 193 :end 246 :contents-begin 206 :contents-end 245
| :post-blank 1 :post-affiliated 206 ...))
`----
so it kind-of works outside org major-mode, but not correctly due to
character-class problem in the regexp(s).
PS
My org-mode is up to date
#+BEGIN_SRC emacs-lisp
(call-interactively 'org-version)
#+END_SRC
#+results:
: Org-mode version 8.3beta (release_8.3beta-277-g698705 @
/usr/share/emacs/24.3/lisp/org/lisp/)
--
cheers,
Thorsten
- Re: [O] org-element-at-point fails in programming-modes,
Thorsten Jolitz <=