From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Girard Subject: Re: org-follow-link-in-same-window Date: Sat, 27 Jun 2009 12:25:45 +0200 Message-ID: <51b0095d0906270325j72aeff64hb4be06d1ca7522cc@mail.gmail.com> References: <51b0095d0906270141s598f5a8fq8aac0f928cccf10d@mail.gmail.com> <11A9F44D-1DFC-4E8B-A7B1-3A9FC34CA859@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MKV6Y-0003GA-Az for emacs-orgmode@gnu.org; Sat, 27 Jun 2009 06:25:55 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MKV6R-000399-Ak for emacs-orgmode@gnu.org; Sat, 27 Jun 2009 06:25:48 -0400 Received: from [199.232.76.173] (port=37437 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MKV6Q-00038l-U5 for emacs-orgmode@gnu.org; Sat, 27 Jun 2009 06:25:47 -0400 Received: from fg-out-1718.google.com ([72.14.220.156]:19582) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MKV6Q-0005lK-DZ for emacs-orgmode@gnu.org; Sat, 27 Jun 2009 06:25:46 -0400 Received: by fg-out-1718.google.com with SMTP id l27so166749fgb.7 for ; Sat, 27 Jun 2009 03:25:45 -0700 (PDT) In-Reply-To: <11A9F44D-1DFC-4E8B-A7B1-3A9FC34CA859@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 2009/6/27 Carsten Dominik > > On Jun 27, 2009, at 10:41 AM, Nicolas Girard wrote: > (defun org-open-at-mouse-same-window (ev) > "Open file link or URL at mouse." > (interactive "e") > (mouse-set-point ev) > (if (eq major-mode 'org-agenda-mode) > (org-agenda-copy-local-variable 'org-link-abbrev-alist-local)) > (let ((org-link-frame-setup > '((vm . vm-visit-folder) > (gnus . gnus) > (file . find-file)))) > (org-open-at-point))) Thanks ! This works great ! >> >> I found none of them to work *but* the latest, [s-mouse-1]. Now, I must have been mistaken because none of the bindings I tried actually worked. I'm sure I could trigger my own function thanks to a debugging message, but it was after a bit of trial and error, and I can't see how. Here's what I tried and which didn't work: (add-hook 'org-load-hook '(lambda () (define-key org-mouse-map [s-mouse-1] 'org-open-at-mouse-same-window) (define-key org-mouse-map [s-down-mouse-1] 'org-open-at-mouse-same-window) (define-key org-mode-map [(control button1)] 'org-open-at-mouse-same-window) (define-key org-mouse-map [C-down-mouse-1] 'org-open-at-mouse-same-window) (define-key org-mouse-map [C-down-mouse-2] 'org-open-at-mouse-same-window) )) I could only get the behaviour I want by de-defining org-mouse-move-tree-start with the body of your org-open-at-mouse-same-window function. Nicolas