* FR: pre-select applicable templates depending on the context
@ 2008-03-01 13:56 Bastien
2008-03-03 8:12 ` Carsten Dominik
0 siblings, 1 reply; 3+ messages in thread
From: Bastien @ 2008-03-01 13:56 UTC (permalink / raw)
To: emacs-orgmode
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?
--
Bastien
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: FR: pre-select applicable templates depending on the context
2008-03-01 13:56 FR: pre-select applicable templates depending on the context Bastien
@ 2008-03-03 8:12 ` Carsten Dominik
2008-03-04 3:38 ` Bastien
0 siblings, 1 reply; 3+ messages in thread
From: Carsten Dominik @ 2008-03-03 8:12 UTC (permalink / raw)
To: Bastien; +Cc: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 1385 bytes --]
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
[-- Attachment #1.2: Type: text/html, Size: 2623 bytes --]
[-- Attachment #2: Type: text/plain, Size: 204 bytes --]
_______________________________________________
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: FR: pre-select applicable templates depending on the context
2008-03-03 8:12 ` Carsten Dominik
@ 2008-03-04 3:38 ` Bastien
0 siblings, 0 replies; 3+ messages in thread
From: Bastien @ 2008-03-04 3:38 UTC (permalink / raw)
To: emacs-orgmode
Carsten Dominik <dominik@science.uva.nl> writes:
> 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.
Done. I've also updated the documentation.
Maybe the new (info "(org)Remember templates") section of the manual is
now to big, but I couldn't figure out a better place for this.
> 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.
It should be safe... let me know if it's working ok.
--
Bastien
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-03-04 3:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-01 13:56 FR: pre-select applicable templates depending on the context Bastien
2008-03-03 8:12 ` Carsten Dominik
2008-03-04 3:38 ` Bastien
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).