From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: (Maybe) enhance `org-element-src-block-interpreter'? Date: Fri, 08 Aug 2014 10:45:23 +0200 Message-ID: <87y4uzmkt8.fsf@nicolasgoaziou.fr> References: <87tx5qvrl4.fsf@gmail.com> <87oavywal0.fsf@gmail.com> <87fvha81zd.fsf@gmail.com> <87egwt26o3.fsf@nicolasgoaziou.fr> <87wqal7rl8.fsf@gmail.com> <87wqalztmj.fsf@nicolasgoaziou.fr> <87sil9zrgw.fsf@nicolasgoaziou.fr> <87r40rv1en.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38999) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XFfn8-0000za-8V for emacs-orgmode@gnu.org; Fri, 08 Aug 2014 04:45:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XFfmy-0008Hu-3n for emacs-orgmode@gnu.org; Fri, 08 Aug 2014 04:44:50 -0400 Received: from relay5-d.mail.gandi.net ([2001:4b98:c:538::197]:47321) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XFfmx-0008Hp-Tp for emacs-orgmode@gnu.org; Fri, 08 Aug 2014 04:44:40 -0400 In-Reply-To: <87r40rv1en.fsf@gmail.com> (Thorsten Jolitz's message of "Fri, 08 Aug 2014 10:19:44 +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 Thorsten Jolitz writes: > Accessor `org-element-contents' is badly missed here ... > > E.g. I can get locally the content of a src-block (its :value), but for > most other elements (e.g. paragraph) that is not true. OTOH I cannot > reuse a src-block value as the content of a (locally created) paragraph > because this element has no :value property I could set (and its > interpreter simply inserts 'content', which is unaccessible on local > level). > > I know this is *much* easier asked as provided: > can getters and setters for element-content be introduced at the local > level too? No, `org-element-at-point' focuses on the element at point, not elements within. It would slow it down and make caching more complicated, for little benefit. > maybe via another property shared by all elements (:content > ?). The content is probably not even parsed at local level, but anyway, > maybe there is some kind of trick to make it accessible without parsing > the whole buffer? > > The only thing that comes to my mind is narrow the buffer to > element-at-point and then parse only this visible buffer part and return > its content. Valid idea? You're correct. Some cleanup is needed though (org-data + section elements). Regards, -- Nicolas Goaziou