From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Bug when following a link (org-open-at-point) Date: Wed, 27 Sep 2006 23:52:54 +0200 Message-ID: References: <451A475C.6080504@cs.tu-berlin.de> Mime-Version: 1.0 (Apple Message framework v624) 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 1GShKr-00067D-Kv for emacs-orgmode@gnu.org; Wed, 27 Sep 2006 17:52:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GShKq-000665-Ui for emacs-orgmode@gnu.org; Wed, 27 Sep 2006 17:52:57 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GShKq-00065s-Ru for emacs-orgmode@gnu.org; Wed, 27 Sep 2006 17:52:56 -0400 Received: from [194.134.35.146] (helo=smtp06.wanadoo.nl) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GShPn-0004ZI-4k for emacs-orgmode@gnu.org; Wed, 27 Sep 2006 17:58:03 -0400 In-Reply-To: <451A475C.6080504@cs.tu-berlin.de> 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: Stephan Schmitt Cc: emacs-orgmode@gnu.org Hi Stefan, I really love it when someone goes all the way to analyze and fix a bug. Thank you very much, this fix will be in the next version of org-mode. - Carsten On Sep 27, 2006, at 11:41, Stephan Schmitt wrote: > hello, > > i just downloaded org-mode 4.50 and > got an error when i tried to follow > an internal link (C-c C-o, Mouse-2). > > i traced the problem back to following > function in org.el: > > (defun org-file-remote-p (file) > "Test whether FILE specifies a location on a remote system. > Return non-nil if the location is indeed remote. > > For example, the filename \"/user@host:/foo\" specifies a location > on the system \"/user@host:\"." > (cond ((fboundp 'file-remote-p) > (file-remote-p file)) > ((fboundp 'tramp-handle-file-remote-p) > (tramp-handle-file-remote-p file)) > ((and (boundp 'ange-ftp-name-format) > (string-match ange-ftp-name-format file)) > t) > (t nil))) > > the third condition (string-match ange-ftp-name-format file) > tries to match a list against a string, > ange-ftp.el: > > (defcustom ange-ftp-name-format > '("^/\\(\\([^@/:]*\\)@\\)?\\([^@/:]*[^@/:.]\\):\\(.*\\)" . (3 2 4)) > "*Format of a fully expanded remote file name. > > This is a list of the form \(REGEXP HOST USER NAME\), > where REGEXP is a regular expression matching > the full remote name, and HOST, USER, and NAME are the numbers of > parenthesized expressions in REGEXP for the components (in that > order)." > :group 'ange-ftp > :type '(list regexp > (integer :tag "Host group") > (integer :tag "User group") > (integer :tag "Name group"))) > > i solved the problem by changing the condition > (string-match ange-ftp-name-format file) > into > (string-match (car ange-ftp-name-format) file) > > best regards, > stephan > > > _______________________________________________ > Emacs-orgmode mailing list > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > > -- Carsten Dominik Sterrenkundig Instituut "Anton Pannekoek" Universiteit van Amsterdam Kruislaan 403 NL-1098SJ Amsterdam phone: +31 20 525 7477