From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: substitute-in-file-name is not distributive Date: Tue, 09 Oct 2012 22:36:21 -0700 Message-ID: <50750955.4020802@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig40D85519C0C553DF2A9C3FB9" X-Trace: ger.gmane.org 1349847399 25871 80.91.229.3 (10 Oct 2012 05:36:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 10 Oct 2012 05:36:39 +0000 (UTC) To: Emacs development discussions Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 10 07:36:46 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TLoyL-0007U2-2Y for ged-emacs-devel@m.gmane.org; Wed, 10 Oct 2012 07:36:45 +0200 Original-Received: from localhost ([::1]:49010 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLoyE-0003ql-Rk for ged-emacs-devel@m.gmane.org; Wed, 10 Oct 2012 01:36:38 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34309) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLoyC-0003pp-Bh for emacs-devel@gnu.org; Wed, 10 Oct 2012 01:36:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TLoyB-0005Hm-69 for emacs-devel@gnu.org; Wed, 10 Oct 2012 01:36:36 -0400 Original-Received: from dancol.org ([96.126.100.184]:33015) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLoyB-00057W-0E for emacs-devel@gnu.org; Wed, 10 Oct 2012 01:36:35 -0400 Original-Received: from c-76-22-66-162.hsd1.wa.comcast.net ([76.22.66.162] helo=[192.168.1.2]) by dancol.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1TLoy3-0003If-M8 for emacs-devel@gnu.org; Tue, 09 Oct 2012 22:36:27 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 X-Enigmail-Version: 1.4.4 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 96.126.100.184 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:154269 Archived-At: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig40D85519C0C553DF2A9C3FB9 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I wrote a bit of code to handle Windows paths in being given to read-file-name in a Cygwin Emacs --- it's just a simple file-name-handler-alist entry that overrides substitute-in-file-name for Windows paths to yield the corresponding Cygwin path. Why not view Windows path syntax as a funky way to "quote" Cygwin paths? This approach works fine, except for completion. The trouble is that the core completion code makes unwarranted assumptions about the behavior of expand-in-file-name. Specifically, completion--tqw-all assumes that (equal (unquote (concat (qnew foo) (qnew bar)) (unquote (quote (concat foo bar))). Why should that be the case? In my mockup, I'm trying to complete 'c:\'. I have a 'c:\bin'; converting the path 'c:\bin' to Cygwin yields "/usr/bin" on my machine. The trouble is that when we try to get all the completions for 'c:\', which "unquoted" is '/' on my machine. completion--tqw-all wants to paste '/' and 'bin' together to yield '/bin', but my s-i-f-n handler returns '/usr/bin', so completion--qw-all's last cl-assert fails.= I don't think it's fair to assume that substitute-in-file-name distributes over all components of a path. Unfortunately, simply removing the assertion causes mysterious failures elsewhere. The assumption of a distributing s-i-f-n seems baked into the code. Is there another way to do what I want here? --------------enig40D85519C0C553DF2A9C3FB9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (Darwin) Comment: GPGTools - http://gpgtools.org iEYEARECAAYFAlB1CVYACgkQ17c2LVA10Vuv0QCfcJfIyTc+QuW37+pXJr6GTwma ZGAAnR83BRVyX9lXYhbdDu/ThEqd8PBC =6HFp -----END PGP SIGNATURE----- --------------enig40D85519C0C553DF2A9C3FB9--