From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [RFI] Minutes of talks Date: Thu, 20 Jan 2011 23:33:57 +0100 Message-ID: <8739ontdbe.wl%n.goaziou@gmail.com> References: <80ei89ui8k.fsf@missioncriticalit.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return-path: Received: from [140.186.70.92] (port=39603 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pg34w-0001Nx-GF for emacs-orgmode@gnu.org; Thu, 20 Jan 2011 17:34:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pg34u-0004Ki-Se for emacs-orgmode@gnu.org; Thu, 20 Jan 2011 17:34:06 -0500 Received: from mail-wy0-f169.google.com ([74.125.82.169]:49236) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pg34u-0004Ka-ME for emacs-orgmode@gnu.org; Thu, 20 Jan 2011 17:34:04 -0500 Received: by wyj26 with SMTP id 26so1274601wyj.0 for ; Thu, 20 Jan 2011 14:34:03 -0800 (PST) In-Reply-To: <80ei89ui8k.fsf@missioncriticalit.com> 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: =?UTF-8?B?U8OpYmFzdGllbg==?= Vauban Cc: emacs-orgmode@gnu.org 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