all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dima Kogan <dima@secretsauce.net>
To: 53911@debbugs.gnu.org
Subject: bug#53911: 29.0.50; shell-mode: completion doesn't work at first element of a continued line
Date: Wed, 09 Feb 2022 21:36:40 -0800	[thread overview]
Message-ID: <87leyjb7vb.fsf@secretsauce.net> (raw)

Hi. I see this:

1. emacs -Q

2. M-x shell

3. type "ls \" then C-q j then "/tm"

At this point the buffer should look like

============
user@host:~$ ls \
/tm
============

with the point at the end

4. TAB

On this machine /tmp exists, so when I hit TAB I expect emacs to
autocomplete /tmp, but it doesn't work. Because it thinks the \ + \n is
part of the filename being completed. A patch to fix it:




diff --git a/lisp/comint.el b/lisp/comint.el
index 3decb80ff0b..d5dbfc6bf9d 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -3191,8 +3193,8 @@ comint-word
       (while (not giveup)
 	(let ((startpoint (point)))
 	  (skip-chars-backward (concat "\\\\" word-chars))
-	  (if (and comint-file-name-quote-list
-		   (eq (char-before (1- (point))) ?\\))
+	  (if (and (eq (char-before (1- (point))) ?\\)
+                   (memq (char-before) comint-file-name-quote-list))
 	      (forward-char -2))
 	  ;; FIXME: This isn't consistent with Bash, at least -- not
 	  ;; all non-ASCII chars should be word constituents.



We were checking for comint-file-name-quote-list existing, but not
actually comparing to the characters in that list. This patch actually
checks the contents of comint-file-name-quote-list.

Thanks





             reply	other threads:[~2022-02-10  5:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-10  5:36 Dima Kogan [this message]
2022-02-10  7:01 ` bug#53911: 29.0.50; shell-mode: completion doesn't work at first element of a continued line Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87leyjb7vb.fsf@secretsauce.net \
    --to=dima@secretsauce.net \
    --cc=53911@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.