From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Using org-remember to include stored link? Date: Thu, 08 Nov 2007 13:09:28 +0000 Message-ID: <87fxzgg9yv.fsf@bzg.ath.cx> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Iq6CV-00054u-Vd for emacs-orgmode@gnu.org; Thu, 08 Nov 2007 07:09:35 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Iq6CU-00054h-JZ for emacs-orgmode@gnu.org; Thu, 08 Nov 2007 07:09:34 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iq6CU-00054e-CW for emacs-orgmode@gnu.org; Thu, 08 Nov 2007 07:09:34 -0500 Received: from ug-out-1314.google.com ([66.249.92.169]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Iq6CT-0007Wq-Ej for emacs-orgmode@gnu.org; Thu, 08 Nov 2007 07:09:33 -0500 Received: by ug-out-1314.google.com with SMTP id a2so346840ugf for ; Thu, 08 Nov 2007 04:09:32 -0800 (PST) In-Reply-To: (Georg C. F. Greve's message of "Thu, 08 Nov 2007 12:32:24 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi Georg, "Georg C. F. Greve" writes: > I would like to do this in a way that it only temporarily modifies the > org-remember-templates, but at the moment, this function does that > permanently. See my comment below. > (defun org-mairix-sent-message-remember () > "Function to be called by org-mairix-message-send-and-exit-with-link > via hook to store a link to a sent message by calling remember. > > It works by first inserting the 'org-mairix' link provided by > org-mairix-message-send-and-exit-with-link for '%a' in the > org-mairix-message-sent-remember-template string and then > iterating through the org-remember-templates, replacing all the > standard items by the org-mairix-message-sent-remember-template > before calling org-remember." > (let* ((templates) (templ) > (org-remember-templates org-remember-templates) Why do you need to copy the global value of `org-remember-templates'? Can't you just define it *locally*? (let* ((org-remember-templates '((?w org-mairix-message-sent-remember-template nil ; no file name "WAITING" ; the headline)))) ...) This shouldn't modify the global set of templates. -- Bastien