From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: org-element-at-point and special blocks Date: Wed, 09 Dec 2015 19:04:26 +0100 Message-ID: <87y4d3jy6t.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41659) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6j6z-00027z-Am for emacs-orgmode@gnu.org; Wed, 09 Dec 2015 13:05:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a6j6v-0006ld-FT for emacs-orgmode@gnu.org; Wed, 09 Dec 2015 13:05:09 -0500 Received: from plane.gmane.org ([80.91.229.3]:37356) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6j6v-0006kD-9O for emacs-orgmode@gnu.org; Wed, 09 Dec 2015 13:05:05 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1a6j6t-0008Ls-Ap for emacs-orgmode@gnu.org; Wed, 09 Dec 2015 19:05:03 +0100 Received: from 62.80.108.14 ([62.80.108.14]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 09 Dec 2015 19:05:03 +0100 Received: from rasmus by 62.80.108.14 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 09 Dec 2015 19:05:03 +0100 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, Is there a reason why org-element-at-point reports the type to be a paragraph for special blocks? E.g. in the examples at the bottom of this mail, where | is the cursor, the types are: export-block, src-block and paragraph with a nested special block. Is there a neat way to detect if point is inside a block? I’m trying to write a function for structures (e.g. #+begin_latex) that works like org-babel-demarcate-block. Thanks, Rasmus #+BEGIN_LaTeX | #+END_LaTeX #+BEGIN_SRC emacs-lisp | #+END_SRC #+begin_abstract | #+end_abstract -- Dung makes an excellent fertilizer