From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: CC Mode and electric-pair "problem". Date: Sun, 17 Jun 2018 22:27:20 +0100 Message-ID: References: <20180531123747.GA24752@ACM> <20180617201351.GA4580@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000685ecb056edd1ee9" X-Trace: blaine.gmane.org 1529270749 16833 195.159.176.226 (17 Jun 2018 21:25:49 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 17 Jun 2018 21:25:49 +0000 (UTC) Cc: Glenn Morris , Emacs developers , Tino Calancha To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 17 23:25:45 2018 Return-path: Envelope-to: ged-emacs-devel@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 1fUfB9-0004Hi-TO for ged-emacs-devel@m.gmane.org; Sun, 17 Jun 2018 23:25:44 +0200 Original-Received: from localhost ([::1]:56479 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUfDG-000735-NI for ged-emacs-devel@m.gmane.org; Sun, 17 Jun 2018 17:27:54 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58278) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUfD8-00070k-4A for emacs-devel@gnu.org; Sun, 17 Jun 2018 17:27:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fUfD6-00007Z-SP for emacs-devel@gnu.org; Sun, 17 Jun 2018 17:27:46 -0400 Original-Received: from mail-io0-x22a.google.com ([2607:f8b0:4001:c06::22a]:42966) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fUfD4-0008V1-LW; Sun, 17 Jun 2018 17:27:42 -0400 Original-Received: by mail-io0-x22a.google.com with SMTP id r24-v6so15123065ioh.9; Sun, 17 Jun 2018 14:27:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=elYQDh1vma4hTb5eG8ZYyqVJ673lkg92dbnUQvzmt2k=; b=sElFuFrolSuh/Bk1Rj65L76F+6szgxxHSUWoVIFNaW9bwAx8+grtRNUUiALMzTsxLA 2P5O4Z3ue0tXygrTyZ8xDsN+YqGm16UMBQljbaFNeSbQSlRa34cO6nqxEu0IRjdt40da XSdjwnMasrcZLHvoix4Ue65SqHkNPXL51S8fzS+CzrPfque6ZKnNkCv2z+SbbnA8vic/ mFw2IdK46SWWEUcOeXDw6UZKx/npnM0e8O5aytuDw7tO/RreQSXVEBZ8Wl6TVlrhOZQ8 Mq4tIgI3UvdrRQhjdaVNyWqbTQSh3si/IOcNtLsqia6shKuO9qaceSj+Efrd9YFOSviX wMiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=elYQDh1vma4hTb5eG8ZYyqVJ673lkg92dbnUQvzmt2k=; b=V2om8EqMn/hJPiue2mg4HDBUDMi6BBbcn4iq5CLCs+6F4ycHJfOHP8JdQZOcepyb+3 T3y75sgtfCtICMaRMWy+TLCL87QpD1lN6pN2OvtjWMZQPPZuZenOaURDQedlOmTA2JlD mXCXX+tNnbgT1xJRqAv/uzx966tFiAXtP2xd3Xmy/MTOmbwMtpc9KSF3DZJ+HuHsc5Hj uP07vSQUMFBupT4ktL4QuHWxroD9qIoEASR91J7Z0c9LnbtkyqVOxY5sj1O+g9Fm2oeN doBxEOJBJSVNxg/Ou5+9BVIDeMd6HA4SA8Px5T7YV3J2nJhjyaEXW8Gep81/JBsI67pk v21w== X-Gm-Message-State: APt69E1ZP+E7zPH124XMZhAD6PB8yYfa0A3niR16MNsMGlOq7rC7BN0N g5yW/zJfTP2ffnqZ6OWmCuebCp0ehpzgmSAYQkE= X-Google-Smtp-Source: ADUXVKJecbjAl709YMpgsEPBrmLIc6ykBwtBZ6TSX687rdEG/K9j9oh0T3oviDrduFoSxVnSdfYQF25ie+ZNncsrl+w= X-Received: by 2002:a6b:2909:: with SMTP id p9-v6mr8645465iop.28.1529270860536; Sun, 17 Jun 2018 14:27:40 -0700 (PDT) Original-Received: by 2002:a4f:2246:0:0:0:0:0 with HTTP; Sun, 17 Jun 2018 14:27:20 -0700 (PDT) In-Reply-To: <20180617201351.GA4580@ACM> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4001:c06::22a X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:226436 Archived-At: --000000000000685ecb056edd1ee9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Jun 17, 2018 at 9:13 PM, Alan Mackenzie wrote: > Hello, Glenn. > > On Sun, Jun 17, 2018 at 12:58:53 -0400, Glenn Morris wrote: > > Alan Mackenzie wrote: > > > > However, the test suite (make check) threw up another discrepancy, in= a > > > test called > > > electric-pair-whitespace-chomping-2-at-point-4-in-c++-mode-in-strings= . > > > Hello, is this still being worked on? > > The test continues to fail on RHEL 7 and hydra.nixos.org. > > From my point of view, the bug is not being worked on this very day, but > has by no means been forgotten. It has needed a period of mulling over. > I think Jo=C3=A3o sees it the same way. > Yes, while mulling over things is generally good, I believe the problem from Glenn's perspective is the nuisance of checking whether every test failure is something to worry about or just the thing being mulled over. So I suggest taking a quick temporary action to make the test pass and then think about how to do it properly. This action could be disabling the test temporarily but IME that invariably buries the issue ad eternum. So it's better to do it in cc-mode. Although it won't be difficult to fix, this bug is an awkward thing, and > will need decisions (smallish ones) to be taken. > > My favoured method would be to alter electric-pair--skip-whitespace such > that a NL terminating a string (as contrasted with a NL terminating a > comment) would be allowed to be scanned over. > I'm OK with adding an customization point to electric-pair--skip-whitespace that c-mode can customize. But I also wonder whether the benefit to end-users of handling NL-terminated strings are worth it. Perhaps there are indeed benefits, it's just that I haven't seen them argued. But more importantly perhaps there are ways to reap these benefits in a way that doesn't require changes to e-p-m, or even better, in a way that benefits all of Emacs, not just c-mode. So, in practice, is the advantage here that the user is visually warned of an invalid NL-terminated string? Jo=C3=A3o --000000000000685ecb056edd1ee9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sun, Jun 17, 2018 at 9:13 PM, Alan Mackenzie <acm@muc.de= > wrote:
Hello, Glenn.

