help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: writing ledger mode, date picker


From: Emanuel Berg
Subject: Re: writing ledger mode, date picker
Date: Sun, 08 Nov 2015 00:49:06 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

jenia.ivlev@gmail.com (jenia.ivlev) writes:

> I found an answer. I'm using `org-read-date`:
>
>        (let ((x (org-read-date)))
>
> But I'm reading the function org-read-date and
> I can't understand how it binds
> `calendar-cursor-to-date` to "enter" key press in
> calendar mode.
>
> What I see is that `org-ans2` is set in
> `org-eval-in-calendar`
>
> But what I don't understand is how do you bind
> `org-ans2`, `calendar-cursor-to-date` to the "enter"
> key in calendar mode.

I don't understand your question even 50%, but
assuming `calendar-cursor-to-date' is a command
(interactive function) then this should work:

    (define-key calendar-mode-map "\r" #'calendar-cursor-to-date)

If it doesn't, try add this:

    (defun calendar-cursor-to-date ()
      (interactive)
      (message "Calendar Crazy") )

Then it "works", or at least it shows you the
mechanics, so you can get it to work yourself when you
have defined your functions alright.

-- 
underground experts united
http://user.it.uu.se/~embe8573




reply via email to

[Prev in Thread] Current Thread [Next in Thread]