From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: [PATCH] small fix for org-log-beginning Date: Sun, 14 Dec 2014 14:46:05 +0800 Message-ID: <87bnn6n2z6.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45758) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y02r6-0007Tp-86 for emacs-orgmode@gnu.org; Sun, 14 Dec 2014 01:40:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y02r0-0004m3-1L for emacs-orgmode@gnu.org; Sun, 14 Dec 2014 01:40:36 -0500 Received: from plane.gmane.org ([80.91.229.3]:38118) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y02qz-0004lz-OT for emacs-orgmode@gnu.org; Sun, 14 Dec 2014 01:40:29 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Y02qy-0004CC-Bd for emacs-orgmode@gnu.org; Sun, 14 Dec 2014 07:40:28 +0100 Received: from 114.248.13.96 ([114.248.13.96]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 14 Dec 2014 07:40:28 +0100 Received: from eric by 114.248.13.96 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 14 Dec 2014 07:40:28 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain 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 --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Use-org-log-into-drawer-in-org-log-beginning.patch >From ac1a4eb4b153f18d8766fdbe6ba4e2168f80ec16 Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen 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 --=-=-=--