From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#35496: 27.0.50; smie-blink-matching-open blinks token before point after RET Date: Wed, 8 May 2019 12:51:00 +0300 Message-ID: <25c51540-6c49-ba79-bbb4-e60b1e616fc6@yandex.ru> References: <4cfccfa9-ee9d-3bc0-30a3-36d656f96de8@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="179233"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 Cc: 35496@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 08 11:53:17 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.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hOJGH-000kWt-Bf for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 May 2019 11:53:17 +0200 Original-Received: from localhost ([127.0.0.1]:34083 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOJGG-0000mN-DD for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 May 2019 05:53:16 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:52248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOJF5-0007w3-DZ for bug-gnu-emacs@gnu.org; Wed, 08 May 2019 05:52:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOJF4-0002BO-Eo for bug-gnu-emacs@gnu.org; Wed, 08 May 2019 05:52:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46803) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hOJF4-0002B0-7m for bug-gnu-emacs@gnu.org; Wed, 08 May 2019 05:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hOJF4-0000mu-2b for bug-gnu-emacs@gnu.org; Wed, 08 May 2019 05:52:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 May 2019 09:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35496 X-GNU-PR-Package: emacs Original-Received: via spool by 35496-submit@debbugs.gnu.org id=B35496.15573090732964 (code B ref 35496); Wed, 08 May 2019 09:52:02 +0000 Original-Received: (at 35496) by debbugs.gnu.org; 8 May 2019 09:51:13 +0000 Original-Received: from localhost ([127.0.0.1]:60347 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOJEG-0000lj-Tv for submit@debbugs.gnu.org; Wed, 08 May 2019 05:51:13 -0400 Original-Received: from mail-lj1-f181.google.com ([209.85.208.181]:33247) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOJEE-0000lU-Cu for 35496@debbugs.gnu.org; Wed, 08 May 2019 05:51:11 -0400 Original-Received: by mail-lj1-f181.google.com with SMTP id f23so16933502ljc.0 for <35496@debbugs.gnu.org>; Wed, 08 May 2019 02:51:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=aQt72IJedcg6EHke0DcYqKLgb+x91//gzdlSWhEI0AA=; b=Z8PvG9I7YEWUTdzdsbKqb8C01SnH8SseOvbC449oput4YmVR7EES3mr2PBViPEIS9d KL0QNG200yIVYpFUj8Pcu8t3ZRAOd5auRyXlTAlnuEUsd7OiTBfxGOT7uGBvt3KxBrU+ +QqgCVNGez3UsFf3duRAG2T9zfxJIajFcZ7xJgYnAg+NEdgHWSQii4jOSoln+VLLl1ue wl2N4RFH1k0j5yIJl5skr+GN7LuFs2iVuUuGN+RUo9jZSbhU3QXIvqphKdXjzTtGXB9R sOQDzztGdWqW7MZGcQTRhT/PHaUnRhNta0NSVhXYYuQgI/f4Xp9pi6VD7Cvn8AqoZAhx TE+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=aQt72IJedcg6EHke0DcYqKLgb+x91//gzdlSWhEI0AA=; b=ZOhWR76WfSlMIJIr1yEbAZQ3lv+dFIcB+EZtPMAAQfT3vKy5u8k5b9M/pHt0eolL/W Uq1P6fpjpA9FEp+Z/gbXXZfdU4mDDsmc6Wi0SlUMO1+TehwpVAl6t7iMhOernMKGfDl6 Jcs4jIM745fSZh2iNb1aSdmo6QeNgy1tyZVw4AqiaJ1gN44FOiy/uGotJzRmufJo0ePB jxdnOIsezngWYjeAFcsLIQpX2Xz5FpBOQpPm4gvADkCGr913H8ETk3ltAlCrlhKsMbka vATZK+n5OBJUTpiVplOrlri8gATIIDK4JD2z6DVkwInl/Z8aGfsqH/mdJAjL+9wiw8Fl Rnkg== X-Gm-Message-State: APjAAAVXg3O8K+PPWvkmmMjqi0cxqhnbT/UmOMI+dw6+LrbfJY3rn/6n bgWCDsiGq1Ovy+wBP5os5EcMeGvw X-Google-Smtp-Source: APXvYqxYn9FO9butNflKplz7Z4FG1qHEznu81zsmWT8DstK0qRDAFL2W6p1TEIlptMFVvpPOEQKzKA== X-Received: by 2002:a2e:5517:: with SMTP id j23mr4531798ljb.5.1557309064066; Wed, 08 May 2019 02:51:04 -0700 (PDT) Original-Received: from [192.168.1.3] ([185.105.174.23]) by smtp.googlemail.com with ESMTPSA id f25sm3864570lfc.46.2019.05.08.02.51.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 May 2019 02:51:02 -0700 (PDT) In-Reply-To: Content-Language: en-US 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:158927 Archived-At: On 08.05.2019 4:44, Stefan Monnier wrote: >> 1. Disable show-paren-mode if it's enabled. >> 2. Evalute the attached .el file (which defined a major mode). >> 3. Create a new bufferand type M-x foo-mode. >> 4. Type 'def foo do' (without quotes) and press RET. >> 5. Cursor will hang around on the first line even after the newline >> is inserted. > > It's not a bug, it's a feature: we can't highlight the matching `def` > when you hit the `o` because we don't know yet whether you actually > intended to type `do` or a longer identifier, so we postpone the > blinking to the next char. But we don't end up blinking to `def` after RET, we blink to `do`. There must be an opportunity to check that we don't blink to the preceding token. > smie-blink-matching-triggers defaults to ?\s and ?\n so the "next char" > where the blinking can happen is SPC or RET. > > Maybe we shouldn't postpone the blinking (i.e. we should add ?o to > smie-blink-matching-triggers)? SMIE fills it automatically based on the current set of tokens. If I add it myself, yeah, the behavior is better in this case. But I kinda buy your reasoning about not having it there (even though it's not a panacea: the user can type whatever token, not only ones in the smie-closer-alist. Overall, I feel that the smie-blink-matching-inners might be too much as default anyway. So it's not a big deal if elixir-mode has to disable it.