Hi Tom, "Tom Breton (Tehom)" <te...@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 \307W\204 \307U\205P\310\n\307\"\203 \n\202\311\312!\313\314\f\"\315\316\317\206/\320\fD\320\nDFEE\n=\203F\321\322E\202O\323\nDC\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 _______________________________________________ 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