From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: org-element-at-point fails in programming-modes Date: Wed, 20 Aug 2014 14:00:59 +0200 Message-ID: <87zjez9xqc.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42062) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XK4aJ-0000cT-4O for emacs-orgmode@gnu.org; Wed, 20 Aug 2014 08:01:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XK4aB-0007Tv-Kn for emacs-orgmode@gnu.org; Wed, 20 Aug 2014 08:01:47 -0400 Received: from plane.gmane.org ([80.91.229.3]:33975) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XK4aB-0007Tr-El for emacs-orgmode@gnu.org; Wed, 20 Aug 2014 08:01:39 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XK4a5-0000cb-Ft for emacs-orgmode@gnu.org; Wed, 20 Aug 2014 14:01:33 +0200 Received: from e178061066.adsl.alicedsl.de ([85.178.61.66]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 20 Aug 2014 14:01:33 +0200 Received: from tjolitz by e178061066.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 20 Aug 2014 14:01:33 +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 Hi List, with point at the beginning of each of the following blocks, `org-element-at-point' does recognize the correct type when buffer is in org-mode and other text-modes, but not so in programming modes, e.g. the *scratch* buffer (lisp-interaction-mode). Then only the src-block is recognized correctly, all the others are parsed as paragraphs. * ORG SCRATCH #+BEGIN_QUOTE hallo world #+END_QUOTE #+BEGIN_COMMENT hallo world #+END_COMMENT #+BEGIN_EXAMPLE hallo world #+END_EXAMPLE #+BEGIN_SRC emacs-lisp hallo world #+END_SRC Although Org functions are of course made only for working in org-mode and its a bit hard to see at first sight how this could be useful, I wonder if the regexps could be made a bit more general to make `org-element-at-point' work in programming modes too (most likely this behaviour is caused by references to character-classes that differ in text-modes and programming-modes)? -- cheers, Thorsten