emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Create sub-directories and files from within org
@ 2013-10-19  2:35 Chris Henderson
  2013-10-19  9:19 ` Synchronizing folder structure with heading structure (was: Create sub-directories and files from within org) Karl Voit
  2013-10-20 16:58 ` Create sub-directories and files from within org John Kitchin
  0 siblings, 2 replies; 7+ messages in thread
From: Chris Henderson @ 2013-10-19  2:35 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 198 bytes --]

If I create a project with ** project name, is there any way to create a
sub-directory at *** level in ~/projects/project name and create txt files
in that directory - all from within org?

Thanks.

[-- Attachment #2: Type: text/html, Size: 241 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Synchronizing folder structure with heading structure (was: Create sub-directories and files from within org)
  2013-10-19  2:35 Create sub-directories and files from within org Chris Henderson
@ 2013-10-19  9:19 ` Karl Voit
  2013-10-20 16:58 ` Create sub-directories and files from within org John Kitchin
  1 sibling, 0 replies; 7+ messages in thread
From: Karl Voit @ 2013-10-19  9:19 UTC (permalink / raw)
  To: emacs-orgmode

* Chris Henderson <henders254@gmail.com> wrote:
>
> If I create a project with ** project name, is there any way to create a
> sub-directory at *** level in ~/projects/project name and create txt files
> in that directory - all from within org?

Disclaimer: this is not an answer to your question but a remark.

I know of a cool project (non Org-mode related) from the Personal
Information Management professor William Jones (Univ. of Washington)
which is called Planz[1][4] (videos: [5]).  Its associated data
standard is called xooml[2]. (In case you are more interested in
this project/topic, drop me a line and I will happily share white
papers and links.) 

Simplified, the idea is that you can manage your files together with
an outlining structure of text, links, and such. The SW is
Windows-only. However, I found the idea very appealing because it
synchronizes folder structure together with the structure of your
text information.

It's a research software and thus it is not that good maintained.

Prof. Jones was a reviewer of my PhD thesis[3]. And we discussed a
bit the similarities and differences of Org-mode (my favorite tool)
to Planz (his favorite tool).

Since Planz is a decent Windows interface with cool workflow
support, I was thinking about implementing a bi-directional
synchronization tool between Org-mode and Planz. This should not be
that tough to do since xooml is based on text files (XML) and
Org-mode supports attached files and folders and such. However, my
focus changed (and I am not using Windows) and therefore the idea
pretty much died on my SOMEDAY ocean :-(

I just wanted to throw in this idea. Maybe somebody finds
Planz/xooml that cool that he/she is willing to spend a few
LISP-hours with it :-)


For the sake of completeness, I want to add that there is also
research work from Boardman et al. (approx. 2000-2006) who was
researching and propagating synchronizing hierarchical structures in
emails, bookmarks, file system, and so on. WorkspaceMirror is a tool
which was developed within this project. Interesting stuff to read.

In case you are interested in reading more about those projects, get
my PhD thesis from [3] (whitepaper section). In the background
chapter, there is plenty of cool stuff described and linked :-)

  1. http://kftf.ischool.washington.edu/planner_index.htm
  2. https://code.google.com/p/xooml/source/browse/#svn/trunk/Planz
  3. http://tagstore.org
  4. https://en.wikipedia.org/wiki/Planz
  5. https://www.youtube.com/watch?v=w0YbebvDUd0&noredirect=1
-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
       > get Memacs from https://github.com/novoid/Memacs <

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Create sub-directories and files from within org
  2013-10-19  2:35 Create sub-directories and files from within org Chris Henderson
  2013-10-19  9:19 ` Synchronizing folder structure with heading structure (was: Create sub-directories and files from within org) Karl Voit
@ 2013-10-20 16:58 ` John Kitchin
  2013-10-21 17:39   ` Skip Collins
  1 sibling, 1 reply; 7+ messages in thread
From: John Kitchin @ 2013-10-20 16:58 UTC (permalink / raw)
  To: Chris Henderson; +Cc: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 734 bytes --]

I don't understand what you are trying to do here. you could write a lisp
function that you run in the ** project name heading that creates a
directory by that name. But what would the txt files in that directory be?

John

-----------------------------------
John Kitchin
Associate Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu



On Fri, Oct 18, 2013 at 10:35 PM, Chris Henderson <henders254@gmail.com>wrote:

> If I create a project with ** project name, is there any way to create a
> sub-directory at *** level in ~/projects/project name and create txt files
> in that directory - all from within org?
>
> Thanks.
>

[-- Attachment #2: Type: text/html, Size: 1211 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Create sub-directories and files from within org
  2013-10-20 16:58 ` Create sub-directories and files from within org John Kitchin
@ 2013-10-21 17:39   ` Skip Collins
  2013-10-22  1:10     ` John Kitchin
  0 siblings, 1 reply; 7+ messages in thread
From: Skip Collins @ 2013-10-21 17:39 UTC (permalink / raw)
  To: John Kitchin; +Cc: emacs-orgmode@gnu.org, Chris Henderson

On Sun, Oct 20, 2013 at 12:58 PM, John Kitchin <jkitchin@andrew.cmu.edu> wrote:
>
> I don't understand what you are trying to do here. you could write a lisp
> function that you run in the ** project name heading that creates a directory
> by that name. But what would the txt files in that directory be?

