emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Yasushi SHOJI <yashi@atmark-techno.com>
To: tonyday567@gmail.com
Cc: emacs-orgmode@gnu.org
Subject: Re: org bingo
Date: Mon, 07 Jan 2013 12:22:19 +0900	[thread overview]
Message-ID: <87mwwl8yok.wl@dns1.atmark-techno.com> (raw)
In-Reply-To: <m2zk19l1me.fsf@gmail.com>

Hi Tony,

At Thu, 20 Dec 2012 16:43:37 +1100,
Tony Day wrote:
> org-random-entry: select and goto a random todo entry. Prefix allows you
> to select which todo keyword.
> https://gist.github.com/4343164

love that idea!

However, I accidentally tried org-random-entry after org-agenda-exit
and got following:

  debug(error (error "Selecting deleted buffer"))
  (catch (quote exit) (org-compile-prefix-format (quote todo))...
  (let* ((today (org-today)) (date (calendar-....
  call-interactively(org-random-entry record nil)

this is because org-compile-prefix-format assumed to have
org-agenda-buffer set either 'nil' or 'live buffer', but not
'#<killedbuffer>'. I'm not sure it is good idea to fix the
org-compile-prefix-format itself or not. so I came up with the
following fix:

diff --git a/dotemacs.org b/dotemacs.org
index 302ac53..c4042a1 100644
--- a/dotemacs.org
+++ b/dotemacs.org
@@ -9,6 +9,8 @@
            (kwds org-todo-keywords-for-agenda)
            (lucky-entry nil)
            (completion-ignore-case t)
+           (org-agenda-buffer (if (buffer-live-p org-agenda-buffer)
+				  org-agenda-buffer))
             (if (stringp arg) arg
               (and arg (integerp arg) (> arg 0)

What do you think?


  parent reply	other threads:[~2013-01-07  3:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-20  5:43 org bingo Tony Day
2012-12-20 15:07 ` Myles English
2012-12-20 15:12 ` Bastien
2012-12-20 21:41   ` Tony Day
2013-01-07  3:22 ` Yasushi SHOJI [this message]
2013-01-07  7:16   ` Achim Gratz
2013-01-12  3:59     ` Tony Day

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=87mwwl8yok.wl@dns1.atmark-techno.com \
    --to=yashi@atmark-techno.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=tonyday567@gmail.com \


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