all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* FR:  move subtree to category's file
@ 2007-10-17 22:18 Austin Frank
  2007-10-28 20:25 ` Carsten Dominik
  0 siblings, 1 reply; 2+ messages in thread
From: Austin Frank @ 2007-10-17 22:18 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 3293 bytes --]

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

 - 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

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc

[-- Attachment #1.2: Type: application/pgp-signature, Size: 185 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
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] 2+ messages in thread

* Re: FR:  move subtree to category's file
  2007-10-17 22:18 FR: move subtree to category's file Austin Frank
@ 2007-10-28 20:25 ` Carsten Dominik
  0 siblings, 0 replies; 2+ messages in thread
From: Carsten Dominik @ 2007-10-28 20:25 UTC (permalink / raw)
  To: Austin Frank; +Cc: emacs-orgmode


Hi Austin,

this is related to Max Mikhanosha's proposal for some code to move an  
item from
a collector heading to a category heading.  Difference being that for  
you its different
files, not just different headings.

What I am wondering about is that your way might mean double work.
You assign a property that assigns a task to a project and then you  
want to
move it to the corresponding file.  Would just moving the entry not  
be better?

- you need to take only one action instead of two
- you don't need to clutter your tasks with properties that will be  
automatic
   from context in the destination file

- Carsten

On  18Oct2007, at 12:18 AM, Austin Frank wrote:

> 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"))
>
>     (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
>
>  - 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
>
> -- 
> Austin Frank
> http://aufrank.net
> GPG Public Key (D7398C2F): http://aufrank.net/personal.asc
> _______________________________________________
> 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] 2+ messages in thread

end of thread, other threads:[~2007-10-29  9:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-17 22:18 FR: move subtree to category's file Austin Frank
2007-10-28 20:25 ` Carsten Dominik

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.