emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] fix org-insert-todo-heading-respect-content in plain list item
@ 2013-10-27 16:48 Ingo Lohmar
  2013-10-28  8:43 ` Nicolas Goaziou
  0 siblings, 1 reply; 4+ messages in thread
From: Ingo Lohmar @ 2013-10-27 16:48 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 131 bytes --]

Hi guys,

please find attached a 1-4-char patch fixing the behavior of the above
function when inside a plain list.

Best,
Ingo




[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-really-always-insert-heading.patch --]
[-- Type: text/x-diff, Size: 1246 bytes --]

From e22f9ffe3f6af69cde2397f56a7efebaaa7710e0 Mon Sep 17 00:00:00 2001
From: Ingo Lohmar <i.lohmar@gmail.com>
Date: Sun, 27 Oct 2013 17:34:22 +0100
Subject: [PATCH] fix org-insert-todo-heading-respect-content in plain list item

* lisp/org.el (org-insert-todo-heading-respect-content): pass correct
prefix arg to always insert heading

TINYCHANGE

This function used a second argument t, which is eventually passed to
org-insert-heading, adding a list item when inside a plain list.  Use
the proper argument '(4) now, to always create a heading, just like
the function's name and documentation imply.

---
lisp/org.el | 4 ++-- 1 file changed, 2
insertions(+), 2 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 0fd531d..275f480 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -7770,7 +7770,7 @@ This is a list with the following elements:
   "Insert TODO heading with `org-insert-heading-respect-content' set to t."
   (interactive "P")
   (let ((org-insert-heading-respect-content t))
-    (org-insert-todo-heading force-state t)))
+    (org-insert-todo-heading force-state '(4))))

 (defun org-insert-todo-heading (arg &optional force-heading)
   "Insert a new heading with the same level and TODO state as current heading.
--
1.7.10.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-10-29  8:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-27 16:48 [PATCH] fix org-insert-todo-heading-respect-content in plain list item Ingo Lohmar
2013-10-28  8:43 ` Nicolas Goaziou
2013-10-28 19:35   ` Ingo Lohmar
2013-10-29  8:58     ` Nicolas Goaziou

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).