From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sullivan, Gregory \(US SSA\)" Subject: RE: set remember default file to be originating .org file Date: Wed, 6 Aug 2008 16:54:30 -0400 Message-ID: <73kku8$832p@dmzms99901.na.baesystems.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0142119258==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KQq1x-0000ly-3P for emacs-orgmode@gnu.org; Wed, 06 Aug 2008 16:54:49 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KQq1t-0000kH-My for emacs-orgmode@gnu.org; Wed, 06 Aug 2008 16:54:48 -0400 Received: from [199.232.76.173] (port=59728 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KQq1t-0000k9-H7 for emacs-orgmode@gnu.org; Wed, 06 Aug 2008 16:54:45 -0400 Received: from dmzms99901.na.baesystems.com ([149.32.200.65]:18681) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1KQq1t-0001DE-54 for emacs-orgmode@gnu.org; Wed, 06 Aug 2008 16:54:45 -0400 content-class: urn:content-classes:message 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: "Sullivan, Gregory (US SSA)" , emacs-orgmode@gnu.org This is a multi-part message in MIME format. --===============0142119258== content-class: urn:content-classes:message Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C8F806.9F422AA8" This is a multi-part message in MIME format. ------_=_NextPart_001_01C8F806.9F422AA8 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable OK - I did the following. I allow for functions in the filename positions of templates, changing org-remember.el as follows: =20 > 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 =3D [%S]" file)) ~/emacs/org/lisp >=20 =20 So my remember template list includes: =20 ("Todo (local)" ?t "* TODO %? %i\n" ,(lambda () (buffer-file-name org-select-template-original-buffer)) =20 So if I invoke org-remember and choose "t", it will save the resulting TODO item in the file from which I invoked remember. =20 Could be made more robust, but it works for me. Let me know if you think this might be generally useful. =20 --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) gregory.sullivan@baesystems.com=20 ________________________________________ From: emacs-orgmode-bounces+gregory.sullivan=3Dbaesystems.com@gnu.org [mailto:emacs-orgmode-bounces+gregory.sullivan=3Dbaesystems.com@gnu.org] 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 =20 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". =20 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. =20 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) gregory.sullivan@baesystems.com=20 =20 ------_=_NextPart_001_01C8F806.9F422AA8 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

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))

< =             &= nbsp;     (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 =3D [%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)

gregory.sullivan@baesystems.com

________________________________________=

From: = emacs-orgmode-bounces+gregory.sullivan=3Dbaesystems.com@gnu.org [mailto:emacs-orgmode-bounces+gregory.sullivan=3Dbaesystems.com@gnu.org] = 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)

gregory.sullivan@baesystems.com

 

------_=_NextPart_001_01C8F806.9F422AA8-- --===============0142119258== 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 --===============0142119258==--