emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Erik Hetzner <egh@e6h.org>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Bug in org-log-into-drawer
Date: Fri, 26 Oct 2012 23:09:35 -0700	[thread overview]
Message-ID: <87hapgv42o.wl%egh@e6h.org> (raw)

[-- 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/>.

             reply	other threads:[~2012-10-27  6:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-27  6:09 Erik Hetzner [this message]
2012-10-27  7:38 ` Bug in org-log-into-drawer 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87hapgv42o.wl%egh@e6h.org \
    --to=egh@e6h.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).