From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Programming with org-element-cache -> short introduction? Date: Mon, 11 Aug 2014 16:22:54 +0200 Message-ID: <877g2fp0ld.fsf@nicolasgoaziou.fr> References: <87y4uxp3w2.fsf@gmail.com> <87iolzp3nf.fsf@nicolasgoaziou.fr> <87fvh3m8y5.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38966) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGqUQ-0002sv-NN for emacs-orgmode@gnu.org; Mon, 11 Aug 2014 10:22:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XGqUG-0006Wy-9I for emacs-orgmode@gnu.org; Mon, 11 Aug 2014 10:22:22 -0400 Received: from relay5-d.mail.gandi.net ([2001:4b98:c:538::197]:35924) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGqUG-0006Wq-3P for emacs-orgmode@gnu.org; Mon, 11 Aug 2014 10:22:12 -0400 In-Reply-To: <87fvh3m8y5.fsf@gmail.com> (Thorsten Jolitz's message of "Mon, 11 Aug 2014 15:50:42 +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: > Is it ok to do these two things: > > - let-bind a value returned by `org-element-at-point' and modify it (with > plist-put), and No, per advice given before. `plist-put' is destructive. Instead, create a new element. You can use `org-combine-plists' to generate its property list. [...] > - globally set a value returned by `org-element-at-point', modify it > (with plist-put) in a function call, but use the variable as a quoted > (!) function arg and reset the original value with this trick: Ditto.