From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.bugs Subject: Re: Mac: Services, Emacs, Open Selected File Date: Sat, 15 Mar 2008 08:56:57 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <47DA26A4.30906@yahoo-inc.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1205539033 7182 80.91.229.12 (14 Mar 2008 23:57:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 14 Mar 2008 23:57:13 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org To: "Ronald W. Heiby" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 15 00:57:41 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JaJmO-0006sU-Qg for geb-bug-gnu-emacs@m.gmane.org; Sat, 15 Mar 2008 00:57:41 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JaJlp-0007Iu-Nx for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Mar 2008 19:57:05 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JaJll-0007Ij-Aj for bug-gnu-emacs@gnu.org; Fri, 14 Mar 2008 19:57:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JaJlj-0007IU-Rn for bug-gnu-emacs@gnu.org; Fri, 14 Mar 2008 19:57:01 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JaJlj-0007IR-Lg for bug-gnu-emacs@gnu.org; Fri, 14 Mar 2008 19:56:59 -0400 Original-Received: from ntp.math.s.chiba-u.ac.jp ([133.82.132.2] helo=mathmail.math.s.chiba-u.ac.jp) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JaJlj-0001JJ-09 for bug-gnu-emacs@gnu.org; Fri, 14 Mar 2008 19:56:59 -0400 Original-Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 37C132C46; Sat, 15 Mar 2008 08:56:57 +0900 (JST) In-Reply-To: <47DA26A4.30906@yahoo-inc.com> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/23.0.50 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-detected-kernel: by monty-python.gnu.org: NetBSD 3.0 (DF) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:17718 Archived-At: >>>>> On Fri, 14 Mar 2008 12:47:56 +0530, "Ronald W. Heiby" said: > On Mac OS X 10.4.11, MacBook Pro. In the Finder, I select a file. > Then, I use the menus to choose Services, Emacs, Open Selected File. > I expect an Emacs window to pop up with the file contents in a > buffer, ready for editing. Instead, I get the following in the > minibuffer: > find-file-existing: file://localhost/Users/heiby/dhrepl-loc.txt does > not exist > when trying to open "dhrepl-loc.txt" in my home directory. Thanks for this reporting. This seems to be due to a subtle difference in various versions of Mac OS X. It fails only on 10.4.11, but not on 10.2.8, 10.3.9, or 10.5.2. Please try the following patch. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp Index: lisp/term/mac-win.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/term/mac-win.el,v retrieving revision 1.88.2.6 diff -c -p -r1.88.2.6 mac-win.el *** lisp/term/mac-win.el 7 Jan 2008 02:18:53 -0000 1.88.2.6 --- lisp/term/mac-win.el 14 Mar 2008 23:51:56 -0000 *************** either in the current buffer or in the e *** 2117,2123 **** (defun mac-service-open-file () "Open the file specified by the selection value for Services." (interactive) ! (find-file-existing (x-selection-value mac-service-selection))) (defun mac-service-open-selection () "Create a new buffer containing the selection value for Services." --- 2117,2125 ---- (defun mac-service-open-file () "Open the file specified by the selection value for Services." (interactive) ! ;; The selection seems not to contain the file name as ! ;; public.utf16-plain-text data on Mac OS X 10.4. ! (dnd-open-file (x-get-selection mac-service-selection 'public.file-url) nil)) (defun mac-service-open-selection () "Create a new buffer containing the selection value for Services."