[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Setting org-remember-store-without-prompt specifically for
From: |
James TD Smith |
Subject: |
Re: [Orgmode] Setting org-remember-store-without-prompt specifically for certain templates? |
Date: |
Sun, 25 Oct 2009 17:10:50 +0000 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
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/address@hidden>-|
- [Orgmode] Setting org-remember-store-without-prompt specifically for certain templates?, Ryan C. Thompson, 2009/10/21
- Re: [Orgmode] Setting org-remember-store-without-prompt specifically for certain templates?, Darlan Cavalcante Moreira, 2009/10/22
- Re: [Orgmode] Setting org-remember-store-without-prompt specifically for certain templates?, Ryan C. Thompson, 2009/10/22
- Re: [Orgmode] Setting org-remember-store-without-prompt specifically for certain templates?, Carsten Dominik, 2009/10/24
- Re: [Orgmode] Setting org-remember-store-without-prompt specifically for certain templates?, Ryan C. Thompson, 2009/10/24
- Re: [Orgmode] Setting org-remember-store-without-prompt specifically for certain templates?, Carsten Dominik, 2009/10/25
- Re: [Orgmode] Setting org-remember-store-without-prompt specifically for certain templates?, Ryan C. Thompson, 2009/10/25
- Re: [Orgmode] Setting org-remember-store-without-prompt specifically for certain templates?, Carsten Dominik, 2009/10/25
- Re: [Orgmode] Setting org-remember-store-without-prompt specifically for certain templates?,
James TD Smith <=