From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: org-element-at-point fails in programming-modes Date: Tue, 23 Sep 2014 23:27:29 +0200 Message-ID: <877g0uf2ny.fsf@nicolasgoaziou.fr> References: <87zjez9xqc.fsf@gmail.com> <878umj8hc4.fsf@geodiff-mac3.ulb.ac.be> <87r40b9sk7.fsf@gmail.com> <87ha16fcct.fsf@nicolasgoaziou.fr> <87a95q1vfs.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52822) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWXbz-0007ZN-F8 for emacs-orgmode@gnu.org; Tue, 23 Sep 2014 17:27:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWXbp-0002wF-6B for emacs-orgmode@gnu.org; Tue, 23 Sep 2014 17:27:03 -0400 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:41774) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWXbp-0002v3-0a for emacs-orgmode@gnu.org; Tue, 23 Sep 2014 17:26:53 -0400 In-Reply-To: <87a95q1vfs.fsf@gmail.com> (Thorsten Jolitz's message of "Tue, 23 Sep 2014 12:29:43 +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: Thorsten Jolitz Cc: emacs-orgmode@gnu.org Hello, Thorsten Jolitz writes: > 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). Again, `org-element-at-point' is not meant to be used outside of an Org buffer. You can improve the situation by changing regexps, but you will get bitten sooner or later. Regards, -- Nicolas Goaziou