Hello,
> Sébastien Vauban writes:
> --8<---cut here---start->8---
> - Alice :: Our objectives are ...
> - Collegue :: We can show you our architecture. It indeed does this
> and this ...
> - Me :: What's your deadline?
>--8<---cut here---end--->8---
> The second one is not that easy to write (typing the terms when
> RET'ing), and is a bit difficult to use when the ideas expressed by
> the person speaking have to be broken into item lists -- not to
> speak about the problem when mixing text and list items and back to
> text, all of that inside another item...
I may have some kind of solution for you:
1. Get development code for lists at:
git://github.com/ngz/org-mode-lists.git new-struct
2. Write something like this:
#+begin_src org
,* Act 1 --- Scene 1
, :PROPERTIES:
, :PERSONA: Francisco Bernardo
, :END:
, Elsinore. A platform before the castle.
, - Bernardo :: Who's there?
#+end_src
3. Try the following function:
#+begin_src emacs-lisp
(defun org-write-screenplay (&optional checkbox)
"Insert item at point, with help to write scripts.
This function looks for the multi-valued property \"PERSONA\" in
the current headline, and get description tags preferably from
it. New tags are added to the property at creation.
Default tag value is chosen to facilitate writing dialogues.
In another type of list, it just behaves like `org-insert-item'.
If CHECKBOX is non-nil, add a checkbox to the newly created item."
(interactive "P")
(let ((itemp (org-in-item-p)) who)
(if (not itemp)
(error "Not in a list")
(let* ((struct (save-excursion (goto-char itemp) (org-list-struct)))
(prevs (org-list-prevs-alist struct))
(prev-item (org-list-get-prev-item itemp struct prevs))
(cur-tag (org-list-get-tag itemp struct))
(prev-tag (and prev-item (org-list-get-tag prev-item struct)))
(persona (org-entry-get-multivalued-property (point)
"PERSONA")))
(if (and persona cur-tag (member cur-tag persona))
(progn
(setq who (org-icompleting-read
"Who? " persona nil nil nil nil (or prev-tag
cur-tag)))
;; Make sure additionnal elements are stored in property
(org-list-insert-item (point) struct prevs nil (concat who "
:: "))
(unless (member who persona)
(org-entry-add-to-multivalued-property (point) "PERSONA"
who)))
;; Non-script type of list: just insert a new item
(let* ((desc (when prev-tag (concat (read-string "Term: ") " ::
")))
(checkp (and checkbox
(or (not desc)
(not (cdr (assq 'checkbox
org-list-automatic-rules)))
(setq struct (org-list-insert-item (point) struct prevs checkp
desc))
(org-list-write-struct struct (org-list-parents-alist struct))
(when checkp (org-update-checkbox-count-maybe
(looking-at org-list-full-item-re)
(goto-char (match-end 0))
#+end_src
4. Bind it to an accessible key. With ido, it should help a bit to
write description lists.
Regards,
-- Nicolas
___
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