From: Nick Dokos <nicholas.dokos@hp.com>
To: Skip Collins <skip.collins@gmail.com>
Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org
Subject: Re: property values and timestamps
Date: Fri, 14 Oct 2011 11:59:29 -0400 [thread overview]
Message-ID: <25568.1318607969@alphaville.dokosmarshall.org> (raw)
In-Reply-To: Message from Skip Collins <skip.collins@gmail.com> of "Fri, 14 Oct 2011 11:40:07 EDT." <CABUh-75ocx903JXq-4P2RAtrygmaQnn6XsRSPy3WJqrE_1R4cQ@mail.gmail.com>
Skip Collins <skip.collins@gmail.com> 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):
--8<---------------cut here---------------start------------->8---
(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)))
--8<---------------cut here---------------end--------------->8---
It even seems to work!-)
Thanks,
Nick
next prev parent reply other threads:[~2011-10-14 15:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-14 5:16 property values and timestamps Skip Collins
2011-10-14 5:27 ` Nick Dokos
2011-10-14 10:36 ` Giovanni Ridolfi
2011-10-14 5:50 ` Nick Dokos
2011-10-14 15:40 ` Skip Collins
2011-10-14 15:59 ` Nick Dokos [this message]
2011-10-14 16:29 ` Nick Dokos
2011-10-14 17:34 ` Skip Collins
2011-10-21 15:48 ` Bastien
2011-10-21 15:47 ` Bastien
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=25568.1318607969@alphaville.dokosmarshall.org \
--to=nicholas.dokos@hp.com \
--cc=emacs-orgmode@gnu.org \
--cc=skip.collins@gmail.com \
/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).