emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Organizing org-mode files: Tree view
@ 2014-04-26 19:39 Dotan Cohen
  2014-04-27  1:56 ` David Masterson
  2014-04-28 16:16 ` Oleh
  0 siblings, 2 replies; 8+ messages in thread
From: Dotan Cohen @ 2014-04-26 19:39 UTC (permalink / raw)
  To: emacs-orgmode

Hi all, I am a VIM user enchanted by the power of org-mode. Please
excuse my apparent naivety!

I am moving from Zim Wiki (excellent GUI program) to either Vimwiki
(VIM plugin) or org-mode. I was surprised to see that org-mode has all
the features of several apps that I use, including Task Warrior, Zim
Wiki, and Tux Cards. However, one feature that is not clear to me is
how to organize the various org-mode files. Surely I wouldn't leave
that to the file system!

Is there some Emacs plugin that could present the org-mode files in a
tree-fashion, such as demonstrated on the left side of this Zim Wiki
screenshot?
https://camo.githubusercontent.com/40951b7e6f191da21bc02f4b386d8dd7da104587/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f3234363134342f323138303032302f63393830623761302d393666302d313165332d393764372d6238363464386639353134642e706e67

That image is part of a Vimwiki feature request, the full page is here:
https://github.com/vimwiki/vimwiki/issues/36

If there is a better way to organize the files, then I would love to
know how the more experienced users do it.

Thank you!

-- 
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com

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

* Re: Organizing org-mode files: Tree view
  2014-04-26 19:39 Organizing org-mode files: Tree view Dotan Cohen
@ 2014-04-27  1:56 ` David Masterson
  2014-04-27  2:26   ` Charles Berry
  2014-04-28 16:16 ` Oleh
  1 sibling, 1 reply; 8+ messages in thread
From: David Masterson @ 2014-04-27  1:56 UTC (permalink / raw)
  To: emacs-orgmode

Dotan Cohen <dotancohen@gmail.com> writes:

> Hi all, I am a VIM user enchanted by the power of org-mode. Please
> excuse my apparent naivety!
>
> I am moving from Zim Wiki (excellent GUI program) to either Vimwiki
> (VIM plugin) or org-mode. I was surprised to see that org-mode has all
> the features of several apps that I use, including Task Warrior, Zim
> Wiki, and Tux Cards. However, one feature that is not clear to me is
> how to organize the various org-mode files. Surely I wouldn't leave
> that to the file system!
>
> Is there some Emacs plugin that could present the org-mode files in a
> tree-fashion, such as demonstrated on the left side of this Zim Wiki
> screenshot?
> https://camo.githubusercontent.com/40951b7e6f191da21bc02f4b386d8dd7da104587/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f3234363134342f323138303032302f63393830623761302d393666302d313165332d393764372d6238363464386639353134642e706e67
>
> That image is part of a Vimwiki feature request, the full page is here:
> https://github.com/vimwiki/vimwiki/issues/36
>
> If there is a better way to organize the files, then I would love to
> know how the more experienced users do it.
>
> Thank you!

I guess the answer(s) would be Dired (builtin to Emacs) or External
Links in Org.

-- 
David Masterson
Programmer At Large

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

* Re: Organizing org-mode files: Tree view
  2014-04-27  1:56 ` David Masterson
@ 2014-04-27  2:26   ` Charles Berry
  0 siblings, 0 replies; 8+ messages in thread
From: Charles Berry @ 2014-04-27  2:26 UTC (permalink / raw)
  To: emacs-orgmode

David Masterson <dsmasterson <at> gmail.com> writes:

> 
> Dotan Cohen <dotancohen <at> gmail.com> writes:
> 
> > Hi all, I am a VIM user enchanted by the power of org-mode. Please
> > excuse my apparent naivety!
> >
> > I am moving from Zim Wiki (excellent GUI program) to either Vimwiki
> > (VIM plugin) or org-mode. I was surprised to see that org-mode has all
> > the features of several apps that I use, including Task Warrior, Zim
> > Wiki, and Tux Cards. However, one feature that is not clear to me is
> > how to organize the various org-mode files. Surely I wouldn't leave
> > that to the file system!
> >
> > Is there some Emacs plugin that could present the org-mode files in a
> > tree-fashion, such as demonstrated on the left side of this Zim Wiki
> > screenshot?
[snip]

> > If there is a better way to organize the files, then I would love to
> > know how the more experienced users do it.
> >
> > Thank you!
> 
> I guess the answer(s) would be Dired (builtin to Emacs) or External
> Links in Org.
> 

Which is pretty much what I use. But I think Dotan might want speedbar.

See http://www.emacswiki.org/emacs/SpeedBar

Just try it out, open a file -- perhaps a *.org file with multiple
headline levels -- and execute M-: (speedbar 1)

Browse emacswiki for other possibilities.

HTH,

Chuck

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

* Re: Organizing org-mode files: Tree view
  2014-04-26 19:39 Organizing org-mode files: Tree view Dotan Cohen
  2014-04-27  1:56 ` David Masterson
