From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Rose Subject: Re: combine orgmode and file system browsing Date: Sat, 21 Mar 2009 03:20:37 +0100 Message-ID: <878wmz4nwq.fsf@kassiopeya.MSHEIMNETZ> References: <20090321041113.686f8bba.andy13@gmx.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LkqmD-0003QC-RM for emacs-orgmode@gnu.org; Fri, 20 Mar 2009 22:17:33 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lkqm8-0003NQ-RW for emacs-orgmode@gnu.org; Fri, 20 Mar 2009 22:17:32 -0400 Received: from [199.232.76.173] (port=47638 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lkqm8-0003NG-DB for emacs-orgmode@gnu.org; Fri, 20 Mar 2009 22:17:28 -0400 Received: from mail.gmx.net ([213.165.64.20]:36423) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1Lkqm7-0000pA-Ln for emacs-orgmode@gnu.org; Fri, 20 Mar 2009 22:17:28 -0400 In-Reply-To: <20090321041113.686f8bba.andy13@gmx.net> (Andreas Burtzlaff's message of "Sat, 21 Mar 2009 04:11:13 +0100") 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: Andreas Burtzlaff Cc: emacs-orgmode@gnu.org Hi Andreas, I like the idea of it. Might be a nice way to jump to a file quickly since I could find the link with `C-s' or `C-c o'. Maybe this helps in the TODO file of small/medium project. I'll keep it and probably use it :-) Regards, Sebastian Andreas Burtzlaff writes: > Hello everyone, > > while using orgmode to organize data that is strongly bound to files > and directories, I came to the point where in addition to linking from > the orgfile to the target file/directory I longed to have it the other > way round, i.e. getting information about the files/directories > from the orgfile while browsing the filesystem. That led to the > following idea: > > Orgmodes folding and linking capabilities are easily combined to > make rudimentary but comfortable file system browsing: > > * [[file:test/dirA][dirA]] > ** [[file:test/dirA/subdirA][subdirA]] > *** [[file:test/dirA/subdirA/some_file][some_file]] > ** [[file:test/dirA/another_file][another_file]] > * [[file:test/dirB][dirB]] > > Attached is a bash-script that generates this representation from a > given subtree of the filesystem as a proof of concept. > > For each file/directory displayed search for any link to it in a > given orgfile and > - provide links back to these occurrences > and/or > - display the tags and associated content (read-only). > > The obvious weakness inherited from linking itself is synchronization on directory > structure changes. A possible solution would be to store ids as > hidden files for each directory or even for each file that is referred to. > > Does anybody else see the benefits of such a mode? > > Andreas > > #!/bin/bash > > DIR=$1 > > function toOrgRec { > local BUFFER="" > for d in $( echo "$(find $1 -maxdepth 1 -type d )" | tail -n +2 ); do > > BUFFER="${BUFFER} > * [[file:${d}][$(basename ${d})]]" > > toOrgRec ${d} > BUFFER=${BUFFER}$( echo "${RETURN_BUFFER}" | sed "s/^\*/**/" | sed "s/^ / /" ) > > done > > for f in $(find $1 -maxdepth 1 -not -type d); do > > BUFFER="${BUFFER} > * [[file:${f}][$(basename "${f}" )]]" > > done > > RETURN_BUFFER=${BUFFER} > } > > toOrgRec ${DIR} > echo "$( echo "${RETURN_BUFFER}" | tail -n +2 )" > _______________________________________________ > 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 -- Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 Hannover Tel.: +49 (0)511 - 36 58 472 Fax: +49 (0)1805 - 233633 - 11044 mobil: +49 (0)173 - 83 93 417 Email: s.rose@emma-stil.de, sebastian_rose@gmx.de Http: www.emma-stil.de