From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Using org-remember to include stored link? Date: Sun, 14 Oct 2007 17:33:44 +0200 Message-ID: References: Mime-Version: 1.0 (Apple Message framework v624) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ih5TS-0000tV-Mv for emacs-orgmode@gnu.org; Sun, 14 Oct 2007 11:33:50 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ih5TS-0000tJ-30 for emacs-orgmode@gnu.org; Sun, 14 Oct 2007 11:33:50 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ih5TR-0000tG-Rl for emacs-orgmode@gnu.org; Sun, 14 Oct 2007 11:33:49 -0400 Received: from korteweg.uva.nl ([146.50.98.70]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ih5TR-00039A-HG for emacs-orgmode@gnu.org; Sun, 14 Oct 2007 11:33:49 -0400 In-Reply-To: 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: "Georg C. F. Greve" Cc: emacs-orgmode@gnu.org On Oct 14, 2007, at 14:05, Georg C. F. Greve wrote: > On Sun, 14 Oct 2007 08:14:10 +0200 > Carsten Dominik wrote: > >>> is it possible to call org-remember to insert a previously stored >>> link? > > cd> The remember buffer is in org-mode, you can just call C-c C-l to > cd> insert any previously stored link... > > True. Although that means I would need to delete the link that is > inserted by the template, and then insert the one I want. I'd prefer > this to happen with fewer keystrokes. If I could call org-mode with a > customized template to insert the stored link without being prompted > for > the other templates, that would be great. > > Ideally for what I have in mind the templates would not be defined per > file. That dependency really is not useful in my case. You can use nil for the file name and still provide a headline, I believe. I see now that the customization interface does not allow this - I will change this. > > In combination with something that inserts the last stored link into > the > template automatically, I could then have the fastest way of turning > outgoing mail into WAITING items in the correct file. > > See http://www.emacswiki.org/cgi-bin/wiki/org-mairix.el function > > org-mairix-message-send-and-exit-with-link For this specific application, you might consider a different route: - Define a prefix argument for this function. When given, org-remember will be called directly by the function, with a custom template into which you can insert the link. If you use `let' to define a local value for org-remember-templates, that template will be used for this call. So I mean that you end your org-mairix-send-and-exit-with-link with something like this (totally untested, only a draft): (when arg (let ((org-remember-templates '((?w (concat "* WAITING %?\n " (format "[[%s][%s]]" link desc)) nil ; no file name "WAITING" ; the headline )))) (org-remember))) Since we are only defining a single template, you will not even be prompted for the template but directly placed into the remember buffer. - Carsten