all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] small fix for org-log-beginning
@ 2014-12-14  6:46 Eric Abrahamsen
  2014-12-14  8:15 ` Nicolas Goaziou
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Abrahamsen @ 2014-12-14  6:46 UTC (permalink / raw)
  To: emacs-orgmode

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

Eric



[-- 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."
      (forward-line))
    (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)))
        (cond
 	(drawer
 	 (let ((regexp (concat "^[ \t]*:" (regexp-quote drawer) ":[ \t]*$"))
-- 
2.1.3


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

* Re: [PATCH] small fix for org-log-beginning
  2014-12-14  6:46 [PATCH] small fix for org-log-beginning Eric Abrahamsen
@ 2014-12-14  8:15 ` Nicolas Goaziou
  2014-12-14  9:09   ` Eric Abrahamsen
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Goaziou @ 2014-12-14  8:15 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: emacs-orgmode

Hello,

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

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

Applied. Thank you.


Regards,

-- 
Nicolas Goaziou

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

* Re: [PATCH] small fix for org-log-beginning
  2014-12-14  8:15 ` Nicolas Goaziou
@ 2014-12-14  9:09   ` Eric Abrahamsen
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Abrahamsen @ 2014-12-14  9:09 UTC (permalink / raw)
  To: emacs-orgmode

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Hello,
>
> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> 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.
>
> Applied. Thank you.
>
>
> Regards,

Ack, wait! I think that was a bad patch. If org-log-into-drawer is
simply set to t, the t falls through into the drawer regexp and causes
and error. I'm sorry -- I was sure I'd tested all the variants.

The question is, should `org-log-into-drawer' always return the string
name of the drawer or nil, or should `org-log-beginning' check if the
return value isn't a string, and substitute the "LOGBOOK" default? I
guess I'm leaning towards the first...

Eric

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

end of thread, other threads:[~2014-12-14  9:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-14  6:46 [PATCH] small fix for org-log-beginning Eric Abrahamsen
2014-12-14  8:15 ` Nicolas Goaziou
2014-12-14  9:09   ` Eric Abrahamsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.