* org-stow (Proof of concept)
@ 2011-01-14 23:15 Tom Breton (Tehom)
2011-02-11 13:37 ` Bastien
0 siblings, 1 reply; 8+ messages in thread
From: Tom Breton (Tehom) @ 2011-01-14 23:15 UTC (permalink / raw)
To: emacs-orgmode
I've written an addon that I call org-stow. The basic idea is that
all remember notes live in a notes section, and you can make another
location pretend that the note lives there. You build all or part of
a document that way. If you know how stow works, it's like stow for
outline items.
Yes, it's a little bit like refiling a note, but:
* Hopefully it's more convenient and natural to populate a whole
document this way.
* If you change your mind about a note later, you can just unstow
it.
It's at the proof of concept stage now. It stows notes, but doesn't
yet unstow them.
I used dblocks to mirror notes. They are automatically inserted by
org-stow, and their dynamic contents is essentially copied from the
notes.
Any interest in trying this out? I can push it if anyone else wants to
try it out.
Tom Breton (Tehom)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: org-stow (Proof of concept)
2011-01-14 23:15 org-stow (Proof of concept) Tom Breton (Tehom)
@ 2011-02-11 13:37 ` Bastien
2011-02-12 0:57 ` brian powell
2011-02-12 1:22 ` Tom Breton (Tehom)
0 siblings, 2 replies; 8+ messages in thread
From: Bastien @ 2011-02-11 13:37 UTC (permalink / raw)
To: Tom Breton (Tehom); +Cc: emacs-orgmode
"Tom Breton (Tehom)" <tehom@panix.com> writes:
> Any interest in trying this out? I can push it if anyone else wants to
> try it out.
I'm interested! Please let me know where I can read some code.
Thanks :)
--
Bastien
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: org-stow (Proof of concept)
2011-02-11 13:37 ` Bastien
@ 2011-02-12 0:57 ` brian powell
2011-02-12 1:22 ` Tom Breton (Tehom)
1 sibling, 0 replies; 8+ messages in thread
From: brian powell @ 2011-02-12 0:57 UTC (permalink / raw)
To: Bastien; +Cc: emacs-orgmode, Tom Breton (Tehom)
[-- Attachment #1.1: Type: text/plain, Size: 2263 bytes --]
You asked to hear from interested OrgMode users:
STOW is great software; yes, please push it--its great for testing and
sofware configuration (STOW is) it will be very interesting and maybe very
useful to see what you have in mind.
STOW reminds me of AUFS/UNIONFS and there may be other uses for people like
myself; people that are interested in using OrgMode in non-traditional ways:
You could use it in a real-time brainstorming group meeting---back-in and
back-out of one version of a plan/agenda. Maybe you could make "contingency
plans" or "Plan B's" or "Plan 9 From Outer Space" agendas!
Recently I stumbled on "NIX" which supports the config. of several software
versions of different and concurrent packaging systems like APT and RPM
co-existing in harmony. Ideas, agendas and notes in OrgMode can be seen the
same way maybe. GNU STOW was interesting for similar reasons. NIX can
help you escape from "library or version conflict hell"--ideas and notes in
OrgMode are like ideas that may be good; but, you may want to put them on
the back-burner or "org-stow" them away.
http://savannah.gnu.org/projects/stow (I believe this is what you are
refering to) claims "Stow is a package manager for people who don't use
package managers"--NIX and other meta-packaging systems are trying to
sidestep package management problems--regardless of the (usual) software
conflict problems.
One may use something like an "org-stow" to write a plan/story/script (in
outline OrgMode form) with many different versions for example.
There are org-drawers remember: http://orgmode.org/manual/Drawers.html
---can you org-stow things in org-drawers? like org-socks?
enough comedy; seriously though, yes please, I'm interested.
On Fri, Feb 11, 2011 at 8:37 AM, Bastien <bastien.guerry@wikimedia.fr>wrote:
> "Tom Breton (Tehom)" <tehom@panix.com> writes:
>
> > Any interest in trying this out? I can push it if anyone else wants to
> > try it out.
>
> I'm interested! Please let me know where I can read some code.
>
> Thanks :)
>
> --
> Bastien
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
[-- Attachment #1.2: Type: text/html, Size: 3244 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please 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] 8+ messages in thread
* Re: org-stow (Proof of concept)
2011-02-11 13:37 ` Bastien
2011-02-12 0:57 ` brian powell
@ 2011-02-12 1:22 ` Tom Breton (Tehom)
2011-02-12 10:57 ` Bastien
1 sibling, 1 reply; 8+ messages in thread
From: Tom Breton (Tehom) @ 2011-02-12 1:22 UTC (permalink / raw)
To: Bastien; +Cc: emacs-orgmode
> "Tom Breton (Tehom)" <tehom@panix.com> writes:
>
>> Any interest in trying this out? I can push it if anyone else wants to
>> try it out.
>
> I'm interested! Please let me know where I can read some code.
>
> Thanks :)
I pushed it just now; it's on branch stow-design. Here is a little
documentation:
*** How it works
It works by using dblocks as fake symbolic links. After you stow items,
you do org-dblock-update with a prefix argument (C-u C-c C-x C-u) which
syncs the dblocks.
That may or may not be the best way to do this. It's still experimental.
*** How to use it
The commands:
* org-stow-make-item-stowable makes an item stowable. It prompts you for
where to stow the item and remembers that information.
* org-stow-item stows the item at point, marking it accordingly.
* org-stow-unstow-item unstows the item at point, if it was stowed,
marking it accordingly.
* org-dblock-update - existing org command. Updates the dblocks to
reflect the current (un)stowing.
Thanks for the interest, and thanks Brian too.
Tom Breton (Tehom)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: org-stow (Proof of concept)
2011-02-12 1:22 ` Tom Breton (Tehom)
@ 2011-02-12 10:57 ` Bastien
2011-02-12 21:49 ` Tom Breton (Tehom)
0 siblings, 1 reply; 8+ messages in thread
From: Bastien @ 2011-02-12 10:57 UTC (permalink / raw)
To: Tom Breton (Tehom); +Cc: emacs-orgmode
Hi Tom,
"Tom Breton (Tehom)" <tehom@panix.com> writes:
> I pushed it just now; it's on branch stow-design.
Thanks!
(On a side note: I'd rather keep org-mode.git (remote) branches for
stuff we know we _will_ include, not just for testing code. Better
point to a public branch of yours in that case.)
> Here is a little
> documentation:
Can you show a real use-case? I'm still unsure in what situation
org-stow.el is useful... lack of imagination :)
> The commands:
>
> * org-stow-make-item-stowable makes an item stowable. It prompts you for
> where to stow the item and remembers that information.
>
> * org-stow-item stows the item at point, marking it accordingly.
I tries this.
With this file:
,----
| #+TITLE: Test org-stow
|
| * Tasks :Task:
|
| ** TODO Drop off Stuff :stowable:
| :PROPERTIES:
| :ID: 746eba6c-3e4b-441e-815c-cb2b88d848c6
| :STOW-TO: /home/guerry/test.org Tasks
| :END:
`----
M-x org-stow-make-item-stowable RET on "TODO Drop off stuff" is okay.
But M-x org-stow-item RET on the same item is not -- here is a
backtrace:
Debugger entered--Lisp error: (error "Bad type spec: (list string (repeat org-stow-source) (or null org-stow-target))")
signal(error ("Bad type spec: (list string (repeat org-stow-source) (or null org-stow-target))"))
error("Bad type spec: %s" (list string (repeat org-stow-source) (or null org-stow-target)))
cl-make-type-test(apair (list string (repeat org-stow-source) (or null org-stow-target)))
cl-make-type-test(apair org-stow-apair)
#[(form type &optional string) "\306 \203\0\b\307W\204\0 \307U\205P\310\n\307\"\203\0\n\202\x1f\311\312!\313\314\v\f\"\315\316\317\206/\320\fD\v\320\nDFEE\x14\v\n=\203F\321\x14\322E\202O\323\v\nDC\x14\322F*\207" [cl-optimize-speed cl-optimize-safety form temp type string cl-compiling-file 3 cl-simple-expr-p make-symbol "--cl-var--" or cl-make-type-test signal (quote wrong-type-argument) list quote progn nil let body] 9 ("/usr/local/share/emacs/24.0.50/lisp/emacs-lisp/cl-macs.elc" . 93074)](apair org-stow-apair)
(check-type apair org-stow-apair)
(lambda (apair) (check-type apair org-stow-apair) (if (third apair) (cdr apair) (list (second apair) (org-stow-make-target :type (quote virtual) :path (org-stow-target->path target-parent) :rv-virt-path (cons (first apair) (org-stow-target->rv-virt-path target-parent))))))(("Drop off Stuff" ([cl-struct-org-stow-source "746eba6c-3e4b-441e-815c-cb2b88d848c6" nil "Drop off Stuff"]) nil))
mapcar((lambda (apair) (check-type apair org-stow-apair) (if (third apair) (cdr apair) (list (second apair) (org-stow-make-target :type (quote virtual) :path (org-stow-target->path target-parent) :rv-virt-path (cons (first apair) (org-stow-target->rv-virt-path target-parent)))))) (("Drop off Stuff" ([cl-struct-org-stow-source "746eba6c-3e4b-441e-815c-cb2b88d848c6" nil "Drop off Stuff"]) nil)))
(let* ((alist (quote nil))) (dolist (src sources) (let* ((headline (org-stow-source->headline src)) (apair (assoc headline alist))) (if apair (progn (check-type apair org-stow-apair) (push src (second apair))) (push (list headline (list src) nil) alist)))) (when (eq (org-stow-target->type target-parent) (quote item)) (dolist (trgt (org-stow-get-target-children target-parent)) (let* ((rv-virt-path (org-stow-target->rv-virt-path trgt)) (headline (if rv-virt-path (car rv-virt-path) (last ...))) (apair (assoc headline alist))) (if apair (progn (check-type apair org-stow-apair) (assert (null ...)) (setf (third apair) trgt)) (push (list headline (quote nil) trgt) alist))))) (mapcar (function (lambda (apair) (check-type apair org-stow-apair) (if (third apair) (cdr apair) (list (second apair) (org-stow-make-target :type (quote virtual) :path (org-stow-target->path target-parent) :rv-virt-path (cons ... ...)))))) alist))
org-stow-get-split-arglists(([cl-struct-org-stow-source "746eba6c-3e4b-441e-815c-cb2b88d848c6" nil "Drop off Stuff"]) [cl-struct-org-stow-target item ("/home/guerry/test.org" "Tasks") nil])
(let* ((source-children (apply (function nconc) (mapcar (function (lambda (src) (let* ... ... children))) source-list))) (child-groups (org-stow-get-split-arglists source-children target))) (apply (function nconc) (mapcar (function (lambda (group) (apply (function org-stow-get-actions) group))) child-groups)))
org-stow-get-actions-item(([cl-struct-org-stow-source "746eba6c-3e4b-441e-815c-cb2b88d848c6" ("Drop off Stuff") nil]) [cl-struct-org-stow-target item ("/home/guerry/test.org" "Tasks") nil])
funcall(org-stow-get-actions-item ([cl-struct-org-stow-source "746eba6c-3e4b-441e-815c-cb2b88d848c6" ("Drop off Stuff") nil]) [cl-struct-org-stow-target item ("/home/guerry/test.org" "Tasks") nil])
org-stow-get-actions(([cl-struct-org-stow-source "746eba6c-3e4b-441e-815c-cb2b88d848c6" ("Drop off Stuff") nil]) [cl-struct-org-stow-target item ("/home/guerry/test.org" "Tasks") nil])
(let* ((target-path (org-entry-get-multivalued-property (point) "STOW-TO")) (source (org-stow-source-at-point)) (target (org-stow-path->target target-path)) (actions (org-stow-get-actions (list source) target))) (dolist (act actions) (apply (function org-stow-do-action) act)) (org-toggle-tag "stowable" (quote off)) (org-toggle-tag "stowed" (quote on)))
org-stow-item()
call-interactively(org-stow-item t nil)
execute-extended-command(nil)
call-interactively(execute-extended-command nil nil)
--
Bastien
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: org-stow (Proof of concept)
2011-02-12 10:57 ` Bastien
@ 2011-02-12 21:49 ` Tom Breton (Tehom)
2011-02-12 23:51 ` Bastien
0 siblings, 1 reply; 8+ messages in thread
From: Tom Breton (Tehom) @ 2011-02-12 21:49 UTC (permalink / raw)
To: Bastien; +Cc: emacs-orgmode
>
> M-x org-stow-make-item-stowable RET on "TODO Drop off stuff" is okay.
>
> But M-x org-stow-item RET on the same item is not -- here is a
> backtrace:
D'oh! I completely forgot about the type-checking code!
That's for development, not production. It just assertfails if the wrong
type is used. Very helpful in finding problems early. It relies on a
type-checking support module in emtest that defines certain types that
Common Lisp provides but cl doesn't.
I am pushing a quick fix where if that module is not available, the type
just always succeeds.
If you'd like the type-checking support (which is stand-alone) or all of
emtest, I can certainly include it. Since you seem to have chosen ert, I
don't know what you want in this regard.
Tom Breton (Tehom)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: org-stow (Proof of concept)
2011-02-12 21:49 ` Tom Breton (Tehom)
@ 2011-02-12 23:51 ` Bastien
2011-02-13 21:45 ` Tom Breton (Tehom)
0 siblings, 1 reply; 8+ messages in thread
From: Bastien @ 2011-02-12 23:51 UTC (permalink / raw)
To: Tom Breton (Tehom); +Cc: emacs-orgmode
Hi Tom,
"Tom Breton (Tehom)" <tehom@panix.com> writes:
> D'oh! I completely forgot about the type-checking code!
>
> That's for development, not production. It just assertfails if the wrong
> type is used. Very helpful in finding problems early. It relies on a
> type-checking support module in emtest that defines certain types that
> Common Lisp provides but cl doesn't.
>
> I am pushing a quick fix where if that module is not available, the type
> just always succeeds.
>
> If you'd like the type-checking support (which is stand-alone) or all of
> emtest, I can certainly include it. Since you seem to have chosen ert, I
> don't know what you want in this regard.
I'm roughly parsing 37% of this :)
Again, can you demonstrate a clear and simple use-case, assuming people
like me don't know anything about stow, stew, straw or whatsover?
Thanks!!
--
Bastien
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: org-stow (Proof of concept)
2011-02-12 23:51 ` Bastien
@ 2011-02-13 21:45 ` Tom Breton (Tehom)
0 siblings, 0 replies; 8+ messages in thread
From: Tom Breton (Tehom) @ 2011-02-13 21:45 UTC (permalink / raw)
To: Bastien; +Cc: emacs-orgmode, Tom Breton (Tehom)
>
> I'm roughly parsing 37% of this :)
I will try to use less jargon.
> Again, can you demonstrate a clear and simple use-case, assuming people
> like me don't know anything about stow, stew, straw or whatsover?
OK, here's a use-case. This is actually what I did right now while
recording a note that tells me to document a use-case.
* First I make a note with org-remember (C-c r)
* C-u C-c C-c to save it and go to it
* M-x org-stow-make-item-stowable
* It prompts me for a parent item. I choose
\home\tehom\projects\elisp\org-mode\doc\local\org-stow.org/org-stow/Progress/
With TAB, that's just a few keystrokes
* M-x org-stow-item
* Now there is a dblock from under "Progress" in org-stow.org that
corresponds to this note, but that dblock is still empty.
* Update dblocks
* C-u C-c C-x C-u
* You don't have to do this immediately; it will work at any time
* Now it appears in two places: In notes and under the heading "Progress".
* Can do other work on that item
* In fact, I set it to "TODO"
* Update dblocks again.
* Now the "stowed" copy says "TODO" too
* When I finish the writeup, I will come back here and set "DONE"
and update.
Another use-case:
* At this point I added this write-up as another note. So now
everything I'm doing to answer you is in notes.
* M-x org-stow-make-item-stowable
* This time I store it in
\home\tehom\projects\elisp\org-mode\doc\local\org-stow.org/org-stow/Docs/
* M-x org-stow-item, update dblocks
* Now the doc section of this file contains this item
* Finish writing it (a moment from now) and update.
So I've added to a document while just dealing with notes, and
crucially, I can retract individual notes that become obsolete.
Take care,
Tom Breton (Tehom)
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-02-13 21:45 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-14 23:15 org-stow (Proof of concept) Tom Breton (Tehom)
2011-02-11 13:37 ` Bastien
2011-02-12 0:57 ` brian powell
2011-02-12 1:22 ` Tom Breton (Tehom)
2011-02-12 10:57 ` Bastien
2011-02-12 21:49 ` Tom Breton (Tehom)
2011-02-12 23:51 ` Bastien
2011-02-13 21:45 ` Tom Breton (Tehom)
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).