From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Georg C. F. Greve" Subject: Re: Using org-remember to include stored link? Date: Thu, 08 Nov 2007 12:32:24 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1685706570==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Iq5eM-0003uG-55 for emacs-orgmode@gnu.org; Thu, 08 Nov 2007 06:34:18 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Iq5eH-0003mC-Na for emacs-orgmode@gnu.org; Thu, 08 Nov 2007 06:34:16 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iq5eH-0003lv-CF for emacs-orgmode@gnu.org; Thu, 08 Nov 2007 06:34:13 -0500 Received: from gadolin.fsfeurope.org ([195.176.254.152]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Iq5eG-0006t7-D8 for emacs-orgmode@gnu.org; Thu, 08 Nov 2007 06:34:12 -0500 In-Reply-To: (Carsten Dominik's message of "Sun, 14 Oct 2007 17:33:44 +0200") 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: Carsten Dominik Cc: emacs-orgmode@gnu.org --===============1685706570== Content-Type: multipart/signed; boundary="20071108123224+0100258029129266323734-229088717"; micalg=pgp-sha1; protocol="application/pgp-signature" --20071108123224+0100258029129266323734-229088717 Content-Type: multipart/mixed; boundary="20071108123224+0100229713185-238790135-138322516" --20071108123224+0100229713185-238790135-138322516 Content-Transfer-Encoding: quoted-printable On Sun, 14 Oct 2007 17:33:44 +0200 Carsten Dominik wrote:=20 cd> For this specific application, you might consider a different route: Thanks for your input. I had some look at this route, and ended up with a function that inserts the remember item (defined in calling function) and inserts it into the org-remember-templates before calling org-remember. 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. My Lisp knowledge is not really good enough to figure this one out without help, I am afraid. I tried to address that issue by using copy-sequence and copy-alist to work on local copies of the org-remember-templates, but that does not seem to solve the issue, which is why I am attaching the function now in its first implementation. Any input you might be able to provide would be greatly appreciated. Regards, Georg --20071108123224+0100229713185-238790135-138322516 Content-Type: application/emacs-lisp Content-Disposition: inline Content-Transfer-Encoding: quoted-printable (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) (item (progn (string-match "%a" org-mairix-message-sent-remember-template) (replace-match org-link nil nil org-mairix-message-sent-remember-templat= e)))) (dolist (templ org-remember-templates templates) (setcar (cdr (cdr templ)) item) ; this should be done another way, i = guess (setq templates (cons templ templates))) (setq org-remember-templates (nreverse templates)) (org-remember))) --20071108123224+0100229713185-238790135-138322516 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable =2D-=20 Georg C. F. Greve Free Software Foundation Europe (http://fsfeurope.org) Join the Fellowship and protect your freedom! (http://www.fsfe.org) What everyone should know about DRM (http://DRM.info) --20071108123224+0100229713185-238790135-138322516-- --20071108123224+0100258029129266323734-229088717 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iQCVAwUBRzLzyCk9sUy32wQcAQLxtAP/XJNx7s3eEAZBdLkHaiHYTZQXVz37qbnV 0ISFoOzEhjtFvzduEA4Wm+2zwNCrg+bBDY/YNV8dp8knHBxrdlHPb9x+BeBV/pHB CBc48QllS4tUWCHGOLkqqm1bqF9aDLs1oRScjMNZA7lF9pThYDgyTLQRcXUCTUl4 vHIu6rFyNtU= =Rvmu -----END PGP SIGNATURE----- --20071108123224+0100258029129266323734-229088717-- --===============1685706570== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============1685706570==--