[O] does org-mode modify input events?

2014-01-06 Thread John Kitchin
Hi all,

In this post, I was looking at some ways to get right clicks to do
something on org-links:
http://kitchingroup.cheme.cmu.edu/blog/2013/10/21/Enabling-right-clicks-in-org-mode-links/

I noticed some odd behavior in that the last-input-event is mouse-2 whether
I press mouse-1 or mouse-2 when clicking on a link. It is also interesting
the event is of type mouse-2, and not down-mouse-2.

Does anyone know if org-mode makes a mouse-1 click into a mouse-2 event
somehow? Is that happening from this line

(org-defkey org-mouse-map [mouse-2] 'org-open-at-mouse)

in org.el?

Does anyone know to get something like this from the click event that
occurred on the link?

(princ (read-event))

 (S-down-mouse-1 (#window 34 on blog.org 56725 (1 . 299) -322897656
nil 56725 (0 . 18) nil (1 . 11) (8 . 16)))


that is shift-mouse-1 event.

Thanks!

John

---
John Kitchin
Associate Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu


Re: [O] does org-mode modify input events?

2014-01-06 Thread Nick Dokos
John Kitchin jkitc...@andrew.cmu.edu writes:

 Hi all,

 In this post, I was looking at some ways to get right clicks to do something 
 on org-links:
 http://kitchingroup.cheme.cmu.edu/blog/2013/10/21/Enabling-right-clicks-in-org-mode-links/

 I noticed some odd behavior in that the last-input-event is mouse-2
 whether I press mouse-1 or mouse-2 when clicking on a link. It is also
 interesting the event is of type mouse-2, and not down-mouse-2.

 Does anyone know if org-mode makes a mouse-1 click into a mouse-2
 event somehow? Is that happening from this line

 (org-defkey org-mouse-map [mouse-2] 'org-open-at-mouse)

 in org.el?


Check the doc strings of org-mouse-1-follows-link and
mouse-1-click-follows-link.

-- 
Nick