From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#33794: 26.1; electric-pair-mode breaks auto-newline minor mode of cc-mode Date: Sun, 23 Dec 2018 21:38:29 +0000 Message-ID: <87lg4fnctm.fsf@gmail.com> References: <20181221134829.29135.qmail@mail.muc.de> <20181221215042.GC16032@ACM> <87woo16yzp.fsf@gmail.com> <20181222221540.GC3935@ACM> <87sgypmasb.fsf@gmail.com> <20181223202143.GA6658@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1545601047 26389 195.159.176.226 (23 Dec 2018 21:37:27 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 23 Dec 2018 21:37:27 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Beatrix Klebe , bea@klebe.blog, Stefan Monnier , 33794@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 23 22:37:23 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gbBR3-0006lL-Rt for geb-bug-gnu-emacs@m.gmane.org; Sun, 23 Dec 2018 22:37:22 +0100 Original-Received: from localhost ([127.0.0.1]:60099 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gbBTA-0003qF-Gi for geb-bug-gnu-emacs@m.gmane.org; Sun, 23 Dec 2018 16:39:32 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:45135) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gbBSv-0003lB-Uo for bug-gnu-emacs@gnu.org; Sun, 23 Dec 2018 16:39:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gbBSi-0003Ee-TK for bug-gnu-emacs@gnu.org; Sun, 23 Dec 2018 16:39:10 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58063) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gbBSf-00033g-S2; Sun, 23 Dec 2018 16:39:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gbBSf-0004ec-LE; Sun, 23 Dec 2018 16:39:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Sun, 23 Dec 2018 21:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33794 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: Original-Received: via spool by 33794-submit@debbugs.gnu.org id=B33794.154560112017848 (code B ref 33794); Sun, 23 Dec 2018 21:39:01 +0000 Original-Received: (at 33794) by debbugs.gnu.org; 23 Dec 2018 21:38:40 +0000 Original-Received: from localhost ([127.0.0.1]:34087 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gbBSK-0004dn-F6 for submit@debbugs.gnu.org; Sun, 23 Dec 2018 16:38:40 -0500 Original-Received: from mail-wr1-f46.google.com ([209.85.221.46]:34419) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gbBSI-0004dO-WA for 33794@debbugs.gnu.org; Sun, 23 Dec 2018 16:38:39 -0500 Original-Received: by mail-wr1-f46.google.com with SMTP id j2so10188623wrw.1 for <33794@debbugs.gnu.org>; Sun, 23 Dec 2018 13:38:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-transfer-encoding; bh=1usmVj4yiacvYBBs8l0+5dzgDLNWOZSxSoEzVwcLW28=; b=MIP+5hVbIPSerTln+wkRNCvX4mXXCl6LewhvUXO917f9hDWtq/jhCe45RNuYHSHubb XViQzIehyXaVYDKuhGoyYVQDZvJ5e3Kn1O/y+DJ59qxDd0kDV5D1jU3XcJ9tU/Twprhf pQeG/tWCDZtwWsJ4YkUamMbK+g+H+/UfpuKEND6CuCc7nFFmsVXMGQL+hE62UgJmktf8 gjwzAGOAPm9BlFCSnV/CUwxLqqOB770//Y4wQlovAiSzYVMvqkxqBRJ67qQwkljL6MT+ t/ZY3SPyJOY5ycOFg96WU6Z23+Gr9trWjBvI2pEScw7Awd+4C0pUdeDlF+iW86ykBNHE IFQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references :user-agent:date:message-id:mime-version:content-transfer-encoding; bh=1usmVj4yiacvYBBs8l0+5dzgDLNWOZSxSoEzVwcLW28=; b=rLeMVHVGCF5cNtjFAMvP1ab57Y+5pwXbVZ8RqqIbgovGT5bet5gZ1idw9mMqH45yn8 IEQ4DHLMRvZH4wkpycAv+jUbJHjWJey20Gz9CzKG4JYeq6Bpfod+r+wp8aJfhYoSEfVM KlCTGI9zxVRaDeVEXiJex5H/HCErGpHbonTjaHIXj44h/mACKTOzIuNbvOnH0XvJmizr slujXxikzltFmYAeO5pA8HX0CnOVszFinR/Nz/soqxNgiz+/6giMgwEVIoeKM05bCk1u jtdR59OEGC7K2Jbpz9kPQR8dRs4qU0LTg6gBsDgTXDsE1ZgVuLW73oGuFf0uaxe0BSAJ rAGw== X-Gm-Message-State: AJcUukckkDYt4J7IqPKGHydUD7LThQfAptzxfYUkzqiFhvAOv8SRh52f /u5cDAD8VGw+3p7yoGnAuYK9Zpj6 X-Google-Smtp-Source: ALg8bN5n7bnNaBnG0vQNruH/L2SK14oREOxhvRSzEe6P4mydB1GPn8Mm5VlS6ZXRqSnzLdQYQ5xCCQ== X-Received: by 2002:a5d:4046:: with SMTP id w6mr10165855wrp.92.1545601112644; Sun, 23 Dec 2018 13:38:32 -0800 (PST) Original-Received: from lolita.yourcompany.com (89-180-151-45.net.novis.pt. [89.180.151.45]) by smtp.gmail.com with ESMTPSA id f2sm13297449wre.34.2018.12.23.13.38.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 23 Dec 2018 13:38:31 -0800 (PST) In-Reply-To: <20181223202143.GA6658@ACM> (Alan Mackenzie's message of "Sun, 23 Dec 2018 20:21:43 +0000") 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: 208.118.235.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:153807 Archived-At: Hello Alan, Alan Mackenzie writes: > Hello, Jo=C3=A3o. > CC Mode is not customisable in this way, any more than any other major > mode. Ripping out and replacing the innards of Lisp code is called > "hacking", not "customisation". Very well, if you consider my personal customization counts a hack, I will just have to live with that weight on my shoulders. I will not report bugs about CC-mode based on my customization, only Emacs -Q. Hmmm, come to think of it, I don't think I ever did. > At the moment, electric-pair-mode does not work with c-electric-brace > and c-electric-paren. This is the bug reported by Beatrix, the OP. You > are telling me you are not working on fixing the part of this problem > which is in e-p-m. Please understand me being somewhat frustrated by > this. If I were to dig in to e-p-m, make fixes, and commit them, I > suspect you would be somewhat annoyed. If you propose changes to e-p-m that: * don't break any (more) unit tests; * don't introduce new interfaces to special case cc-mode; * Stefan accepts, since the self-insert-command-hook part was his responsibility entirely, (as I have tried to explain a million times.) Then I don't see why I would be annoyed. (You could of course come to the faint realization that maybe there is the off-chance that there exists a glimmer of possibility that in a remote part of the multiverse it is quite possible that a minute part the problem lies in cc-mode. But no, that is preposterous! let us not even consider that heresy! It's decades old after all, it MUST be correct, forever and absolutely!) > But you're posting in the thread for bug #33794. I'm disappointed > you're not cooperating with me to fix this bug. I'm posting here because you summoned me, remember? And now I am replying to you. After analysing the problem of Beatrix, I offered an alternative solution to her actual problem using electric-layout-mode. (as have you in the meantime). Seeing as electric-layout-mode was manifestly insufficient to fix her problem I started working on making it better. >> Also, can you once and for all describe the "unusabilities" in other >> modes you keep talking about??? > Yes. These other modes call self-insert-command. self-insert-command, > because of the way post-self-insert-hook is (ab)used, has no definite > function. Sometimes it does what the doc says (inserting N copies of > the last character typed), other times it does other things. Again philosophical elucubrations? Say one concrete thing that is broken in these modes! No far-fetched hypotheticals. Here's a template for your report: Emacs -Q M-x electric-pair-mode M-x horribly-broken-mode-that-only-you-know-about some legitimate user input some horribly wrong result I'm not saying there aren't such bugs, but why are you evading the question? Or just say you haven't really witnessed any such bugs and let's be done with the farce. > You're working on #33794. You must surely have some notion of the cause > of the bug. I've said what my idea is, and I'm somewhat disappointed > you've failed to comment on this central point. Without understanding > the cause of a bug, any fix is going to be suboptimal. Look, I haven't looked into this and I don't want to go into a discussion with you about it because frankly, very frankly indeed, it would be no fun. You've already decided long ago that the world is wrong. Any comment I could make about how CC-mode could be changed would just prompt some comment about how it's "always worked", "for decades" and "look at how fluffy the whiskers on this gray old Gandalf of a mode are", and "look at this young arriviste e-p-m rascal causing all the mischief". In a great part I symphatize immensely with your ardent defense of your work, if it were literature or art I would definitely be on your side, the patron saint of idiosyncrasies. On the other hand, seeing as this is software, I would find myself having to point out that these arguments have no bearing on reality. I'll say this: consider that it is not a bug: e-p-m's contract is: works for every mode, except cc-mode, where mileage may vary. Mileage is indeed slightly shorter on cc-mode with c-toggle-auto-newline: let's live with it and move on. > But you're commenting on this thread, which is about a bug concerning > the interaction of e-p-m with CC Mode, not e-l-m. If you're suggesting I stop replying to these emails, then maybe you have a point. I'm a little tired. Merry Christmas, Alan Jo=C3=A3o