emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug in org-log-into-drawer
@ 2012-10-27  6:09 Erik Hetzner
  2012-10-27  7:38 ` Bastien
  2012-10-27  9:00 ` Sebastien Vauban
  0 siblings, 2 replies; 8+ messages in thread
From: Erik Hetzner @ 2012-10-27  6:09 UTC (permalink / raw)
  To: emacs-orgmode

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

Hi,

Current the org-log-into-drawer function does not honor the value of
the LOG_INTO_DRAWER property if the property has the value nil. For
example, if the org-log-into-drawer variable is set to t, but we have
the file:

  * Foo
    :PROPERTIES:
    :LOG_INTO_DRAWER: nil
    :END:
  ** TODO Bar

org-mode will log changes to the TODO entry into a drawer. The
attached patch fixes the issue, allowing a nil value of the
LOG_INTO_DRAWER property to override a t value of the
org-log-into-drawer variable.

best, Erik


[-- Attachment #2: org-log-into-drawer-prop.diff --]
[-- Type: text/plain, Size: 635 bytes --]

diff --git a/lisp/org.el b/lisp/org.el
index 4e79125..2aa70bd 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -2519,9 +2519,10 @@ a subtree."
   "Return the value of `org-log-into-drawer', but let properties overrule.
 If the current entry has or inherits a LOG_INTO_DRAWER property, it will be
 used instead of the default value."
-  (let ((p (org-entry-get nil "LOG_INTO_DRAWER" 'inherit)))
+  (let ((p (org-entry-get nil "LOG_INTO_DRAWER" 'inherit t)))
     (cond
-     ((or (not p) (equal p "nil")) org-log-into-drawer)
+     ((not p) org-log-into-drawer)
+     ((equal p "nil") nil)
      ((equal p "t") "LOGBOOK")
      (t p))))
 

[-- Attachment #3: Type: text/plain, Size: 53 bytes --]

Sent from my free software system <http://fsf.org/>.

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

end of thread, other threads:[~2012-10-30  3:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-27  6:09 Bug in org-log-into-drawer Erik Hetzner
2012-10-27  7:38 ` Bastien
2012-10-27  9:00 ` Sebastien Vauban
2012-10-28  2:52   ` Erik Hetzner
2012-10-29  5:41     ` Bastien
2012-10-29 15:49       ` Erik Hetzner
2012-10-29 16:07         ` Sebastien Vauban
2012-10-30  3:30           ` Erik Hetzner

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