all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* disable org-replace-disputed-keys for org-read-date
@ 2013-05-15  9:37 Miro Bezjak
  2013-08-09  9:47 ` Carsten Dominik
  2013-09-02  5:50 ` Carsten Dominik
  0 siblings, 2 replies; 6+ messages in thread
From: Miro Bezjak @ 2013-05-15  9:37 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1041 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1284 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: disable org-replace-disputed-keys for org-read-date
  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
  1 sibling, 0 replies; 6+ messages in thread
From: Carsten Dominik @ 2013-08-09  9:47 UTC (permalink / raw)
  To: Miro Bezjak; +Cc: emacs-orgmode


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?

I think I would even accept a patch that ignored disputed keys entirely when setting up this special map.
Or has this issue been solved in another way I am not aware of? (Sorry, I am trying to catch up...)

- Carsten

> 
> Kind Regards,
> Miro
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: disable org-replace-disputed-keys for org-read-date
  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
  1 sibling, 1 reply; 6+ messages in thread
From: Carsten Dominik @ 2013-09-02  5:50 UTC (permalink / raw)
  To: Miro Bezjak; +Cc: emacs-orgmode

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
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: disable org-replace-disputed-keys for org-read-date
  2013-09-02  5:50 ` Carsten Dominik
@ 2013-09-07 20:22   ` Miro Bezjak
  2013-09-07 21:39     ` Miro Bezjak
  0 siblings, 1 reply; 6+ messages in thread
From: Miro Bezjak @ 2013-09-07 20:22 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

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
>>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: disable org-replace-disputed-keys for org-read-date
  2013-09-07 20:22   ` Miro Bezjak
@ 2013-09-07 21:39     ` Miro Bezjak
  2013-09-08  5:34       ` Carsten Dominik
  0 siblings, 1 reply; 6+ messages in thread
From: Miro Bezjak @ 2013-09-07 21:39 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

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
>>>
>>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: disable org-replace-disputed-keys for org-read-date
  2013-09-07 21:39     ` Miro Bezjak
@ 2013-09-08  5:34       ` Carsten Dominik
  0 siblings, 0 replies; 6+ messages in thread
From: Carsten Dominik @ 2013-09-08  5:34 UTC (permalink / raw)
  To: Miro Bezjak; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2987 bytes --]

Hi Miro,

you are right, and this is now fixed.

Thanks!

- Carsten

On 7.9.2013, at 23:39, Miro Bezjak <bezjak.miro@gmail.com> wrote:

> 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
>>>> 
>>> 


[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 163 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-09-08  5:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2013-09-08  5:34       ` Carsten Dominik

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.