From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dima Kogan Newsgroups: gmane.emacs.bugs 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 Message-ID: <87leyjb7vb.fsf@secretsauce.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16843"; mail-complaints-to="usenet@ciao.gmane.io" To: 53911@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 10 06:37:30 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nI292-00047I-3X for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 10 Feb 2022 06:37:29 +0100 Original-Received: from localhost ([::1]:39342 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nI290-000294-Gj for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 10 Feb 2022 00:37:26 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:41492) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nI28d-00028v-DP for bug-gnu-emacs@gnu.org; Thu, 10 Feb 2022 00:37:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59424) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nI28c-0005II-ON for bug-gnu-emacs@gnu.org; Thu, 10 Feb 2022 00:37:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nI28c-0001yl-JL for bug-gnu-emacs@gnu.org; Thu, 10 Feb 2022 00:37:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dima Kogan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Feb 2022 05:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 53911 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16444714087579 (code B ref -1); Thu, 10 Feb 2022 05:37:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 10 Feb 2022 05:36:48 +0000 Original-Received: from localhost ([127.0.0.1]:53321 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nI28O-0001yB-JE for submit@debbugs.gnu.org; Thu, 10 Feb 2022 00:36:48 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:41440) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nI28M-0001y4-Ql for submit@debbugs.gnu.org; Thu, 10 Feb 2022 00:36:47 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:41442) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nI28M-00028f-HA for bug-gnu-emacs@gnu.org; Thu, 10 Feb 2022 00:36:46 -0500 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]:58253) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nI28K-0005GV-AK for bug-gnu-emacs@gnu.org; Thu, 10 Feb 2022 00:36:46 -0500 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 4292D5C0112 for ; Thu, 10 Feb 2022 00:36:42 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 10 Feb 2022 00:36:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=secretsauce.net; h=cc:content-type:date:date:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to; s=fm2; bh=6 1LiF3GZq6USsOG1EcOQqwawtJU8D9G0ZDvzd3Cy1N0=; b=sUEMqUmDWZQn9nN09 i2xWz1UvsoItbYGsBlYWzK+4YrPOsNN/9hvFb9KQupOPooYtcUUldXTYGpYpgnLK O+oxYNcHaAnJLyNEoh0G54+nnVHZAA3i+9czPtWcXDFrfOofAQS0wlZATYdsJuXm SmdP3Sd/tN7a0wTy+bXDvkmnYtvR+jiFYcHFhXZWR2qPLzX6dXb1/6+Vh8ECuvE7 H9HWw59OuLe+hKNnlpWit0k27u5YTHMQFdVnk59zqtwLvoZ1qiaru3uOXw3tjl01 B2o8iSxbyBLabb+vlUPKpVB/3IlTF5iUqQn5TQ7ZIY+LumCevZAxK13Kb2oZPhSN 1risA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=61LiF3GZq6USsOG1EcOQqwawtJU8D9G0ZDvzd3Cy1 N0=; b=HJXfkeOhoc9jeEwo1UUgiSQDtPZzIVT1hioHNVpMeJWsgNItBSqw9+MGB rdoRFv8Sw0hWkvcTKAGx3Qfivt8HDY801U499ISA5knAf7ytrRZRpmYImICoSv9E FiriNb1eACV4kjhVzkiRbH8A8cGGGAke41x7ccosRJ9tYjTQRxcHA2PM8wFbQIP9 3ZVbRdnynZ8+7IBV2KnB42RFxmTcmE1ODQZqWFr/QYEe3UW105uIyWewaG+DhkKs TVDaSxpxlrV0FywMTzM2A+T1161DfyN3lKhrKX4QVpRwDPCPEZR2Gzi84zV4Lf3A JEXRToKfhIYAECt7vDiYc/uDuBNCA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddriedtgdekgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkfggtgesthdtredttddttd enucfhrhhomhepffhimhgrucfmohhgrghnuceoughimhgrsehsvggtrhgvthhsrghutggv rdhnvghtqeenucggtffrrghtthgvrhhnpeffvdffudfhkeffhfeifefhffdvtdfgfeejve euvdefudejjeduveeftdeggeeuvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgr mhepmhgrihhlfhhrohhmpeguihhmrgesshgvtghrvghtshgruhgtvgdrnhgvth X-ME-Proxy: Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Thu, 10 Feb 2022 00:36:41 -0500 (EST) Received-SPF: pass client-ip=66.111.4.27; envelope-from=dima@secretsauce.net; helo=out3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:226524 Archived-At: 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