From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Jo=E3o_T=E1vora?= Newsgroups: gmane.emacs.devel Subject: Re: [patch] make electric-pair-mode smarter/more useful Date: Mon, 16 Dec 2013 19:26:00 +0000 Message-ID: References: <87haalh806.fsf@gmail.com> <87d2l9wfne.fsf@yandex.ru> <87fvq49xzp.fsf@gmail.com> <87vbyuwyyc.fsf@gmail.com> <52A93B99.8040308@yandex.ru> <87r49if185.fsf@gmail.com> <52AA772D.7050503@yandex.ru> <52AC8DA6.5070403@yandex.ru> <87ppoxaaz4.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1387221984 30840 80.91.229.3 (16 Dec 2013 19:26:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 16 Dec 2013 19:26:24 +0000 (UTC) Cc: emacs-devel@gnu.org, Dmitry Gutov To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 16 20:26:30 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VsdoC-00051x-G8 for ged-emacs-devel@m.gmane.org; Mon, 16 Dec 2013 20:26:28 +0100 Original-Received: from localhost ([::1]:57830 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsdoC-0002ek-40 for ged-emacs-devel@m.gmane.org; Mon, 16 Dec 2013 14:26:28 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47159) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vsdo7-0002ZD-8j for emacs-devel@gnu.org; Mon, 16 Dec 2013 14:26:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vsdo5-0003ku-9d for emacs-devel@gnu.org; Mon, 16 Dec 2013 14:26:23 -0500 Original-Received: from mail-qc0-x22b.google.com ([2607:f8b0:400d:c01::22b]:59656) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vsdo5-0003kj-5F for emacs-devel@gnu.org; Mon, 16 Dec 2013 14:26:21 -0500 Original-Received: by mail-qc0-f171.google.com with SMTP id c9so4133820qcz.30 for ; Mon, 16 Dec 2013 11:26:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=OEkp2qGp3eizDTfRxnjc354x6K6zBISgOpS2JEoHRmg=; b=LnsQgP/jiBK6zx6kgBmgnqOaQkm2ZfxCY4pCmVh2VPu9PilmIV2lbIjON0u5RN69rB xtQPFXVVmlWkEWOiQHb+gdgoe9j8nGMITsLfBs2wxx/YnyMPgOqq/JgnTdOAl65mRGKX 9n4/RDNmvFLeixqgLh45tzDi1h0JYXkKLvxkmzaFtyJ6+TNEjIE+M8Q1cxET6WawZQkt I9tWJhesCNQmUud8cnfoo4iFqSPKcfKaeny6VoeprfbUhRInvgMYKEMqonb5E/jPbo8i 5ZuSHLfVUMSHv4x4U+UafvxdQWPE41Cc49Sr+YG8K4TTR1YvE5Elo32PW0q/be2GnkcJ RtAA== X-Received: by 10.224.151.209 with SMTP id d17mr36117580qaw.87.1387221980533; Mon, 16 Dec 2013 11:26:20 -0800 (PST) Original-Received: by 10.229.32.195 with HTTP; Mon, 16 Dec 2013 11:26:00 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c01::22b X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:166507 Archived-At: On Mon, Dec 16, 2013 at 3:34 AM, Stefan Monnier wrote: >> I personally would prefer that the current rules would *not* be the >> default in js-mode, as they are now, or any other mode). > I understand what you're saying as "I don't like electric-layout-mode". > FWIW, I agree with you. Actually, no. Really. I just didn't expect it to behave like that. It's uns= een in any other editor. That intention to type everything without ever reachin= g for RET, if candid, is very interesting. It's just a little foreign to me, = and probably more people. I think the newline-between-pairs rule is less foreig= n. >> Anyway, the default value should really be the newline-between-pairs >> rule, which currently only kicks in when electric-pair-mode is >> additionally enabled (btw, should it not?). > Enabling electric-pair-mode is definitely not on the table for 24.4, no. Yes, of course. You misunterstood me. I meant that the rule's predicate checks for electric-pair-mode before returning the symbol 'after-stay. It c= ould not care about it, so we get newlines between pairs with just electric-layout-mode. >> This is also possible, but overkill IMO. I like the current triad of >> electric modes. > I don't think it's overkill at all. It should be a separate minor mode > and default to enabled (but still conditional on electric-pair-mode). > I.e. make it part of electric-pair-mode and not try to shoe-horn it into > electric-layout-mode. I may have stated the opposite earlier, but > I think it's pretty clear to me, now, that the purpose of > electric-layout-mode is different. Oh, pity, I much agreed with the earlier stefan :-(. So a separate minor mode that on activation/deactivation adds/removes the rule to/from the default value of electric-layout-rules, right? But should the new minor mode automatically enable electric-pair-mode and electric-layout-mode if it finds they're not enabled? If it doesn't then a user who wants just the newlines will be surprised whe= n he enabled electric-newlines-mode and nothing happens... OR did you mean a new minor mode completely independent from electric-layout-mode, i.e., loose that 'after-stay nonsense that I proposed earlier. --=20 Jo=E3o T=E1vora