From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yasushi SHOJI Subject: Re: org bingo Date: Mon, 07 Jan 2013 12:22:19 +0900 Message-ID: <87mwwl8yok.wl@dns1.atmark-techno.com> References: Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from eggs.gnu.org ([208.118.235.92]:60114) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ts3I9-0007HY-Bd for emacs-orgmode@gnu.org; Sun, 06 Jan 2013 22:22:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ts3I8-0006Jj-44 for emacs-orgmode@gnu.org; Sun, 06 Jan 2013 22:22:25 -0500 Received: from p654782.hkidff01.ap.so-net.ne.jp ([121.101.71.130]:40220 helo=dns1.atmark-techno.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ts3I7-0006JU-Pr for emacs-orgmode@gnu.org; Sun, 06 Jan 2013 22:22:24 -0500 In-Reply-To: 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: tonyday567@gmail.com Cc: emacs-orgmode@gnu.org 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")) org-compile-prefix-format(todo) (catch (quote exit) (org-compile-prefix-format (quote todo))... (let* ((today (org-today)) (date (calendar-.... org-random-entry(nil) 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 '#'. 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)) (org-select-this-todo-keyword (if (stringp arg) arg (and arg (integerp arg) (> arg 0) What do you think? regards, -- yashi