From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Hugo Schmitt" Subject: Re: FR: interactive todo creation with remember templates Date: Fri, 25 Jan 2008 12:03:38 -0300 Message-ID: <2f1c7d020801250703m398a0b0fmda7af34b00858dc6@mail.gmail.com> References: <47FDCF18-357C-453E-9157-FB7E11F0DA5D@science.uva.nl> <2f1c7d020801240837q495ef3fdodc8a6a174041d9b7@mail.gmail.com> <7DBD0865-2702-4A87-86FE-497037BD571E@science.uva.nl> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1183719110==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JIQ5k-0003JS-V9 for emacs-orgmode@gnu.org; Fri, 25 Jan 2008 10:03:40 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JIQ5k-0003JA-9X for emacs-orgmode@gnu.org; Fri, 25 Jan 2008 10:03:40 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JIQ5k-0003J7-75 for emacs-orgmode@gnu.org; Fri, 25 Jan 2008 10:03:40 -0500 Received: from ro-out-1112.google.com ([72.14.202.182]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JIQ5j-0003GK-VD for emacs-orgmode@gnu.org; Fri, 25 Jan 2008 10:03:40 -0500 Received: by ro-out-1112.google.com with SMTP id k4so762119rog.6 for ; Fri, 25 Jan 2008 07:03:39 -0800 (PST) In-Reply-To: <7DBD0865-2702-4A87-86FE-497037BD571E@science.uva.nl> 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 --===============1183719110== Content-Type: multipart/alternative; boundary="----=_Part_36311_31362686.1201273418059" ------=_Part_36311_31362686.1201273418059 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Perfect! Thanks - Hugo On Jan 25, 2008 10:58 AM, Carsten Dominik wrote: > > On Jan 24, 2008, at 5:37 PM, Hugo Schmitt wrote: > > > I think my suggestion doesn't fit orgmode that well, but what if > > 'org-remember' had 'template' as an optonal argument? (instead of > > pulling from org-remember-template interactively). > > > > Then people could write their own menus/keymap/etc before calling > > remember. > > (Hmm, thinking about it, maybe i'll try that myself so i can call > > remember from Anything) > > If you are wiling to write lisp code, you can already do this, by > putting > a list with only one template temporarily into org-remember-templates, > like this: > > (let ((org-remember-templates > ("Task" 116 "* TODO %?\n %u" "~/org/gtd.org" "Tasks"))) > (call-interactively 'org-remember)) > > When there is only a single template in the list, Org-mode will actually > skip the query for the template and execute it right away. > > So yes, you can write a function that does built a template on the fly. > > Hope this helps > > - Carsten > > ------=_Part_36311_31362686.1201273418059 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Perfect! Thanks
- Hugo

On Jan 25, 2008 10:58 AM, Carsten Dominik <dominik@science.uva.nl> wrote:

On Jan 24, 2008, at 5:37 PM, Hugo Schmitt wrote:

> I think my suggestion doesn't fit orgmode that well, but what if
> 'org-remember' had 'template' as an optonal argument? (instead of
> pulling from org-remember-template interactively).
>
> Then people could write their own menus/keymap/etc before calling
> remember.
> (Hmm, thinking about it, maybe i'll try that myself so i can call
> remember from Anything)

If you are wiling to  write lisp code, you can already do this, by
putting
a list with only one template temporarily into org-remember-templates,
like this:

(let ((org-remember-templates
       ("Task" 116 "* TODO %?\n  %u" "~/org/gtd.org" "Tasks")))
  (call-interactively 'org-remember))

When there is only a single template in the list, Org-mode will actually
skip the query for the template and execute it right away.

So yes, you can write a function that does built a template on the fly.

Hope this helps

- Carsten


------=_Part_36311_31362686.1201273418059-- --===============1183719110== 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 --===============1183719110==--