From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: FR: pre-select applicable templates depending on the context Date: Mon, 3 Mar 2008 09:12:40 +0100 Message-ID: <5C86CAC0-BA1B-4131-AEE9-92944046CA73@science.uva.nl> References: <873arak0oj.fsf@bzg.ath.cx> Mime-Version: 1.0 (Apple Message framework v919.2) Content-Type: multipart/mixed; boundary="===============1908300513==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JW5mz-0001RS-NO for emacs-orgmode@gnu.org; Mon, 03 Mar 2008 03:12:49 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JW5mx-0001RF-Lk for emacs-orgmode@gnu.org; Mon, 03 Mar 2008 03:12:49 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JW5mx-0001RC-FD for emacs-orgmode@gnu.org; Mon, 03 Mar 2008 03:12:47 -0500 Received: from mx20.gnu.org ([199.232.41.8]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JW5mw-00078r-SA for emacs-orgmode@gnu.org; Mon, 03 Mar 2008 03:12:47 -0500 Received: from ug-out-1314.google.com ([66.249.92.168]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JW5mu-0004tM-VN for emacs-orgmode@gnu.org; Mon, 03 Mar 2008 03:12:45 -0500 Received: by ug-out-1314.google.com with SMTP id a2so1829913ugf.48 for ; Mon, 03 Mar 2008 00:12:43 -0800 (PST) In-Reply-To: <873arak0oj.fsf@bzg.ath.cx> 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: Bastien Cc: emacs-orgmode@gnu.org --===============1908300513== Content-Type: multipart/alternative; boundary=Apple-Mail-2-738977270 --Apple-Mail-2-738977270 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On Mar 1, 2008, at 2:56 PM, Bastien wrote: > I have a few templates in `org-remember-templates': one that I mainly > use when I'm in my mailbox, another one that I mainly use when I'm > coding, one that I mainly use when I'm reading the web, etc. > > I think it would make sense to reduce the number of available > templates > when calling `org-remember'. This would be done by adding a new > element > to each template: > > t: force pre-selection of this template in every context > '(major-mode): pre-select this template only in major mode (actually a > list of major modes) > nil: never pre-select this template, unless there are no other > pre-selected templates > > The default value would be `nil' for all template, so that the current > behavior wouldn't be touched. > > Would people find this useful? I would with the addition that I'd also like to allow a function in there that would determine if the template should be pre-selected. The trouble with implementing this is that you need to modify the customize type, in a way that is compatible with older versions. This has happened before with the org-remember-templates, therefore there is already a :get element that normalizes the value. Please modify this in a way so that customize will swallow old settings. Thanks, great idea. - Carsten > > > -- > Bastien --Apple-Mail-2-738977270 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable
On Mar 1, 2008, at 2:56 PM, = Bastien wrote:

I have a few templates = in `org-remember-templates': one that I = mainly
use when I'm in my = mailbox, another one that I mainly use when = I'm
coding, one that I mainly = use when I'm reading the web, etc.

I think it = would make sense to reduce the number of available = templates
when calling = `org-remember'. This would be done by adding a new = element
to each = template:

=           t: force = pre-selection of this template in every = context
'(major-mode): = pre-select this template only in major mode (actually = a
=             &n= bsp;list of major modes)
=         nil: never pre-select = this template, unless there are no other
=             &n= bsp;pre-selected templates

The default = value would be `nil' for all template, so that the = current
behavior wouldn't be = touched.

Would people = find this useful?

I would with the addition that I'd = also like to allow a function
in there that would determine if the = template should be pre-selected.

The trouble with implementing = this is that you need to modify the
customize type, in a way that is = compatible with older versions.
This has happened before with the = org-remember-templates, therefore there
is already a :get element = that normalizes the value.  Please modify this
in a way so that = customize will swallow old settings.

Thanks, great idea.

- = Carsten



-- =
Bastien

= --Apple-Mail-2-738977270-- --===============1908300513== 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 --===============1908300513==--