emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Miro Bezjak <bezjak.miro@gmail.com>
To: Carsten Dominik <carsten.dominik@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: disable org-replace-disputed-keys for org-read-date
Date: Sat, 7 Sep 2013 23:39:00 +0200	[thread overview]
Message-ID: <CAMJqDfMkYvhaYoqNmoKoTeabs1jTqAyqvBMNX1WjOOzx5JFWjw@mail.gmail.com> (raw)
In-Reply-To: <CAMJqDfMOLPTZHqn-2NfPFrUJ+dh-zETTZfABGm9HwR_O_ntFXA@mail.gmail.com>

Dear Carsten,

actually forget my previous fix attempt. There is a better way. Here
is what I did to org.el to make it work.

------------------------
(defvar org-read-date-minibuffer-local-map
  (let* ((org-replace-disputed-keys nil)
     (map (make-sparse-keymap)))

... rest unchanged ...
------------------------

In words: I just added `(let* ((org-replace-disputed-keys nil)' right
where init-value of `org-read-date-minibuffer-local-map' is being
determined.

Kind Regards,
Miro

On Sat, Sep 7, 2013 at 10:22 PM, Miro Bezjak <bezjak.miro@gmail.com> wrote:
> Dear Carsten,
>
> sorry for not responding sooner. I've been on holiday and didn't see your
> messages.
>
> Unfortunately, setting `org-replace-disputed-keys' to `nil' inside
> `org-read-date' doesn't work. The reason is:
> `org-read-date-minibuffer-local-map' is a defvar - thus, it has already been
> evaluated (upon loading org.el).
>
> One quick fix would be to make `org-read-date-minibuffer-local-map' be a
> `defun' instead of a `defvar'. To ensure keymap is created lazily and thus
> automatically respect `(let* ((org-replace-disputed-keys nil)))'. Although,
> that would cause some backwards incompatibilities.
>
> Any thoughts?
>
> Kind Regards,
> Miro
>
> On Mon, Sep 2, 2013 at 7:50 AM, Carsten Dominik
> <carsten.dominik@gmail.com> wrote:
>> Hi Miro,
>>
>> I have implemented this.
>>
>> Please test and make sure it works.
>>
>> Regards
>>
>> - Carsten
>>
>> On 15.5.2013, at 11:37, Miro Bezjak <bezjak.miro@gmail.com> wrote:
>>
>>> Hi all,
>>>
>>> for orgmode 7.9.x I had the following defadvice.
>>>
>>> ----
>>> (defadvice org-read-date (around my-no-disputed-keys activate)
>>>   "Ignore org-replace-disputed-keys when calendar is active."
>>>   (let ((org-replace-disputed-keys nil))
>>>     ad-do-it))
>>> ----
>>>
>>> Contrary to the `org-replace-disputed-keys' documentation (only being relevant at load-time), the advice worked because in 7.9.x `org-read-date' used `org-defkey' to add the relevant keybindings each time it was called.
>>>
>>> In 8.0.x, this advice no longer works since `org-read-date-minibuffer-local-map' is being used.
>>>
>>> Basically, I'm trying to use windmove keys, but not when I'm entering dates through calendar. In calendar, shift + arrow keys are really handy and calendar is not active for a long time.
>>>
>>> Does anyone have any suggestion how I can achieve that in 8.0.x without patching org.el?
>>>
>>> Should I make a patch to introduce defcustom that will ignore disputed keys while setting up `org-read-date-minibuffer-local-map'? Anyone else interested in this besides me?
>>>
>>> Kind Regards,
>>> Miro
>>>
>>

  reply	other threads:[~2013-09-07 21:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-15  9:37 disable org-replace-disputed-keys for org-read-date Miro Bezjak
2013-08-09  9:47 ` Carsten Dominik
2013-09-02  5:50 ` Carsten Dominik
2013-09-07 20:22   ` Miro Bezjak
2013-09-07 21:39     ` Miro Bezjak [this message]
2013-09-08  5:34       ` Carsten Dominik

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=CAMJqDfMkYvhaYoqNmoKoTeabs1jTqAyqvBMNX1WjOOzx5JFWjw@mail.gmail.com \
    --to=bezjak.miro@gmail.com \
    --cc=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).