From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: disable org-replace-disputed-keys for org-read-date Date: Sun, 8 Sep 2013 07:34:10 +0200 Message-ID: References: <048E0E03-33C0-42F4-9359-733A463C17A4@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Content-Type: multipart/signed; boundary="Apple-Mail=_FC3C9705-5E97-4817-8143-4B77B5431F3D"; protocol="application/pgp-signature"; micalg=pgp-sha1 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42872) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VIXdl-0005KO-WE for emacs-orgmode@gnu.org; Sun, 08 Sep 2013 01:34:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VIXdd-0000QG-HW for emacs-orgmode@gnu.org; Sun, 08 Sep 2013 01:34:29 -0400 Received: from mail-we0-x232.google.com ([2a00:1450:400c:c03::232]:34749) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VIXdd-0000QC-6T for emacs-orgmode@gnu.org; Sun, 08 Sep 2013 01:34:21 -0400 Received: by mail-we0-f178.google.com with SMTP id u57so3099791wes.23 for ; Sat, 07 Sep 2013 22:34:20 -0700 (PDT) In-Reply-To: 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: Miro Bezjak Cc: emacs-orgmode@gnu.org --Apple-Mail=_FC3C9705-5E97-4817-8143-4B77B5431F3D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi Miro, you are right, and this is now fixed. Thanks! - Carsten On 7.9.2013, at 23:39, Miro Bezjak wrote: > Dear Carsten, >=20 > actually forget my previous fix attempt. There is a better way. Here > is what I did to org.el to make it work. >=20 > ------------------------ > (defvar org-read-date-minibuffer-local-map > (let* ((org-replace-disputed-keys nil) > (map (make-sparse-keymap))) >=20 > ... rest unchanged ... > ------------------------ >=20 > 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. >=20 > Kind Regards, > Miro >=20 > On Sat, Sep 7, 2013 at 10:22 PM, Miro Bezjak = wrote: >> Dear Carsten, >>=20 >> sorry for not responding sooner. I've been on holiday and didn't see = your >> messages. >>=20 >> 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). >>=20 >> 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. >>=20 >> Any thoughts? >>=20 >> Kind Regards, >> Miro >>=20 >> On Mon, Sep 2, 2013 at 7:50 AM, Carsten Dominik >> wrote: >>> Hi Miro, >>>=20 >>> I have implemented this. >>>=20 >>> Please test and make sure it works. >>>=20 >>> Regards >>>=20 >>> - Carsten >>>=20 >>> On 15.5.2013, at 11:37, Miro Bezjak wrote: >>>=20 >>>> Hi all, >>>>=20 >>>> for orgmode 7.9.x I had the following defadvice. >>>>=20 >>>> ---- >>>> (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)) >>>> ---- >>>>=20 >>>> 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. >>>>=20 >>>> In 8.0.x, this advice no longer works since = `org-read-date-minibuffer-local-map' is being used. >>>>=20 >>>> 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. >>>>=20 >>>> Does anyone have any suggestion how I can achieve that in 8.0.x = without patching org.el? >>>>=20 >>>> 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? >>>>=20 >>>> Kind Regards, >>>> Miro >>>>=20 >>>=20 --Apple-Mail=_FC3C9705-5E97-4817-8143-4B77B5431F3D Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAlIsDFsACgkQ9hweYzZiJkx/OgCfZq+8IfTa0+1IQbvYpGpuxR8m uowAni++O640dOm8IQegpq5g45Jl8FHS =/9Oe -----END PGP SIGNATURE----- --Apple-Mail=_FC3C9705-5E97-4817-8143-4B77B5431F3D--