From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: Following shortcuts when using tab completion with emacs on windows. Date: Sat, 30 Jan 2010 08:22:45 -0800 Message-ID: References: <3dbf66ef-1b27-41be-89ad-6174005ca8b6@b36g2000pri.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1264868637 31359 80.91.229.12 (30 Jan 2010 16:23:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 30 Jan 2010 16:23:57 +0000 (UTC) To: "'amicitas'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jan 30 17:23:55 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NbG70-0008V9-JP for geh-help-gnu-emacs@m.gmane.org; Sat, 30 Jan 2010 17:23:54 +0100 Original-Received: from localhost ([127.0.0.1]:60691 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NbG70-0000dA-0d for geh-help-gnu-emacs@m.gmane.org; Sat, 30 Jan 2010 11:23:54 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NbG6Y-0000bz-Uy for help-gnu-emacs@gnu.org; Sat, 30 Jan 2010 11:23:27 -0500 Original-Received: from [199.232.76.173] (port=51144 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NbG6Y-0000bi-LZ for help-gnu-emacs@gnu.org; Sat, 30 Jan 2010 11:23:26 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NbG62-0005gz-Ok for help-gnu-emacs@gnu.org; Sat, 30 Jan 2010 11:23:26 -0500 Original-Received: from acsinet12.oracle.com ([141.146.126.234]:42171) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NbG61-0005gX-Kv for help-gnu-emacs@gnu.org; Sat, 30 Jan 2010 11:22:54 -0500 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by acsinet12.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id o0UGMmGT018290 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 30 Jan 2010 16:22:49 GMT Original-Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o0UFtf6g024810; Sat, 30 Jan 2010 16:22:46 GMT Original-Received: from abhmt006.oracle.com by acsmt357.oracle.com with ESMTP id 1507406161264868563; Sat, 30 Jan 2010 10:22:43 -0600 Original-Received: from dradamslap1 (/10.175.194.4) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 30 Jan 2010 08:22:43 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <3dbf66ef-1b27-41be-89ad-6174005ca8b6@b36g2000pri.googlegroups.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Thread-Index: Acqhh+IhPdvPrtEWSgGPGTf/HmcUpAAPWk/g X-Source-IP: acsmt353.oracle.com [141.146.40.153] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090205.4B645CD7.0115:SCFMA4539814,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:71583 Archived-At: > I would like to find a way to follow windows shortcuts (*.lnk) files > when using tab completion. > > The package "w32-symlinks" allows emacs to follow windows shortcuts. > Does any one know how to tie this into the tab completion so that > links will be followed? > > The exact behavior that I would like is that when I type C-x C-f to > open a file, then type in the name of a shortcut and press , I > would be taken to the linked directory and be able to choose a file. > Basically to mimic symbolic links on POSIX. Any link files that I do > encounter will have been created by cygwin. > > I am using a windows installation of emacs 23.1. In Emacs 22, if you customize (not just setq) option `w32-symlinks-handle-shortcuts' to `t', then it should do what you want. It works for me, at least. In Emacs 23.1, it seems to raise an error, "wrong-type-argument stringp #". The problem is that the file-name handler kicks in for `verify-visited-file-modtime', whose arg is a buffer, not a file name. That leads to `w32-symlinks-parse-shortcut' being called on the buffer, which calls `insert-file-contents' on the buffer (and it expects a file name). I tried with the version of w32-symlinks.el here: http://www.emacswiki.org/emacs/w32-symlinks.el Perhaps the author, Francis J. Wright has a more recent version that doesn't have this problem. (But the latest version I find on his Web site is the same as the Emacs-Wiki version.) You might ask either Francis or Lars Hansen (who has made the latest updates to the library) to look into the problem, assuming I'm not the only one who sees it. HTH.