emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: emacs-orgmode@gnu.org
Subject: [PATCH] small fix for org-log-beginning
Date: Sun, 14 Dec 2014 14:46:05 +0800	[thread overview]
Message-ID: <87bnn6n2z6.fsf@ericabrahamsen.net> (raw)

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

I'm still slowly chewing on making more use of log items, and found a
small bug in org-log-beginning. It contains a partial re-implementation
of something we already have a function for: org-log-into-drawer. It was
causing me occasional bugs, but I only just looked into it.

I'm not sure the commit message makes a whole lot of sense, but...


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Use-org-log-into-drawer-in-org-log-beginning.patch --]
[-- Type: text/x-diff, Size: 910 bytes --]

From ac1a4eb4b153f18d8766fdbe6ba4e2168f80ec16 Mon Sep 17 00:00:00 2001
From: Eric Abrahamsen <eric@ericabrahamsen.net>
Date: Sun, 14 Dec 2014 14:38:34 +0800
Subject: [PATCH] Use org-log-into-drawer in org-log-beginning

* lisp/org.el (org-log-beginning): Use existing function for
  discovering the log specification.
 lisp/org.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index bed5cb9..4aa7988 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -13609,8 +13609,7 @@ narrowing."
    (if (org-at-heading-p) (point)
      (let ((end (save-excursion (outline-next-heading) (point)))
-	   (drawer (cond ((stringp org-log-into-drawer) org-log-into-drawer)
-			 (org-log-into-drawer "LOGBOOK"))))
+	   (drawer (org-log-into-drawer)))
 	 (let ((regexp (concat "^[ \t]*:" (regexp-quote drawer) ":[ \t]*$"))

             reply	other threads:[~2014-12-14  6:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-14  6:46 Eric Abrahamsen [this message]
2014-12-14  8:15 ` [PATCH] small fix for org-log-beginning Nicolas Goaziou
2014-12-14  9:09   ` Eric Abrahamsen

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:

  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=87bnn6n2z6.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=emacs-orgmode@gnu.org \


* 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


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