* Setting org-remember-store-without-prompt specifically for certain templates?
@ 2009-10-21 18:15 Ryan C. Thompson
2009-10-22 5:49 ` Darlan Cavalcante Moreira
0 siblings, 1 reply; 9+ messages in thread
From: Ryan C. Thompson @ 2009-10-21 18:15 UTC (permalink / raw)
To: org-mode Mailinglist
Hi,
I want to be prompted for a location to file some org-remember
templates, but not others. How can I set
org-remember-store-without-prompt in a template-specific fashion? I
tried putting code in the template with %(sexp) that would set a
buffer-local value for this variable, but I can't seem to make it work.
-Ryan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Setting org-remember-store-without-prompt specifically for certain templates?
2009-10-21 18:15 Setting org-remember-store-without-prompt specifically for certain templates? Ryan C. Thompson
@ 2009-10-22 5:49 ` Darlan Cavalcante Moreira
2009-10-22 5:53 ` Ryan C. Thompson
0 siblings, 1 reply; 9+ messages in thread
From: Darlan Cavalcante Moreira @ 2009-10-22 5:49 UTC (permalink / raw)
To: Ryan C. Thompson; +Cc: org-mode Mailinglist
I just leave org-remember-store-without-prompt as t and use C-c C-c in the
remember buffer to put the note in the default location. When I want to specify
a different location I use M-1 C-c C-c instead and org asks me where to refile
it to.
Darlan
At Wed, 21 Oct 2009 11:15:23 -0700,
"Ryan C. Thompson" <rct@thompsonclan.org> wrote:
>
> Hi,
>
> I want to be prompted for a location to file some org-remember
> templates, but not others. How can I set
> org-remember-store-without-prompt in a template-specific fashion? I
> tried putting code in the template with %(sexp) that would set a
> buffer-local value for this variable, but I can't seem to make it work.
>
> -Ryan
>
>
> _______________________________________________
> 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] 9+ messages in thread
* Re: Setting org-remember-store-without-prompt specifically for certain templates?
2009-10-22 5:49 ` Darlan Cavalcante Moreira
@ 2009-10-22 5:53 ` Ryan C. Thompson
2009-10-24 12:15 ` Carsten Dominik
0 siblings, 1 reply; 9+ messages in thread
From: Ryan C. Thompson @ 2009-10-22 5:53 UTC (permalink / raw)
To: Darlan Cavalcante Moreira; +Cc: org-mode Mailinglist
That's a fine solution for now, but I have one template that I *always*
want to be prompted about. (It's an "assignment" template, and I want to
refile it under the appropriate class.) For others, I don't want a
prompt. I feel there should be a way to implement this and stick it
inside a %(sexp) in my template of choice.
Darlan Cavalcante Moreira wrote:
> I just leave org-remember-store-without-prompt as t and use C-c C-c in the
> remember buffer to put the note in the default location. When I want to specify
> a different location I use M-1 C-c C-c instead and org asks me where to refile
> it to.
>
> Darlan
>
> At Wed, 21 Oct 2009 11:15:23 -0700,
> "Ryan C. Thompson" <rct@thompsonclan.org> wrote:
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Setting org-remember-store-without-prompt specifically for certain templates?
2009-10-22 5:53 ` Ryan C. Thompson
@ 2009-10-24 12:15 ` Carsten Dominik
2009-10-24 21:00 ` Ryan C. Thompson
0 siblings, 1 reply; 9+ messages in thread
From: Carsten Dominik @ 2009-10-24 12:15 UTC (permalink / raw)
To: Ryan C. Thompson; +Cc: org-mode Mailinglist
On Oct 22, 2009, at 7:53 AM, Ryan C. Thompson wrote:
> That's a fine solution for now, but I have one template that I
> *always* want to be prompted about. (It's an "assignment" template,
> and I want to refile it under the appropriate class.) For others, I
> don't want a prompt. I feel there should be a way to implement this
> and stick it inside a %(sexp) in my template of choice.
All you need to do is *not* to specify file and headline for this
template - then you will be prompted.
HTH
- Carsten
>
> Darlan Cavalcante Moreira wrote:
>> I just leave org-remember-store-without-prompt as t and use C-c C-c
>> in the
>> remember buffer to put the note in the default location. When I
>> want to specify
>> a different location I use M-1 C-c C-c instead and org asks me
>> where to refile
>> it to.
>>
>> Darlan
>>
>> At Wed, 21 Oct 2009 11:15:23 -0700,
>> "Ryan C. Thompson" <rct@thompsonclan.org> wrote:
>>
>
>
> _______________________________________________
> 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
- Carsten
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Setting org-remember-store-without-prompt specifically for certain templates?
2009-10-24 12:15 ` Carsten Dominik
@ 2009-10-24 21:00 ` Ryan C. Thompson
2009-10-25 8:11 ` Carsten Dominik
0 siblings, 1 reply; 9+ messages in thread
From: Ryan C. Thompson @ 2009-10-24 21:00 UTC (permalink / raw)
To: Carsten Dominik; +Cc: org-mode Mailinglist
Carsten Dominik wrote:
>
> All you need to do is *not* to specify file and headline for this
> template - then you will be prompted.
If I don't specify a file and headline, won't the note just be stored
under org-default-notes file and org-remember-default-headline? Or even
remember-data-file?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Setting org-remember-store-without-prompt specifically for certain templates?
2009-10-24 21:00 ` Ryan C. Thompson
@ 2009-10-25 8:11 ` Carsten Dominik
2009-10-25 10:31 ` Ryan C. Thompson
0 siblings, 1 reply; 9+ messages in thread
From: Carsten Dominik @ 2009-10-25 8:11 UTC (permalink / raw)
To: Ryan C. Thompson; +Cc: org-mode Mailinglist
On Oct 24, 2009, at 11:00 PM, Ryan C. Thompson wrote:
> Carsten Dominik wrote:
>>
>> All you need to do is *not* to specify file and headline for this
>> template - then you will be prompted.
> If I don't specify a file and headline, won't the note just be
> stored under org-default-notes file and org-remember-default-
> headline? Or even remember-data-file?
Hi Ryan,
you are completely right, I was mistaken.
No, you cannot currently do what you want on a per-template basis.
- Carsten
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Setting org-remember-store-without-prompt specifically for certain templates?
2009-10-25 8:11 ` Carsten Dominik
@ 2009-10-25 10:31 ` Ryan C. Thompson
2009-10-25 10:50 ` Carsten Dominik
0 siblings, 1 reply; 9+ messages in thread
From: Ryan C. Thompson @ 2009-10-25 10:31 UTC (permalink / raw)
To: Carsten Dominik; +Cc: org-mode Mailinglist
My original idea for a per-template solution was to create a function to
set buffer-local values of the appropriate variables in the rememebr
buffer, and have that function return an empty string, and then put it
inside a %(sexp) in the template itself. Should this work? Would
buffer-local values take precedence when I press C-c C-c after finishing
my note?
My first few attempts were unsuccessful, but I'm not sure I got the code
right. I suppose I should try manually setting buffer-local values and
observing the effects.
- Ryan
Carsten Dominik wrote:
>
> On Oct 24, 2009, at 11:00 PM, Ryan C. Thompson wrote:
>
>
> Hi Ryan,
>
> you are completely right, I was mistaken.
>
> No, you cannot currently do what you want on a per-template basis.
>
> - Carsten
>
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Setting org-remember-store-without-prompt specifically for certain templates?
2009-10-25 10:31 ` Ryan C. Thompson
@ 2009-10-25 10:50 ` Carsten Dominik
2009-10-25 17:10 ` James TD Smith
0 siblings, 1 reply; 9+ messages in thread
From: Carsten Dominik @ 2009-10-25 10:50 UTC (permalink / raw)
To: Ryan C. Thompson; +Cc: org-mode Mailinglist
On Oct 25, 2009, at 11:31 AM, Ryan C. Thompson wrote:
> My original idea for a per-template solution was to create a
> function to set buffer-local values of the appropriate variables in
> the rememebr buffer, and have that function return an empty string,
> and then put it inside a %(sexp) in the template itself. Should this
> work? Would buffer-local values take precedence when I press C-c C-c
> after finishing my note?
>
> My first few attempts were unsuccessful, but I'm not sure I got the
> code right. I suppose I should try manually setting buffer-local
> values and observing the effects.
Well, yes you should try, it might work, something like this:
%(progn (org-set-local 'org-remember-store-without-prompt nil) "")
- Carsten
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Setting org-remember-store-without-prompt specifically for certain templates?
2009-10-25 10:50 ` Carsten Dominik
@ 2009-10-25 17:10 ` James TD Smith
0 siblings, 0 replies; 9+ messages in thread
From: James TD Smith @ 2009-10-25 17:10 UTC (permalink / raw)
To: Carsten Dominik; +Cc: org-mode Mailinglist, Ryan C. Thompson
Hi Ryan and Carsten,
On 2009-10-25 11:50:05(+0100), Carsten Dominik wrote:
> On Oct 25, 2009, at 11:31 AM, Ryan C. Thompson wrote:
> > My original idea for a per-template solution was to create a
> > function to set buffer-local values of the appropriate variables in
> > the rememebr buffer, and have that function return an empty string,
> > and then put it inside a %(sexp) in the template itself. Should this
> > work? Would buffer-local values take precedence when I press C-c C-c
> > after finishing my note?
> >
> > My first few attempts were unsuccessful, but I'm not sure I got the
> > code right. I suppose I should try manually setting buffer-local
> > values and observing the effects.
>
> Well, yes you should try, it might work, something like this:
>
> %(progn (org-set-local 'org-remember-store-without-prompt nil) "")
That isn't going to work. When org-remember-mode is turned on in the
org-remember-apply-template , all local variables get cleared (there's a
kill-all-local-variables in remember-mode), and embedded elisp is processed
before this.
Try adding this to your emacs:
--8<---------------cut here---------------start------------->8---
(defun org-no-store-without-prompt ()
(org-set-local 'org-remember-store-without-prompt nil)
(remove-hook 'post-command-hook 'org-no-store-without-prompt))
--8<---------------cut here---------------end--------------->8---
And putting
%(progn (add-hook 'post-command-hook 'org-no-store-without-prompt) "")
in your template.
--
|-<James TD Smith>-<email/ahktenzero@mohorovi.cc>-|
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2009-10-25 17:11 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-21 18:15 Setting org-remember-store-without-prompt specifically for certain templates? Ryan C. Thompson
2009-10-22 5:49 ` Darlan Cavalcante Moreira
2009-10-22 5:53 ` Ryan C. Thompson
2009-10-24 12:15 ` Carsten Dominik
2009-10-24 21:00 ` Ryan C. Thompson
2009-10-25 8:11 ` Carsten Dominik
2009-10-25 10:31 ` Ryan C. Thompson
2009-10-25 10:50 ` Carsten Dominik
2009-10-25 17:10 ` James TD Smith
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).