all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#53911: 29.0.50; shell-mode: completion doesn't work at first element of a continued line
@ 2022-02-10  5:36 Dima Kogan
  2022-02-10  7:01 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Dima Kogan @ 2022-02-10  5:36 UTC (permalink / raw)
  To: 53911

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





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#53911: 29.0.50; shell-mode: completion doesn't work at first element of a continued line
  2022-02-10  5:36 bug#53911: 29.0.50; shell-mode: completion doesn't work at first element of a continued line Dima Kogan
@ 2022-02-10  7:01 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2022-02-10  7:01 UTC (permalink / raw)
  To: Dima Kogan; +Cc: 53911

Dima Kogan <dima@secretsauce.net> writes:

> 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; pushed to Emacs 29.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-10  7:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-10  5:36 bug#53911: 29.0.50; shell-mode: completion doesn't work at first element of a continued line Dima Kogan
2022-02-10  7:01 ` Lars Ingebrigtsen

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.