From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#36516: Wrong dynamic abbrev expansion after space Date: Sat, 03 Aug 2019 23:58:13 +0300 Organization: LINKOV.NET Message-ID: <877e7ux8q6.fsf@mail.linkov.net> References: <8736jks4wg.fsf@mail.linkov.net> <83imsg9tfk.fsf@gnu.org> <87zhlp33kh.fsf@mail.linkov.net> <83k1ct6yrl.fsf@gnu.org> <87o9241a6n.fsf@mail.linkov.net> <20190727171831.GB81205@breton.holly.idiocy.org> <87k1c2qazy.fsf@mail.linkov.net> <20190803113439.GC31224@breton.holly.idiocy.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="120091"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 36516@debbugs.gnu.org To: Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Aug 03 23:42:13 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hu1n2-000V5J-9q for geb-bug-gnu-emacs@m.gmane.org; Sat, 03 Aug 2019 23:42:12 +0200 Original-Received: from localhost ([::1]:42158 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hu1n1-0006Ub-8m for geb-bug-gnu-emacs@m.gmane.org; Sat, 03 Aug 2019 17:42:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57278) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hu1mt-0006Px-Qq for bug-gnu-emacs@gnu.org; Sat, 03 Aug 2019 17:42:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hu1ms-0003qY-MC for bug-gnu-emacs@gnu.org; Sat, 03 Aug 2019 17:42:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51332) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hu1ms-0003qN-GS for bug-gnu-emacs@gnu.org; Sat, 03 Aug 2019 17:42:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hu1ms-0002Ly-Cm for bug-gnu-emacs@gnu.org; Sat, 03 Aug 2019 17:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 03 Aug 2019 21:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36516 X-GNU-PR-Package: emacs Original-Received: via spool by 36516-submit@debbugs.gnu.org id=B36516.15648684838969 (code B ref 36516); Sat, 03 Aug 2019 21:42:02 +0000 Original-Received: (at 36516) by debbugs.gnu.org; 3 Aug 2019 21:41:23 +0000 Original-Received: from localhost ([127.0.0.1]:60147 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hu1mF-0002Ka-Gb for submit@debbugs.gnu.org; Sat, 03 Aug 2019 17:41:23 -0400 Original-Received: from anteater.elm.relay.mailchannels.net ([23.83.212.3]:54476) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hu1mD-0002KR-AU for 36516@debbugs.gnu.org; Sat, 03 Aug 2019 17:41:22 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 18BE3501FD1; Sat, 3 Aug 2019 21:41:20 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a75.g.dreamhost.com (100-96-15-31.trex.outbound.svc.cluster.local [100.96.15.31]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 82D6F501541; Sat, 3 Aug 2019 21:41:19 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a75.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.5); Sat, 03 Aug 2019 21:41:20 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Little-Belong: 382faec93d010142_1564868479862_177988658 X-MC-Loop-Signature: 1564868479862:3470728577 X-MC-Ingress-Time: 1564868479861 Original-Received: from pdx1-sub0-mail-a75.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a75.g.dreamhost.com (Postfix) with ESMTP id 249C37FEB7; Sat, 3 Aug 2019 14:41:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=linkov.net; bh=A4FzxB IlHWff6Y1XlNUDTrBB8DI=; b=hwm++LU4GoGtcL/ADn+wBiKa9M37BCX4D3SJ+7 89OJBn1M30DnNx6G6QKG/TlLniYtXtZGTma3puyyUABa7hHh+ZKGs8FVRB8+B5d5 8dVxgmRqjNz/vJ+0QRl186itYHSUpjpZwVXFT61JWi/pFyE1U01qabxBDUcHa6Ps OfNfk= Original-Received: from mail.jurta.org (m91-129-103-76.cust.tele2.ee [91.129.103.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a75.g.dreamhost.com (Postfix) with ESMTPSA id 88E997F0F9; Sat, 3 Aug 2019 14:41:11 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a75 In-Reply-To: <20190803113439.GC31224@breton.holly.idiocy.org> (Alan Third's message of "Sat, 3 Aug 2019 12:34:39 +0100") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddruddtvddgvddtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgfgsehtkeertddtreejnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtfedrjeeinecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtfedrjeeipdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprghlrghnsehiughiohgthidrohhrghenucevlhhushhtvghrufhiiigvpedt 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: 209.51.188.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:164503 Archived-At: >> Maybe it's possible to break out of the vicious cycle of =E2=80=98SPC = M-/=E2=80=99 >> repetitions by making =E2=80=98SPC M-/=E2=80=99 look like a normal exp= ansion, e.g.: > > This looks good to me. The only problem is it breaks the test for > bug#1948. I think it no longer squashes all the spaces. Sorry for breaking the test, I'll try to find a fix that will pass all te= sts. Meanwhile, I started to rely heavily on consequent calls of M-/ and today this feature reared its ugly head (so then could it be called a misfeature). Here's is the case that raises the error: 0. emacs -Q 1. Type these two lines: str 1 str 2 (optionally set debug-on-error to t) 2. On the third line type: s ;; self-insert-command M-/ ;; dabbrev-expand SPC ;; self-insert-command M-/ ;; dabbrev-expand M-/ ;; dabbrev-expand ;; backward-delete-char-untabify ;; backward-delete-char-untabify ;; backward-delete-char-untabify ;; backward-delete-char-untabify ;; backward-delete-char-untabify The amount of keypresses depends on the length of the random word expanded, so the intention is to delete that word and the space character. SPC ;; self-insert-command M-/ ;; dabbrev-expand and the bug is revealed that signals this error: Debugger entered--Lisp error: (search-failed "\\(?:\\sw\\|\\s_\\)+") re-search-forward("\\(?:\\sw\\|\\s_\\)+") dabbrev-expand(nil) funcall-interactively(dabbrev-expand nil) call-interactively(dabbrev-expand nil nil) command-execute(dabbrev-expand)