From mboxrd@z Thu Jan 1 00:00:00 1970 From: Miro Bezjak Subject: Re: disable org-replace-disputed-keys for org-read-date Date: Sat, 7 Sep 2013 22:22:10 +0200 Message-ID: References: <048E0E03-33C0-42F4-9359-733A463C17A4@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46338) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VIP1w-0000bG-Dc for emacs-orgmode@gnu.org; Sat, 07 Sep 2013 16:22:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VIP1v-0006lb-G3 for emacs-orgmode@gnu.org; Sat, 07 Sep 2013 16:22:52 -0400 Received: from mail-vc0-x233.google.com ([2607:f8b0:400c:c03::233]:38735) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VIP1v-0006lL-BS for emacs-orgmode@gnu.org; Sat, 07 Sep 2013 16:22:51 -0400 Received: by mail-vc0-f179.google.com with SMTP id ht10so2999060vcb.24 for ; Sat, 07 Sep 2013 13:22:50 -0700 (PDT) In-Reply-To: <048E0E03-33C0-42F4-9359-733A463C17A4@gmail.com> 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: Carsten Dominik Cc: emacs-orgmode@gnu.org 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 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 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 >> >