From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: property values and timestamps Date: Fri, 14 Oct 2011 12:29:35 -0400 Message-ID: <26314.1318609775@alphaville.dokosmarshall.org> References: <11760.1318571403@alphaville.dokosmarshall.org> <25568.1318607969@alphaville.dokosmarshall.org> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([140.186.70.92]:51228) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1REkdf-00008c-Ir for emacs-orgmode@gnu.org; Fri, 14 Oct 2011 12:29:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1REkde-00068k-Di for emacs-orgmode@gnu.org; Fri, 14 Oct 2011 12:29:39 -0400 Received: from g5t0007.atlanta.hp.com ([15.192.0.44]:14079) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1REkde-00068f-8r for emacs-orgmode@gnu.org; Fri, 14 Oct 2011 12:29:38 -0400 In-Reply-To: Message from Nick Dokos of "Fri, 14 Oct 2011 11:59:29 EDT." <25568.1318607969@alphaville.dokosmarshall.org> 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: Skip Collins , emacs-orgmode@gnu.org Cc: nicholas.dokos@hp.com Nick Dokos wrote: > Skip Collins wrote: > > > > org-time-stamp-inactive uses the minibuffer, and calling > > > a function that uses the minibuffer *from* the minibuffer (as > > > org-set-property would do) make emacs unhappy. > > > > Elisp does seem to allow recursive minibuffers: > > http://www.gnu.org/software/emacs/elisp/html_node/Recursive-Mini.html > > > > Would the implementation of this for org-set-property be straightforward? > > > > Oh, very nice: I didn't know about that. Here's a proof-of-concept > snippet, redefining the org-completing-read function to bind > org-time-stamp-inactive to a key ("!" in the following, but you will > probably want to season to taste): > > (setq enable-recursive-minibuffers t) > > (defun org-completing-read (&rest args) > "Completing-read with SPACE being a normal character." > (let ((minibuffer-local-completion-map > (copy-keymap minibuffer-local-completion-map))) > (org-defkey minibuffer-local-completion-map " " 'self-insert-command) > (org-defkey minibuffer-local-completion-map "?" 'self-insert-command) > (org-defkey minibuffer-local-completion-map "!" 'org-time-stamp-inactive) > (apply 'org-icompleting-read args))) > > It even seems to work!-) > Still a proof-of-concept, but better than the first attempt - set recursive minibuffers locally and use the standard keybinding: --8<---------------cut here---------------start------------->8--- (defun org-completing-read (&rest args) "Completing-read with SPACE being a normal character." (let ((minibuffer-local-completion-map (copy-keymap minibuffer-local-completion-map)) (enable-recursive-minibuffers t)) (org-defkey minibuffer-local-completion-map " " 'self-insert-command) (org-defkey minibuffer-local-completion-map "?" 'self-insert-command) (org-defkey minibuffer-local-completion-map (kbd "C-c !") 'org-time-stamp-inactive) (apply 'org-icompleting-read args))) --8<---------------cut here---------------end--------------->8--- Nick