From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: org-element-at-point fails in programming-modes Date: Tue, 23 Sep 2014 12:29:43 +0200 Message-ID: <87a95q1vfs.fsf@gmail.com> References: <87zjez9xqc.fsf@gmail.com> <878umj8hc4.fsf@geodiff-mac3.ulb.ac.be> <87r40b9sk7.fsf@gmail.com> <87ha16fcct.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44168) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWNMJ-00024S-HK for emacs-orgmode@gnu.org; Tue, 23 Sep 2014 06:30:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWNMB-00009I-Q3 for emacs-orgmode@gnu.org; Tue, 23 Sep 2014 06:30:11 -0400 Received: from plane.gmane.org ([80.91.229.3]:32902) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWNMB-0008Rg-Kq for emacs-orgmode@gnu.org; Tue, 23 Sep 2014 06:30:03 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XWNM5-0003Xg-Gv for emacs-orgmode@gnu.org; Tue, 23 Sep 2014 12:29:57 +0200 Received: from e178059083.adsl.alicedsl.de ([85.178.59.83]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 23 Sep 2014 12:29:57 +0200 Received: from tjolitz by e178059083.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 23 Sep 2014 12:29:57 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Nicolas Goaziou writes: > Hello, > > Thorsten Jolitz 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