I requested something like this functionality some time ago but never
found an answer. I create new projects in projects.org, via capture or
direct editing. Each project is a top-level heading that may sometimes
contain sub-headings, todos, etc. Most often it remains a simple
top-level heading containing a drawer but no body or subheadings. It
takes one of the following states: PROJ, DONE, CANCELED, or DORMANT. I
have several agenda views that track active projects (i.e. not done,
not canceled, and not dormant), and other tag attributes (personal,
professional, ...). I use a set of optional tags to track where
project data is kept: :org:, :computer:, :email:, :file:, :binder:,
etc. Many projects have the :computer: tag and a corresponding folder
on my hard drive with various file types stored there including txt,
docx, org, pdf, jpeg, etc. I would very much like a way to quickly
create that folder with the unique project name that I assign in the
top-level heading. It would be super nice if this automagic folder
creation feature also creates a link to the folder inside my
projects.org file.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Create sub-directories and files from within org
  2013-10-21 17:39   ` Skip Collins
@ 2013-10-22  1:10     ` John Kitchin
  2013-10-22 12:11       ` Skip Collins
  0 siblings, 1 reply; 7+ messages in thread
From: John Kitchin @ 2013-10-22  1:10 UTC (permalink / raw)
  To: Skip Collins; +Cc: emacs-orgmode@gnu.org, Chris Henderson

[-- Attachment #1: Type: text/plain, Size: 2184 bytes --]

You can do something like this:

#+BEGIN_SRC emacs-lisp
(defun make-project-dir-from-heading ()
  (interactive)
  (save-restriction
    (org-narrow-to-subtree)
    (let ((heading-title (nth 4 (org-heading-components))))
      (make-directory heading-title t)
      (goto-char (point-max))
      (insert (format "[[file:%s]]" heading-title)))))
#+END_SRC

* test-dir

some stuff

[[file:test-dir]]
* next-project


John

-----------------------------------
John Kitchin
Associate Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu



On Mon, Oct 21, 2013 at 1:39 PM, Skip Collins <skip.collins@gmail.com>wrote:

> On Sun, Oct 20, 2013 at 12:58 PM, John Kitchin <jkitchin@andrew.cmu.edu>
> wrote:
> >
> > I don't understand what you are trying to do here. you could write a lisp
> > function that you run in the ** project name heading that creates a
> directory
> > by that name. But what would the txt files in that directory be?
>
> I requested something like this functionality some time ago but never
> found an answer. I create new projects in projects.org, via capture or
> direct editing. Each project is a top-level heading that may sometimes
> contain sub-headings, todos, etc. Most often it remains a simple
> top-level heading containing a drawer but no body or subheadings. It
> takes one of the following states: PROJ, DONE, CANCELED, or DORMANT. I
> have several agenda views that track active projects (i.e. not done,
> not canceled, and not dormant), and other tag attributes (personal,
> professional, ...). I use a set of optional tags to track where
> project data is kept: :org:, :computer:, :email:, :file:, :binder:,
> etc. Many projects have the :computer: tag and a corresponding folder
> on my hard drive with various file types stored there including txt,
> docx, org, pdf, jpeg, etc. I would very much like a way to quickly
> create that folder with the unique project name that I assign in the
> top-level heading. It would be super nice if this automagic folder
> creation feature also creates a link to the folder inside my
> projects.org file.
>

[-- Attachment #2: Type: text/html, Size: 2956 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Create sub-directories and files from within org
  2013-10-22  1:10     ` John Kitchin
@ 2013-10-22 12:11       ` Skip Collins
  2013-10-24 23:37         ` John Kitchin
  0 siblings, 1 reply; 7+ messages in thread
From: Skip Collins @ 2013-10-22 12:11 UTC (permalink / raw)
  To: John Kitchin; +Cc: emacs-orgmode@gnu.org, Chris Henderson

On Mon, Oct 21, 2013 at 9:10 PM, John Kitchin <jkitchin@andrew.cmu.edu> wrote:
> You can do something like this:

Neat! I will give it a shot. I might also try to incorporate it into a
capture template.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Create sub-directories and files from within org
  2013-10-22 12:11       ` Skip Collins
@ 2013-10-24 23:37         ` John Kitchin
  0 siblings, 0 replies; 7+ messages in thread
From: John Kitchin @ 2013-10-24 23:37 UTC (permalink / raw)
  To: Skip Collins; +Cc: emacs-orgmode@gnu.org, Chris Henderson

[-- Attachment #1: Type: text/plain, Size: 642 bytes --]

how would you do that? in a template or in a hook? would directory creation
be a side effect of a sexp in the template?

John

-----------------------------------
John Kitchin
Associate Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu



On Tue, Oct 22, 2013 at 8:11 AM, Skip Collins <skip.collins@gmail.com>wrote:

> On Mon, Oct 21, 2013 at 9:10 PM, John Kitchin <jkitchin@andrew.cmu.edu>
> wrote:
> > You can do something like this:
>
> Neat! I will give it a shot. I might also try to incorporate it into a
> capture template.
>

[-- Attachment #2: Type: text/html, Size: 1169 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-10-24 23:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-19  2:35 Create sub-directories and files from within org Chris Henderson
2013-10-19  9:19 ` Synchronizing folder structure with heading structure (was: Create sub-directories and files from within org) Karl Voit
2013-10-20 16:58 ` Create sub-directories and files from within org John Kitchin
2013-10-21 17:39   ` Skip Collins
2013-10-22  1:10     ` John Kitchin
2013-10-22 12:11       ` Skip Collins
2013-10-24 23:37         ` John Kitchin

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).