@ 2014-04-28 16:16 ` Oleh
  2014-04-29 11:24   ` Dotan Cohen
  1 sibling, 1 reply; 8+ messages in thread
From: Oleh @ 2014-04-28 16:16 UTC (permalink / raw)
  To: Dotan Cohen; +Cc: emacs-orgmode

Hi Dotan,

> If there is a better way to organize the files, then I would love to
> know how the more experienced users do it.

I'm using an extremely simplistic approach: just dump all the org
files into one directory.  The name of each org file should be concise
but descriptive, e.g. Makefile.org describes Makefiles, and git.org
describes git.

This simplicity completely alleviates organization effort: there's
nothing to organize, since there's only one directory to put the files in.
At the same time, it's very accessible by means of two `helm` wrappers:

- globally, "C-0" runs the command helm-org-wiki (the code is below)
- in org-mode, "g" runs the command wspecial-worf-goto (the code is at
https://github.com/abo-abo/worf)

It's like a two-stage personal Google: the first stage is to find an org-file,
the second stage is to search within an org-file.

For example, here's the sequence of key bindings when I want to look
up how git bisect works, assuming that I'm in some random buffer, like
`ansi-term`:

        C-0 gi RET g bis RET

Done. Note that "gi" was enough to match "git.org", since all my other
pages don't contain "gi".  Same thing for "bis" being able to match
uniquely the heading "git bisect".  I think that it's quite optimal
that I'm able to find the topic "git bisect" by using only 10 key
presses, which is the same as the amount of characters in "git
bisect".  Compare this to `helm-google-suggest` (bound to "C-p g"):

        C-p g git bi RET TAB RET

That's 12 key presses (10 in Emacs, 2 in Firefox).

New wiki pages can be created with "C-0" as well, just type in the
name of the new file and hit RET.

That's it, the code is below. It's very similar to `org-switchb`,
except that the files need not be opened to appear in the completion
list, and new files are created if there's no match.

    (defgroup helm-org-wiki nil
      "Simple jump-to-org-file package."
      :group 'org
      :prefix "helm-org-wiki-")
    (defcustom helm-org-wiki-directory "~/org/wiki/"
      "Directory where files for `helm-org-wiki' are stored."
      :group 'helm-org-wiki
      :type 'directory)
    (defun helm-org-wiki-files ()
      "Return .org files in `helm-org-wiki-directory'."
      (let ((default-directory helm-org-wiki-directory))
        (mapcar #'file-name-sans-extension
                (file-expand-wildcards "*.org"))))
    (defvar helm-source-org-wiki
      `((name . "Projects")
        (candidates . helm-org-wiki-files)
        (action . ,(lambda (x)
                      (find-file (expand-file-name
                                  (format "%s.org" x)
                                  helm-org-wiki-directory))))))
    (defvar helm-source-org-wiki-not-found
      `((name . "Create org-wiki")
        (dummy)
        (action . (lambda (x)
                    (helm-switch-to-buffer
                     (find-file
                      (format "%s/%s.org"
                              helm-org-wiki-directory x)))))))
    ;;;###autoload
    (defun helm-org-wiki ()
      "Select an org-file to jump to."
      (interactive)
      (helm :sources
            '(helm-source-org-wiki
              helm-source-org-wiki-not-found)))
    (provide 'helm-org-wiki)

regards,
Oleh

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

* Re: Organizing org-mode files: Tree view
  2014-04-28 16:16 ` Oleh
@ 2014-04-29 11:24   ` Dotan Cohen
  2014-04-29 12:13     ` Bastien
  0 siblings, 1 reply; 8+ messages in thread
From: Dotan Cohen @ 2014-04-29 11:24 UTC (permalink / raw)
  To: emacs-orgmode

Thank you Oleh, David, and Chuck. There are some good ideas in here,
all different than what I'm looking for but still viable (actually
speedbar might be _exactly_ what I'm looking for). I'm too new to
Emacs to yet see which of them fits my needs, so I'll experiment a bit
to see what works.

Thank you.

-- 
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com

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

* Re: Organizing org-mode files: Tree view
  2014-04-29 11:24   ` Dotan Cohen
@ 2014-04-29 12:13     ` Bastien
  2014-04-29 13:36       ` Oleh
  0 siblings, 1 reply; 8+ messages in thread
From: Bastien @ 2014-04-29 12:13 UTC (permalink / raw)
  To: Dotan Cohen; +Cc: emacs-orgmode

Hi Dotan,

Dotan Cohen <dotancohen@gmail.com> writes:

> Thank you Oleh, David, and Chuck. There are some good ideas in here,
> all different than what I'm looking for but still viable (actually
> speedbar might be _exactly_ what I'm looking for). I'm too new to
> Emacs to yet see which of them fits my needs, so I'll experiment a bit
> to see what works.

In your experiment, make sure you give a try to helm:
http://blog.jenkster.com/2013/10/finding-files-in-emacs-helm.html

https://github.com/emacs-helm/helm

There is a plugin for searching Org headlines:
https://github.com/emacs-helm/helm/blob/master/helm-org.el

HTH,

-- 
 Bastien

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

* Re: Organizing org-mode files: Tree view
  2014-04-29 12:13     ` Bastien
@ 2014-04-29 13:36       ` Oleh
  2014-04-29 23:11         ` Grant Rettke
  0 siblings, 1 reply; 8+ messages in thread
From: Oleh @ 2014-04-29 13:36 UTC (permalink / raw)
  To: Bastien; +Cc: Dotan Cohen, emacs-orgmode

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

Hi all,

> There is a plugin for searching Org headlines:
> https://github.com/emacs-helm/helm/blob/master/helm-org.el

There's also `worf-goto` (https://github.com/abo-abo/worf) that does
the same task as `helm-org-headlines`, and uses helm as well, but has
a better presentation, in my opinion.

I attach two screenshots for comparison.

regards,
Oleh

[-- Attachment #2: org-dependencies-helm-org.png --]
[-- Type: image/png, Size: 173580 bytes --]

[-- Attachment #3: org-dependencies-worf.png --]
[-- Type: image/png, Size: 133540 bytes --]

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

* Re: Organizing org-mode files: Tree view
  2014-04-29 13:36       ` Oleh
@ 2014-04-29 23:11         ` Grant Rettke
  0 siblings, 0 replies; 8+ messages in thread
From: Grant Rettke @ 2014-04-29 23:11 UTC (permalink / raw)
  To: Oleh; +Cc: Bastien, Dotan Cohen, emacs-orgmode

Projectile is another option : https://github.com/bbatsov/projectile
Grant Rettke | AAAS, ACM, ASA, FSF, IEEE, SIAM, Sigma Xi
grettke@acm.org | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson


On Tue, Apr 29, 2014 at 8:36 AM, Oleh <ohwoeowho@gmail.com> wrote:
> Hi all,
>
>> There is a plugin for searching Org headlines:
>> https://github.com/emacs-helm/helm/blob/master/helm-org.el
>
> There's also `worf-goto` (https://github.com/abo-abo/worf) that does
> the same task as `helm-org-headlines`, and uses helm as well, but has
> a better presentation, in my opinion.
>
> I attach two screenshots for comparison.
>
> regards,
> Oleh

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

end of thread, other threads:[~2014-04-29 23:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-26 19:39 Organizing org-mode files: Tree view Dotan Cohen
2014-04-27  1:56 ` David Masterson
2014-04-27  2:26   ` Charles Berry
2014-04-28 16:16 ` Oleh
2014-04-29 11:24   ` Dotan Cohen
2014-04-29 12:13     ` Bastien
2014-04-29 13:36       ` Oleh
2014-04-29 23:11         ` Grant Rettke

Code repositories for project(s) associated with this 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).