From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: emacs-orgmode@gnu.org
Subject: Re: [RFC] Display most recent log item in Agenda
Date: Sun, 14 Dec 2014 23:12:07 +0800 [thread overview]
Message-ID: <87y4qal0zc.fsf@ericabrahamsen.net> (raw)
In-Reply-To: 87388imto5.fsf@ericabrahamsen.net
[-- Attachment #1: Type: text/plain, Size: 534 bytes --]
Eric Abrahamsen <eric@ericabrahamsen.net> writes:
> Undeterred by my previous bum patch, I'm sending more patches!
>
> Most of these are "what do you think" patches.
>
> 1. Ensure-org-log-into-drawer-returns-nil-or-string
>
> If the answer to my last question is "make sure `org-log-into-drawer'
> never returns just t", then this patch does that. If that isn't the
> answer, something can be done with `org-log-beginning'.
Nope, I just shouldn't be posting patches today. One should not code
while hungover. Fixed patch attached.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Ensure-org-log-into-drawer-returns-nil-or-string.patch --]
[-- Type: text/x-diff, Size: 936 bytes --]
From c99d6065ae25d927a395f9aed611fab22b8e40c9 Mon Sep 17 00:00:00 2001
From: Eric Abrahamsen <eric@ericabrahamsen.net>
Date: Sun, 14 Dec 2014 17:31:49 +0800
Subject: [PATCH 1/4] Ensure org-log-into-drawer returns nil or string
* lisp/org.el (org-log-into-drawer): Don't let it simply return t.
---
lisp/org.el | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lisp/org.el b/lisp/org.el
index 4aa7988..db5810d 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -2969,7 +2969,11 @@ 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 t)))
(cond
- ((not p) org-log-into-drawer)
+ ((not p)
+ (when org-log-into-drawer
+ (if (stringp org-log-into-drawer)
+ org-log-into-drawer
+ "LOGBOOK")))
((equal p "nil") nil)
((equal p "t") "LOGBOOK")
(t p))))
--
2.1.3
[-- Attachment #3: Type: text/plain, Size: 1224 bytes --]
> 2. Missing-comma-in-org-agenda-with-point-at-orig-entry
>
> The (currently unused) macro `org-agenda-with-point-at-orig-entry' is
> missing a comma.
>
> 3. New-function-org-get-log-list and
> New-function-org-agenda-show-log-item
>
> This is the "what do you think part". The first patch finds and returns
> the state log items of the current entry, as a list of parsed elements.
> It probably doesn't try hard enough to make sure it's really found the
> list.
>
> The second implements an Agenda command which displays the text of the
> most recent note on the entry under point. I use logging a lot, and am
> forever looking at "WAIT" or "NEXT" todos, and wondering what the heck I
> was waiting for, or actually supposed to do next.
>
> If this is acceptable in principle, the finished product would probably
> be a normal org-mode function, with an Agenda implementation on top of
> that, and maybe some sort of guard against displaying overly-long notes.
>
> Alternately, I could probably make this into something akin to
> org-agenda-entry-text-mode, where *all* entries have their most recent
> log item stuck under them. I find that sort of thing distracting, but
> some people might like it.
>
> WDYT?
>
> Eric
next prev parent reply other threads:[~2014-12-14 15:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-14 10:07 [RFC] Display most recent log item in Agenda Eric Abrahamsen
2014-12-14 15:12 ` Eric Abrahamsen [this message]
2014-12-14 20:34 ` Nicolas Goaziou
2014-12-15 1:34 ` Eric Abrahamsen
2014-12-15 12:43 ` Nicolas Goaziou
2014-12-16 2:26 ` Eric Abrahamsen
2014-12-16 9:10 ` Nicolas Goaziou
2014-12-17 7:16 ` Eric Abrahamsen
2014-12-20 21:13 ` Nicolas Goaziou
2014-12-19 8:50 ` Eric Abrahamsen
2014-12-20 21:02 ` Nicolas Goaziou
2014-12-21 4:08 ` Eric Abrahamsen
2014-12-15 4:29 ` Eric Abrahamsen
2014-12-15 12:33 ` Nicolas Goaziou
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=87y4qal0zc.fsf@ericabrahamsen.net \
--to=eric@ericabrahamsen.net \
--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).