From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: org-mouse.el Date: Thu, 13 Apr 2006 09:40:27 +0200 Message-ID: References: <3c12eb8d0604120259r4cdb27afu517c8f456557f190@mail.gmail.com> Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FTwRH-0003Ko-Sa for emacs-orgmode@gnu.org; Thu, 13 Apr 2006 03:40:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FTwRE-0003JF-Hd for emacs-orgmode@gnu.org; Thu, 13 Apr 2006 03:40:26 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FTwRD-0003Ix-Uv for emacs-orgmode@gnu.org; Thu, 13 Apr 2006 03:40:24 -0400 Received: from [146.50.4.51] (helo=imap.science.uva.nl) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FTwWU-0004UZ-Fp for emacs-orgmode@gnu.org; Thu, 13 Apr 2006 03:45:50 -0400 In-Reply-To: <3c12eb8d0604120259r4cdb27afu517c8f456557f190@mail.gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org On Apr 12, 2006, at 11:59, Piotr Zielinski wrote: > I've just fixed an incompatibility bug, which prevented org-mouse from > operating correctly with org-mode 4.21. Here's the latest version: I really like org-mouse.el, in particular the menus with TODO keywords, tags and priorities. In the latest version, the context menu on links does not seem to work - on links I still get the context menu for normal text. At first I thought this was only for the new bracket links, but it is the same for all link types, because `org-mouse-at-link' never returns t. While looking at this function I realized that org.el and org-mouse.el could check for a link at the cursor position in a much simpler way: (defun org-mouse-at-link () (and (eq (get-text-property (point) 'face) 'org-link) (save-excursion (goto-char (previous-single-property-change (point) 'face)) (or (looking-at org-bracket-link-regexp) (looking-at org-angle-link-re) (looking-at org-plain-link-re))))) This implementation depends on having font-lock active, but then a lot of functionality in org-mode depends on that. One more thing. I am totally used now to the fact that mouse-1 does follow a link in Org-mode buffers, this feels completely natural. But I am not so sure in agenda buffers. Since almost every line in that buffer has a mouse-face property, pretty much any click in the agenda window will send the cursor off into another buffer and window. I would like to be able to customize this. In org.el 4.22 (on the web now, with a few bug fixes), there is a new variable `org-agenda-mouse-1-follows-link'. Right now, org-mouse.el does overrule this. Could org-mouse.el honor this variable or even better no longer put those bindings to [follow-link] at all because org.el does this already? Thanks. - Carsten