unofficial mirror of emacs-orgmode@gnu.org
 help / color / mirror / Atom feed
* org-read-date: selecting date with mouse-2 in calendar
@ 2021-02-14  2:50 Michael Heerdegen
  2021-02-14  2:52 ` Michael Heerdegen
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Michael Heerdegen @ 2021-02-14  2:50 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Michael Heerdegen

Hello,

selecting a date from within `org-read-date' from the calendar works
with mouse-1, but not with mouse-2 (with latest Emacs master and my
settings loaded at least).

The code seems to intend that it also works with mouse-2, but it fails.

I don't prefer mouse-2, but it would be good to support it I think,
since "clicking" in Emacs is with mouse-2 historically, breaking that
might cause inconvenience.

Why it doesn't work?  Oh, that's because calendar already binds
down-mouse-2 to pop-up a menu (see definition of `calendar-mode-map').
So when we would add the following line to `org-read-date' (it's obvious
to where and I'm too lazy to create a patch now):

+  (org-defkey map [down-mouse-2] nil)

it works as expected for me.  Nothing is lost since the original
popup-menu for the calendar is still being bound to down-mouse-3 (the
more expected key for such a menu in my opinion, at least 2021).

So please consider to add the above line to the defun of
`org-read-date'.


Regards,

Michael.


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

* Re: org-read-date: selecting date with mouse-2 in calendar
  2021-02-14  2:50 org-read-date: selecting date with mouse-2 in calendar Michael Heerdegen
@ 2021-02-14  2:52 ` Michael Heerdegen
  2021-02-14  3:36 ` Michael Heerdegen
  2021-02-26  3:38 ` Michael Heerdegen
  2 siblings, 0 replies; 5+ messages in thread
From: Michael Heerdegen @ 2021-02-14  2:52 UTC (permalink / raw)
  To: emacs-orgmode

Michael Heerdegen <michael_heerdegen@web.de> writes:

> So please consider [...]

Oh, and please keep me CC'd, I don't read the list regularly.

Thanks, Michael.


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

* Re: org-read-date: selecting date with mouse-2 in calendar
  2021-02-14  2:50 org-read-date: selecting date with mouse-2 in calendar Michael Heerdegen
  2021-02-14  2:52 ` Michael Heerdegen
@ 2021-02-14  3:36 ` Michael Heerdegen
  2021-02-26  3:38 ` Michael Heerdegen
  2 siblings, 0 replies; 5+ messages in thread
From: Michael Heerdegen @ 2021-02-14  3:36 UTC (permalink / raw)
  To: emacs-orgmode

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Nothing is lost since the original popup-menu for the calendar is
> still being bound to down-mouse-3 (the more expected key for such a
> menu in my opinion, at least 2021).

That was not quite correct, however.  These are the defining lines:

    ;; These are referenced in the default calendar-date-echo-text.
    (define-key map [down-mouse-3]
      (easy-menu-binding cal-menu-context-mouse-menu))
    (define-key map [down-mouse-2]
      (easy-menu-binding cal-menu-global-mouse-menu))

So the calendar provides a global (mouse-2) and a context menu
(mouse-3).  Seems both are not really useful for `org-read-date'.

Michael.


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

* Re: org-read-date: selecting date with mouse-2 in calendar
  2021-02-14  2:50 org-read-date: selecting date with mouse-2 in calendar Michael Heerdegen
  2021-02-14  2:52 ` Michael Heerdegen
  2021-02-14  3:36 ` Michael Heerdegen
@ 2021-02-26  3:38 ` Michael Heerdegen
  2021-02-26  6:28   ` Kyle Meyer
  2 siblings, 1 reply; 5+ messages in thread
From: Michael Heerdegen @ 2021-02-26  3:38 UTC (permalink / raw)
  To: emacs-orgmode

Hello again,

> selecting a date from within `org-read-date' from the calendar works
> with mouse-1, but not with mouse-2 (with latest Emacs master and my
> settings loaded at least).
>
> The code seems to intend that it also works with mouse-2, but it fails.
>
> Why it doesn't work?  Oh, that's because calendar already binds
> down-mouse-2 to pop-up a menu (see definition of `calendar-mode-map').
> So when we would add the following line to `org-read-date' (it's obvious
> to where and I'm too lazy to create a patch now):
>
> +  (org-defkey map [down-mouse-2] nil)

No comments on this (hope it wasn't too confused...)?  Should I just
commit the fix to the Emacs master branch?

TIA,

Michael.


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

* Re: org-read-date: selecting date with mouse-2 in calendar
  2021-02-26  3:38 ` Michael Heerdegen
@ 2021-02-26  6:28   ` Kyle Meyer
  0 siblings, 0 replies; 5+ messages in thread
From: Kyle Meyer @ 2021-02-26  6:28 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: emacs-orgmode

Michael Heerdegen writes:

> Hello again,
>
>> selecting a date from within `org-read-date' from the calendar works
>> with mouse-1, but not with mouse-2 (with latest Emacs master and my
>> settings loaded at least).
>>
>> The code seems to intend that it also works with mouse-2, but it fails.
>>
>> Why it doesn't work?  Oh, that's because calendar already binds
>> down-mouse-2 to pop-up a menu (see definition of `calendar-mode-map').
>> So when we would add the following line to `org-read-date' (it's obvious
>> to where and I'm too lazy to create a patch now):
>>
>> +  (org-defkey map [down-mouse-2] nil)
>
> No comments on this (hope it wasn't too confused...)?

I don't know anything about these mouse things and have to review the
manual whenever they come up.  Please provide a patch with a proper
commit message, and I'll review it this weekend if nobody else gets to
it sooner.

> Should I just commit the fix to the Emacs master branch?

No, I'd appreciate if you did not.


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

end of thread, other threads:[~2021-02-26  6:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-14  2:50 org-read-date: selecting date with mouse-2 in calendar Michael Heerdegen
2021-02-14  2:52 ` Michael Heerdegen
2021-02-14  3:36 ` Michael Heerdegen
2021-02-26  3:38 ` Michael Heerdegen
2021-02-26  6:28   ` Kyle Meyer

unofficial mirror of emacs-orgmode@gnu.org

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/orgmode/0 orgmode/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 orgmode orgmode/ https://yhetil.org/orgmode \
		emacs-orgmode@gnu.org
	public-inbox-index orgmode

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.orgmode
	nntp://news.gmane.io/gmane.emacs.orgmode


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git