On Sun, Jun 17, 2018 at 12:58:53 -0400, Glenn Morris wrote:
> Alan Mackenzie wrote:

> > However, the test suite (make check) threw up another discrepancy= , in a
> > test called
> > electric-pair-whitespace-chomping-2-at-point-4-in-c++-m= ode-in-strings.

> Hello, is this still being worked on?
> The test continues to fail on RHEL 7 and hydra.nixos.org.

From my point of view, the bug is not being worked on this very= day, but
has by no means been forgotten.=C2=A0 It has needed a period of mulling ove= r.
I think Jo=C3=A3o sees it the same way.

Yes, while mulling over things is generally good, I believe the problem
from Glenn's perspective is the nuisance of checking wheth= er every
test failure is something to worry about or just the thi= ng being
mulled over.

So I suggest = taking a quick temporary action to make the test pass
and then th= ink about how to do it properly.=C2=A0 This action could be
= disabling the test temporarily but IME that invariably buries the
issue ad eternum. So it's better to do it in cc-mode.
<= br>
Although it won't be difficult to fix, this bug is an awkward thing, an= d
will need decisions (smallish ones) to be taken.

My favoured method would be to alter electric-pair--skip-whitespace such that a NL terminating a string (as contrasted with a NL terminating a
comment) would be allowed to be scanned over.

I'm OK with adding an customization point to
elec= tric-pair--skip-whitespace that c-mode can customize.=C2=A0 But I also
=
wonder whether the benefit to end-users of handling NL-terminate= d
strings are worth it.=C2=A0 Perhaps there are indeed benef= its, it's just that
I haven't seen them argued.=C2= =A0 But more importantly perhaps there are
ways to reap thes= e benefits in a way that doesn't require changes
to e-p-= m, or even better, in a way that benefits all of Emacs,
not just = c-mode.

So, in practice, is the advantage here tha= t the user is visually
warned of an invalid NL-terminated string?=

Jo=C3=A3o


--000000000000685ecb056edd1ee9--