From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.bugs Subject: bug#28096: 25.2; c-a-p/shell/ielm: Broken directory completion for directories that contain spaces Date: Wed, 30 May 2018 13:13:02 +0100 Message-ID: <87y3g1qr3l.fsf@tcd.ie> References: <871sfyrolu.fsf@pagefault.se> <87y3g1best.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1527682412 23913 195.159.176.226 (30 May 2018 12:13:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 30 May 2018 12:13:32 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: xristos , xristos , 28096@debbugs.gnu.org, Eric Skoglund To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 30 14:13:28 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fNzyp-00068M-6I for geb-bug-gnu-emacs@m.gmane.org; Wed, 30 May 2018 14:13:27 +0200 Original-Received: from localhost ([::1]:38201 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fO00w-0001hP-AR for geb-bug-gnu-emacs@m.gmane.org; Wed, 30 May 2018 08:15:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58615) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fNzzS-0000a9-Hy for bug-gnu-emacs@gnu.org; Wed, 30 May 2018 08:14:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fNzzO-0001AQ-CI for bug-gnu-emacs@gnu.org; Wed, 30 May 2018 08:14:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46851) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fNzzO-0001AF-1G for bug-gnu-emacs@gnu.org; Wed, 30 May 2018 08:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fNzzN-0007jy-P3 for bug-gnu-emacs@gnu.org; Wed, 30 May 2018 08:14:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 May 2018 12:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28096 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 28096-submit@debbugs.gnu.org id=B28096.152768239429695 (code B ref 28096); Wed, 30 May 2018 12:14:01 +0000 Original-Received: (at 28096) by debbugs.gnu.org; 30 May 2018 12:13:14 +0000 Original-Received: from localhost ([127.0.0.1]:54748 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fNzyc-0007is-5F for submit@debbugs.gnu.org; Wed, 30 May 2018 08:13:14 -0400 Original-Received: from mail-wm0-f44.google.com ([74.125.82.44]:53853) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fNzyZ-0007ic-Aa for 28096@debbugs.gnu.org; Wed, 30 May 2018 08:13:12 -0400 Original-Received: by mail-wm0-f44.google.com with SMTP id a67-v6so47265209wmf.3 for <28096@debbugs.gnu.org>; Wed, 30 May 2018 05:13:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=Sp97xPIgm7xfcZIP6R/9az/HBOFN2TwG3QLtcoz+Pr4=; b=k4IiNMsQDx5I2lD2IGwdXvd3HBmcIn/wF7OdpF1K7ZUeb3EeH4FcfClk/ea5Tu1ojm BOkDzznrVSFeyPVBRd5n4eTi1myzeJYqNpjx9VZuDzY/phQfe+kb3U9dFU8nGSlnYks1 L62f3tkD2H8FrAMq9qfZsRCY92gM+qKS8htHQ/dV9s67pVfnM450eYU06lPjqwpLIkDL 0n8zLTjdNWZwj94XRMamrvmXFfEvQfbwaXtgtA1+VFLoXVC0EsJXg8CLPAuHvlUX8UmZ 7UH3ASVszJjxvW58XM5t6HR475PrVEhhQKq5NNI/3T/6cDHUEYTiu596yCPVFnfkIYPc xGBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=Sp97xPIgm7xfcZIP6R/9az/HBOFN2TwG3QLtcoz+Pr4=; b=nqTGNd5WtkCgSuep+/FVj9lDMkZs1eoM1fiDDFdN29Ct3QhjsLxEFV7ovqgu28jPee Ybnh2A+tBmkxBOMke6u0FpQW/zCWSWuNmuRahrB4VTj1wXqmm4c02BSjY7affrolNi25 ukVgWVlTtyvQx/MkIL0OLKrAEKK4kVEuSW3k4Vy6dvCbn/jhdve0QOGGLQAkWOuA00Xy 8gTBoQS2Q1P7G8J/DI6nuZq9PqDZ8tLdkkSV7xfOJiWUSNcMw2/5I2KVUZvnjVTH0iUx PXyXWbxvIIxgz1sTzUwEUdMqOZ6ajEXQwafvoB9STEi4yZBAGeIwPIAkOimXaANKa0yU OR7g== X-Gm-Message-State: ALKqPwfBhlLOQdLO774lpx8a9yQ147fn67rxsyOnXVgcZ1tfXDi1Swgi uawcS+qC5leeZj9aUKYs2+chEQ== X-Google-Smtp-Source: ADUXVKKHeAHs3wfR4xhHljC8GOLetFe/dfTNuo+ZXWbQFj7zgxu7rGrvIS6CtxEuwVBvxS0rhkn4Ag== X-Received: by 2002:a1c:5403:: with SMTP id i3-v6mr1276318wmb.37.1527682385581; Wed, 30 May 2018 05:13:05 -0700 (PDT) Original-Received: from localhost ([178.62.40.52]) by smtp.gmail.com with ESMTPSA id u8-v6sm14944951wmc.40.2018.05.30.05.13.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 May 2018 05:13:04 -0700 (PDT) In-Reply-To: <87y3g1best.fsf@gmail.com> (Noam Postavsky's message of "Wed, 30 May 2018 06:47:46 -0400") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:146750 Archived-At: --=-=-= Content-Type: text/plain Noam Postavsky writes: > One minor question, what does the "C-a-k" mean > in your original report? I think Xristos meant C-a C-k. The only thing needed to make ielm file name completion work on my system (see signature for its details) is to add ?\s to comint-file-name-chars, e.g.: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=ielm.diff diff --git a/lisp/ielm.el b/lisp/ielm.el index b4ad69e4c7..4bb6e752e8 100644 --- a/lisp/ielm.el +++ b/lisp/ielm.el @@ -546,6 +546,8 @@ inferior-emacs-lisp-mode (set (make-local-variable 'paragraph-start) comint-prompt-regexp) (setq comint-input-sender 'ielm-input-sender) (setq comint-process-echoes nil) + (unless (string-match-p " " comint-file-name-chars) + (setq comint-file-name-chars (concat " " comint-file-name-chars))) (set (make-local-variable 'completion-at-point-functions) '(comint-replace-by-expanded-history ielm-complete-filename elisp-completion-at-point)) --=-=-= Content-Type: text/plain As for shell, file name completion only seems to breaks down for me when completing a relative file name argument to the cd command in particular: 0. emacs -Q 1. M-x shell RET 2. cd /tmp/ [shell doesn't seem to support dynamic cd arguments such as "$(mktemp -d)".] 3. mkdir dir\ one dir\ two RET 4. cd /tmp/dir TAB [Completes to "/tmp/dir\ ".] 5. TAB [Offers "dir\ one/" and "dir\ two/" as completion candidates.] 6. o TAB [Completes to "/tmp/dir\ one/".] Replacing cd with ls (or pretty much any other string, let alone valid command) in step 4 exhibits the same correct behaviour. Doing so in OP's recipe (which tries to complete relative file names), however, does not seem to struggle in the same way as cd completion: Steps 0-3 as before. 4. ls dir TAB [Completes to "dir\ ".] 5. TAB [Offers "dir\ one/" and "dir\ two/" as completion candidates.] 5. o TAB [Completes to "/tmp/dir\ one/".] I'm not familiar with the workings of shell, but it seems like it's trying to be smart about cd completion and falling a bit short. -- Basil In GNU Emacs 27.0.50 (build 4, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2018-05-27 built on thunk Repository revision: 0f48d18fd2a30f29cc3592a835d2a2254c9b0afb Windowing system distributor 'The X.Org Foundation', version 11.0.11906000 System Description: Debian GNU/Linux buster/sid "${SHELL}" --version GNU bash, version 4.4.19(1)-release (x86_64-pc-linux-gnu) --=-=-=--