From mboxrd@z Thu Jan 1 00:00:00 1970 From: Austin Frank Subject: FR: move subtree to category's file Date: Wed, 17 Oct 2007 18:18:59 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1934088456==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IiHEu-0002wQ-5v for emacs-orgmode@gnu.org; Wed, 17 Oct 2007 18:19:44 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IiHEt-0002uG-Ae for emacs-orgmode@gnu.org; Wed, 17 Oct 2007 18:19:43 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IiHEt-0002tz-7K for emacs-orgmode@gnu.org; Wed, 17 Oct 2007 18:19:43 -0400 Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IiHEs-00025T-LB for emacs-orgmode@gnu.org; Wed, 17 Oct 2007 18:19:43 -0400 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1IiHEf-0004gv-2k for emacs-orgmode@gnu.org; Wed, 17 Oct 2007 22:19:29 +0000 Received: from colossus.cvs.rochester.edu ([128.151.80.181]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 17 Oct 2007 22:19:29 +0000 Received: from austin.frank by colossus.cvs.rochester.edu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 17 Oct 2007 22:19:29 +0000 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: emacs-orgmode@gnu.org --===============1934088456== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --=-=-= Content-Transfer-Encoding: quoted-printable Hello! I'd like to propose some functionality that I think would be useful, and offer a very naive proof-of-concept implementation. The basic idea is that I'd like to be able to add or change a property on a tree, and then move the whole tree to a location based on that property. To be more concrete, I take lots of notes with remember. They all get saved to ~/notes.org. Later in the day, I go back and add a PROJECT or CATEGORY property to many of these notes. Especially for a tree that has to do with a project, I'd like to be able to quickly file the note away in a file dedicated to that project by moving the tree to a predefined file. I know that there's a lot of power in the one-file-to-rule-them-all approach, and that there are lots of ways I could view just the parts of the file that have to do with a given project. So if this idea is a non-starter, that's fine, too. Still there are some contexts where having multiple files can be a good thing (for example, when using the org-publish-project-alist). I've got a very simple implementation of the idea that goes like this: ;; My filing system (setplist 'project '(research1 "~/research1.org" grant1 "~/grant1.org")) =20=20=20=20 (defun aff-org-move-to-project-file () "Use value of the PROJECT property to move the subtree at the point to a predefined file." (interactive) (let* ((pom (point)) (file (get 'project (intern (org-entry-get pom "PROJECT"))))) (org-cut-subtree) (org-open-file file) (end-of-buffer) (org-paste-subtree))) This is does the basic job, but it'd be neat to see it extended in a couple of ways: - Have a single variable that defines mappings for multiple properties. Something like ;; probably lousy syntax for this, but ;; ("PROP_NAME" ("prop_value" "associated_info")) (setq org-property-map '(("PROJECTS" ("research" "research.org" "grants" "grants.org")) ("CATEGORY" (chores "home.org")))) - Be able to use the syntax for linking to other org files to specify a location in the other file to insert the tree - With a prefix, be prompted for location to insert the tree in the file, like with remember notes - When more than one property of a given tree has a destination defined, prompt for which location to use=20=20 - It would also be nice to use these values to build appropriate archive locations, so that (for example) any DONE item with a value of "research" for the "PROJECT" category would be archived at the bottom of the research.org file rather than the default org-archive-location. This whole proposal is basically just a generalization of org-archive-subtree and org-archive-location to allow movement and archiving based on properties other than just ARCHIVE. Hopefully this means most of the required functionality is already in place. I know that for my workflow this would be very useful. Would other folks also like to have this functionality? Thanks, /au =2D-=20 Austin Frank http://aufrank.net GPG Public Key (D7398C2F): http://aufrank.net/personal.asc --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) iD8DBQFHFopTlHMl2/XbR4ERAid/AKC5O/tLlEp9hyTqyMnnSTdx8j44pQCfSMXr 1vDNUJ2jsfJPfwh9pEvK120= =Uwlh -----END PGP SIGNATURE----- --=-=-=-- --===============1934088456== 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 --===============1934088456==--