Re: [Orgmode] set remember default file to be originating .org file

2008-09-03 Thread Carsten Dominik

I applied, this patch, thank you very much.

- Carsten

P.S.

Next time, please do a diff -u, this makes it easier for me to check  
things.


On Aug 6, 2008, at 10:54 PM, Sullivan, Gregory (US SSA) wrote:

OK – I did the following.  I allow for functions in the filename  
positions of templates, changing org-remember.el as follows:


> diff ../../org-6.05b/lisp/org-remember.el ./org-remember.el
321,322c321
< (file (if (and (nth 1 entry) (stringp (nth 1 entry))
<   (string-match "\\S-" (nth 1 entry)))
---
> (file (if (nth 1 entry)
351a351,353
>(when (functionp file)
>  (setq file (funcall file))
>  (message "after funcall file, file = [%S]" file))
~/emacs/org/lisp
>

So my remember template list includes:

 ("Todo (local)" ?t "* TODO %? %i\n"
  ,(lambda () (buffer-file-name org-select-template-original- 
buffer))


So if I invoke org-remember and choose “t”, it will save the  
resulting TODO item in the file from which I invoked remember.


Could be made more robust, but it works for me.
Let me know if you think this might be generally useful.

--Greg
--
Gregory T. Sullivan, Ph.D.
BAE Systems Advanced Information Technologies
6 New England Executive Park, Burlington, MA 01803
781-262-4553 (office),  978-430-3461 (cell)
[EMAIL PROTECTED]

From: [EMAIL PROTECTED]:[EMAIL PROTECTED] 
] On Behalf Of Sullivan, Gregory (US SSA)

Sent: Wednesday, August 06, 2008 11:55 AM
To: emacs-orgmode@gnu.org
Subject: [Orgmode] set remember default file to be originating .org  
file


If I invoke remember from a .org file, e.g. “foo.org”, I would like  
the default file to which the remembered note is saved to be that  
file, “foo.org”.


I work on several projects at a time, and the project mix changes  
monthly.  While on a project, I generate lots of project-specific  
notes and TODOs.  So, I like to have project-specific .org files.


Any ideas appreciated.
Thanks.
--Greg
--
Gregory T. Sullivan, Ph.D.
BAE Systems Advanced Information Technologies
6 New England Executive Park, Burlington, MA 01803
781-262-4553 (office),  978-430-3461 (cell)
[EMAIL PROTECTED]

___
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


___
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


RE: [Orgmode] set remember default file to be originating .org file

2008-08-06 Thread Sullivan, Gregory (US SSA)
OK - I did the following.  I allow for functions in the filename
positions of templates, changing org-remember.el as follows:

 

> diff ../../org-6.05b/lisp/org-remember.el ./org-remember.el

321,322c321

< (file (if (and (nth 1 entry) (stringp (nth 1 entry))

<   (string-match "\\S-" (nth 1 entry)))

---

> (file (if (nth 1 entry)

351a351,353

>(when (functionp file)

>  (setq file (funcall file))

>  (message "after funcall file, file = [%S]" file))

~/emacs/org/lisp

> 

 

So my remember template list includes:

 

 ("Todo (local)" ?t "* TODO %? %i\n"

  ,(lambda () (buffer-file-name
org-select-template-original-buffer))

 

So if I invoke org-remember and choose "t", it will save the resulting
TODO item in the file from which I invoked remember.

 

Could be made more robust, but it works for me.

Let me know if you think this might be generally useful.

 

--Greg

--

Gregory T. Sullivan, Ph.D.

BAE Systems Advanced Information Technologies

6 New England Executive Park, Burlington, MA 01803

781-262-4553 (office),  978-430-3461 (cell)

[EMAIL PROTECTED] 



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
On Behalf Of Sullivan, Gregory (US SSA)

Sent: Wednesday, August 06, 2008 11:55 AM

To: emacs-orgmode@gnu.org

Subject: [Orgmode] set remember default file to be originating .org file

 

If I invoke remember from a .org file, e.g. "foo.org", I would like the
default file to which the remembered note is saved to be that file,
"foo.org".

 

I work on several projects at a time, and the project mix changes
monthly.  While on a project, I generate lots of project-specific notes
and TODOs.  So, I like to have project-specific .org files.

 

Any ideas appreciated.

Thanks.

--Greg

--

Gregory T. Sullivan, Ph.D.

BAE Systems Advanced Information Technologies

6 New England Executive Park, Burlington, MA 01803

781-262-4553 (office),  978-430-3461 (cell)

[EMAIL PROTECTED] 

 

___
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


[Orgmode] set remember default file to be originating .org file

2008-08-06 Thread Sullivan, Gregory (US SSA)
If I invoke remember from a .org file, e.g. "foo.org", I would like the
default file to which the remembered note is saved to be that file,
"foo.org".

 

I work on several projects at a time, and the project mix changes
monthly.  While on a project, I generate lots of project-specific notes
and TODOs.  So, I like to have project-specific .org files.

 

Any ideas appreciated.

Thanks.

--Greg

--
Gregory T. Sullivan, Ph.D.
BAE Systems Advanced Information Technologies
6 New England Executive Park, Burlington, MA 01803
781-262-4553 (office),  978-430-3461 (cell)
[EMAIL PROTECTED] 


 

___
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