From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: How to insert/replace during `org-elemment-map' call? Date: Thu, 07 Aug 2014 21:32:12 +0200 Message-ID: <87iom4nlj7.fsf@nicolasgoaziou.fr> References: <87d2cca6aq.fsf@gmail.com> <87k36kmofv.fsf@nicolasgoaziou.fr> <878un09t5m.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51457) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XFTPX-0000Ok-Sp for emacs-orgmode@gnu.org; Thu, 07 Aug 2014 15:31:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XFTPN-0005Ib-P4 for emacs-orgmode@gnu.org; Thu, 07 Aug 2014 15:31:39 -0400 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:43110) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XFTPN-0005I6-IW for emacs-orgmode@gnu.org; Thu, 07 Aug 2014 15:31:29 -0400 In-Reply-To: <878un09t5m.fsf@gmail.com> (Thorsten Jolitz's message of "Thu, 07 Aug 2014 18:11:17 +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: > Its not really obvious for me how to do that. You mean simply by doing > it in 2 steps > > 1. map parse-tree and get the result list > > 2. goto point-max of buffer and use the result list to replace mapped > elements backwards Yes, that is what I mean. Just make sure to reverse the list returned by `org-element-map'. Regards, -- Nicolas Goaziou