emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Re: Jump to Heading Body, Create Plain List Item


From: Peter Jones
Subject: [Orgmode] Re: Jump to Heading Body, Create Plain List Item
Date: Sat, 21 Feb 2009 21:29:37 -0700
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.3 (darwin)

Peter Jones <address@hidden> writes:
> This is what I've come up with so far.  I have M-RET bound to the first
> function, and M-S-RET bound to the second function.

Small bug fix:

(defun pmade:org-list-append (&optional checkbox)
  "Append a plain list item to the current heading.  If the
current heading already has plain list items, a new one will be
added, otherwise a new plain list will be created.  If checkbox
is set, add a plain list item with a checkbox."
  (interactive "P")
  (when (not (org-insert-item (if checkbox 'checkbox)))
    (org-back-to-heading)
    (org-show-subtree)
    (outline-next-heading)
    (if (eolp) (newline)
      (newline)
      (previous-line))
    (org-indent-line-function)
    (insert (concat "-" (if checkbox " [ ] " " ")))))

(defun pmade:org-list-append-with-checkbox ()
  "Calls `pmade:org-list-append' with checkbox set."
  (interactive)
  (pmade:org-list-append t))

-- 
Peter Jones, http://pmade.com
pmade inc.  Louisville, CO US





reply via email to

[Prev in Thread] Current Thread [Next in Thread]