bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mac: Services, Emacs, Open Selected File


From: YAMAMOTO Mitsuharu
Subject: Re: Mac: Services, Emacs, Open Selected File
Date: Sat, 15 Mar 2008 08:56:57 +0900
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/23.0.50 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)

>>>>> On Fri, 14 Mar 2008 12:47:56 +0530, "Ronald W. Heiby" 
>>>>> <heiby@yahoo-inc.com> 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."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]