GNU bug report logs - #38406
27.0.50; post-self-insert-hook does not hold its contract in cc-mode derived modes

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: yyoncho <yyoncho@HIDDEN>; dated Wed, 27 Nov 2019 20:01:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 38406 <at> debbugs.gnu.org:


Received: (at 38406) by debbugs.gnu.org; 8 Dec 2019 02:33:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 07 21:33:20 2019
Received: from localhost ([127.0.0.1]:49979 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1idmNs-0005pj-9O
	for submit <at> debbugs.gnu.org; Sat, 07 Dec 2019 21:33:20 -0500
Received: from eggs.gnu.org ([209.51.188.92]:59061)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1idmNq-0005pW-Vw
 for 38406 <at> debbugs.gnu.org; Sat, 07 Dec 2019 21:33:19 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:34659)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iddV2-0002Pb-1M; Sat, 07 Dec 2019 12:04:08 -0500
Received: from [176.228.60.248] (port=2172 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1ida7u-00053j-LX; Sat, 07 Dec 2019 08:28:03 -0500
Date: Sat, 07 Dec 2019 15:27:46 +0200
Message-Id: <83wob8e04t.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Alan Mackenzie <acm@HIDDEN>
In-reply-to: <20191207114045.GA6182@ACM> (message from Alan Mackenzie on Sat, 
 7 Dec 2019 11:40:45 +0000)
Subject: Re: bug#38406: 27.0.50; post-self-insert-hook does not hold its
 contract in cc-mode derived modes
References: <20191204204159.GA7587@ACM> <83immuj0g7.fsf@HIDDEN>
 <20191205190951.GA6252@ACM> <83pnh2h8x1.fsf@HIDDEN>
 <20191205201713.GC6252@ACM> <83eexhho8o.fsf@HIDDEN>
 <20191206182842.GA3999@ACM> <83y2vpffyd.fsf@HIDDEN>
 <20191206222459.GB3999@ACM> <83h82cfsvf.fsf@HIDDEN>
 <20191207114045.GA6182@ACM>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 38406
Cc: yyoncho@HIDDEN, 38406 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Sat, 7 Dec 2019 11:40:45 +0000
> Cc: yyoncho@HIDDEN, 38406 <at> debbugs.gnu.org
> From: Alan Mackenzie <acm@HIDDEN>
> 
> So, that would leave just electric-pair-post-self-insert-function to be
> filtered out of the hook.

Thank you, I agree.  So please go ahead and push your changes with
those modifications.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38406; Package emacs. Full text available.

Message received at 38406 <at> debbugs.gnu.org:


Received: (at 38406) by debbugs.gnu.org; 6 Dec 2019 22:25:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 06 17:25:06 2019
Received: from localhost ([127.0.0.1]:47141 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1idM26-0007P3-4Q
	for submit <at> debbugs.gnu.org; Fri, 06 Dec 2019 17:25:06 -0500
Received: from colin.muc.de ([193.149.48.1]:25353 helo=mail.muc.de)
 by debbugs.gnu.org with smtp (Exim 4.84_2)
 (envelope-from <acm@HIDDEN>) id 1idM24-0007Oo-0E
 for 38406 <at> debbugs.gnu.org; Fri, 06 Dec 2019 17:25:04 -0500
Received: (qmail 29406 invoked by uid 3782); 6 Dec 2019 22:25:02 -0000
Received: from acm.muc.de (p4FE15A40.dip0.t-ipconnect.de [79.225.90.64]) by
 colin.muc.de (tmda-ofmipd) with ESMTP;
 Fri, 06 Dec 2019 23:24:59 +0100
Received: (qmail 9234 invoked by uid 1000); 6 Dec 2019 22:24:59 -0000
Date: Fri, 6 Dec 2019 22:24:59 +0000
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#38406: 27.0.50; post-self-insert-hook does not hold its
 contract in cc-mode derived modes
Message-ID: <20191206222459.GB3999@ACM>
References: <20191201192709.GE5085@ACM> <83blsrn58a.fsf@HIDDEN>
 <20191204204159.GA7587@ACM> <83immuj0g7.fsf@HIDDEN>
 <20191205190951.GA6252@ACM> <83pnh2h8x1.fsf@HIDDEN>
 <20191205201713.GC6252@ACM> <83eexhho8o.fsf@HIDDEN>
 <20191206182842.GA3999@ACM> <83y2vpffyd.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <83y2vpffyd.fsf@HIDDEN>
User-Agent: Mutt/1.10.1 (2018-07-13)
X-Delivery-Agent: TMDA/1.1.12 (Macallan)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 38406
Cc: yyoncho@HIDDEN, 38406 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello, Eli.

On Fri, Dec 06, 2019 at 20:48:26 +0200, Eli Zaretskii wrote:
> > Date: Fri, 6 Dec 2019 18:28:42 +0000
> > Cc: yyoncho@HIDDEN, 38406 <at> debbugs.gnu.org
> > From: Alan Mackenzie <acm@HIDDEN>

> > > There might be a misunderstanding on my part here.  Could you please
> > > explain how come electric-pair-post-self-insert-function is called
> > > twice if it isn't removed from the hook? where's the second (or the
> > > first) call?

> > The first call is an explicit call from c-electric-brace to
> > electric-pair-post-self-insert-function.  Depending on the changes to the
> > buffer this call causes (amongst other things), differing electric
> > actions are performed by c-electric-brace.  This call is itself a
> > workaround, there being no purpose designed function for this purpose in
> > elec-pair.el.

> > The second call happens when c-electric-brace run-hook's
> > post-self-insert-hook - _if_ electric-pair-post-self-insert-function
> > hasn't been filtered out of that hook.

> If you already call that particular function explicitly, then calling
> it one more time is indeed redundant.

No, it's not redundant.  It's positively harmful.

> But is this the case with all the other functions that you suggest to
> filter from post-self-insert-hook?

No.  They have individual reasons for being filtered out.  Don't forget
that this is a particularly sensitive hook, allowing hook functions to
interfere in an unsynchronised way with partially complete command
processing.

Let's go through them again:

  smie-blink-matching-open is inapplicable to CC Mode and just takes up
  processor cycles.

  electric-pair-post-self-insert-function we've already discussed.

  blink-paren-post-self-insert-function would do nothing anyhow, since
  blink-paren-function has been bound to nil - this is so that the actual
  blinking doesn't occur until the newly inserted brace is at its final
  position.

  electric-indent-post-self-insert-function is redundant and possibly
  harmful.

  electric-layout-post-self-insert-function is undocumented, thus likely
  to be harmful.  Its name suggests it is redundant.

  electric-quote-post-self-insert-function is undocumented, uncommented
  and obscure.  It is safer not to risk running it.

Given that the mechanism for filtering post-self-insert-hook is there,
why is there the resistance to filtering out redundant and effect-free
functions?

And how come functions without meaningful doc strings are allowed onto
Emacs hooks?

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38406; Package emacs. Full text available.

Message received at 38406 <at> debbugs.gnu.org:


Received: (at 38406) by debbugs.gnu.org; 6 Dec 2019 18:48:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 06 13:48:35 2019
Received: from localhost ([127.0.0.1]:47067 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1idIeZ-0007SO-F3
	for submit <at> debbugs.gnu.org; Fri, 06 Dec 2019 13:48:35 -0500
Received: from eggs.gnu.org ([209.51.188.92]:57072)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1idIeW-0007S8-TX
 for 38406 <at> debbugs.gnu.org; Fri, 06 Dec 2019 13:48:33 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:48069)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1idIeR-0002dY-FL; Fri, 06 Dec 2019 13:48:27 -0500
Received: from [176.228.60.248] (port=1574 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1idIeQ-0005v9-S1; Fri, 06 Dec 2019 13:48:27 -0500
Date: Fri, 06 Dec 2019 20:48:26 +0200
Message-Id: <83y2vpffyd.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Alan Mackenzie <acm@HIDDEN>
In-reply-to: <20191206182842.GA3999@ACM> (message from Alan Mackenzie on Fri, 
 6 Dec 2019 18:28:42 +0000)
Subject: Re: bug#38406: 27.0.50; post-self-insert-hook does not hold its
 contract in cc-mode derived modes
References: <20191201150738.GB5085@ACM> <83imn0lyed.fsf@HIDDEN>
 <20191201192709.GE5085@ACM> <83blsrn58a.fsf@HIDDEN>
 <20191204204159.GA7587@ACM> <83immuj0g7.fsf@HIDDEN>
 <20191205190951.GA6252@ACM> <83pnh2h8x1.fsf@HIDDEN>
 <20191205201713.GC6252@ACM> <83eexhho8o.fsf@HIDDEN>
 <20191206182842.GA3999@ACM>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 38406
Cc: yyoncho@HIDDEN, 38406 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Fri, 6 Dec 2019 18:28:42 +0000
> Cc: yyoncho@HIDDEN, 38406 <at> debbugs.gnu.org
> From: Alan Mackenzie <acm@HIDDEN>
> 
> > There might be a misunderstanding on my part here.  Could you please
> > explain how come electric-pair-post-self-insert-function is called
> > twice if it isn't removed from the hook? where's the second (or the
> > first) call?
> 
> The first call is an explicit call from c-electric-brace to
> electric-pair-post-self-insert-function.  Depending on the changes to the
> buffer this call causes (amongst other things), differing electric
> actions are performed by c-electric-brace.  This call is itself a
> workaround, there being no purpose designed function for this purpose in
> elec-pair.el.
> 
> The second call happens when c-electric-brace run-hook's
> post-self-insert-hook - _if_ electric-pair-post-self-insert-function
> hasn't been filtered out of that hook.

If you already call that particular function explicitly, then calling
it one more time is indeed redundant.

But is this the case with all the other functions that you suggest to
filter from post-self-insert-hook?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38406; Package emacs. Full text available.

Message received at 38406 <at> debbugs.gnu.org:


Received: (at 38406) by debbugs.gnu.org; 6 Dec 2019 18:28:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 06 13:28:48 2019
Received: from localhost ([127.0.0.1]:47045 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1idILP-0005To-TU
	for submit <at> debbugs.gnu.org; Fri, 06 Dec 2019 13:28:48 -0500
Received: from colin.muc.de ([193.149.48.1]:25173 helo=mail.muc.de)
 by debbugs.gnu.org with smtp (Exim 4.84_2)
 (envelope-from <acm@HIDDEN>) id 1idILP-0005Th-0E
 for 38406 <at> debbugs.gnu.org; Fri, 06 Dec 2019 13:28:47 -0500
Received: (qmail 63569 invoked by uid 3782); 6 Dec 2019 18:28:45 -0000
Received: from acm.muc.de (p4FE15A40.dip0.t-ipconnect.de [79.225.90.64]) by
 colin.muc.de (tmda-ofmipd) with ESMTP;
 Fri, 06 Dec 2019 19:28:42 +0100
Received: (qmail 5171 invoked by uid 1000); 6 Dec 2019 18:28:42 -0000
Date: Fri, 6 Dec 2019 18:28:42 +0000
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#38406: 27.0.50; post-self-insert-hook does not hold its
 contract in cc-mode derived modes
Message-ID: <20191206182842.GA3999@ACM>
References: <20191201150738.GB5085@ACM> <83imn0lyed.fsf@HIDDEN>
 <20191201192709.GE5085@ACM> <83blsrn58a.fsf@HIDDEN>
 <20191204204159.GA7587@ACM> <83immuj0g7.fsf@HIDDEN>
 <20191205190951.GA6252@ACM> <83pnh2h8x1.fsf@HIDDEN>
 <20191205201713.GC6252@ACM> <83eexhho8o.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <83eexhho8o.fsf@HIDDEN>
User-Agent: Mutt/1.10.1 (2018-07-13)
X-Delivery-Agent: TMDA/1.1.12 (Macallan)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 38406
Cc: yyoncho@HIDDEN, 38406 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello, Eli.

On Fri, Dec 06, 2019 at 10:06:31 +0200, Eli Zaretskii wrote:
> > Date: Thu, 5 Dec 2019 20:17:13 +0000
> > Cc: yyoncho@HIDDEN, 38406 <at> debbugs.gnu.org
> > From: Alan Mackenzie <acm@HIDDEN>

> > > We never provide any "safety nets" for silly hook functions, so we
> > > shouldn't do that here as well.  OTOH, if someone puts a function
> > > on those hooks which does something legitimate, we should meet
> > > their expectations and let those functions run, as the contract
> > > says.

> > I think that, with my latest patch, that is the case.

> > > So I think you shouldn't filter anything from the hook before you
> > > run it.

> > I thought you were urging me to do precisely that two or three posts
> > ago.

> > I just tried taking a particular function off of
> > c--unsafe-post-self-insert-hook-functions and enabling electric-pair
> > mode.  On typing a brace, electric-pair-mode threw an obscure error.
> > It doesn't make sense to call electric-pair-post-self-insert-function
> > twice for one keypress.  That is a good reason for having that
> > function filtered out of the hook.

> There might be a misunderstanding on my part here.  Could you please
> explain how come electric-pair-post-self-insert-function is called
> twice if it isn't removed from the hook? where's the second (or the
> first) call?

The first call is an explicit call from c-electric-brace to
electric-pair-post-self-insert-function.  Depending on the changes to the
buffer this call causes (amongst other things), differing electric
actions are performed by c-electric-brace.  This call is itself a
workaround, there being no purpose designed function for this purpose in
elec-pair.el.

The second call happens when c-electric-brace run-hook's
post-self-insert-hook - _if_ electric-pair-post-self-insert-function
hasn't been filtered out of that hook.

> > The root of the problem is the hook post-self-insert-hook.  It is a
> > thoroughly bad idea.  The implications of introducing it a few years ago
> > weren't thought through.

> That might be so, but I think it's too late for removing it now.

> > Assuming that removing this hook from Emacs isn't an option, we are
> > left with ugly ad-hoc workarounds, such as the patch we're currently
> > discussing.

> Yes.

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38406; Package emacs. Full text available.

Message received at 38406 <at> debbugs.gnu.org:


Received: (at 38406) by debbugs.gnu.org; 6 Dec 2019 16:15:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 06 11:15:46 2019
Received: from localhost ([127.0.0.1]:46931 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1idGGf-00052f-Fk
	for submit <at> debbugs.gnu.org; Fri, 06 Dec 2019 11:15:45 -0500
Received: from eggs.gnu.org ([209.51.188.92]:57002)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1idGGa-00050w-28
 for 38406 <at> debbugs.gnu.org; Fri, 06 Dec 2019 11:15:41 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:43116)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1idGGN-00089o-BZ; Fri, 06 Dec 2019 11:15:27 -0500
Received: from [176.228.60.248] (port=2068 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1id8dD-0003Be-E3; Fri, 06 Dec 2019 03:06:32 -0500
Date: Fri, 06 Dec 2019 10:06:31 +0200
Message-Id: <83eexhho8o.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Alan Mackenzie <acm@HIDDEN>
In-reply-to: <20191205201713.GC6252@ACM> (message from Alan Mackenzie on Thu, 
 5 Dec 2019 20:17:13 +0000)
Subject: Re: bug#38406: 27.0.50; post-self-insert-hook does not hold its
 contract in cc-mode derived modes
References: <20191130143638.GA6716@ACM>
 <CACCVLQWSXY5mMfcvinL0ZqeocoL6BK53OVdj9hKF6+OD7ZiNgg@HIDDEN>
 <20191201150738.GB5085@ACM> <83imn0lyed.fsf@HIDDEN>
 <20191201192709.GE5085@ACM> <83blsrn58a.fsf@HIDDEN>
 <20191204204159.GA7587@ACM> <83immuj0g7.fsf@HIDDEN>
 <20191205190951.GA6252@ACM> <83pnh2h8x1.fsf@HIDDEN>
 <20191205201713.GC6252@ACM>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 38406
Cc: yyoncho@HIDDEN, 38406 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Thu, 5 Dec 2019 20:17:13 +0000
> Cc: yyoncho@HIDDEN, 38406 <at> debbugs.gnu.org
> From: Alan Mackenzie <acm@HIDDEN>
> 
> > We never provide any "safety nets" for silly hook functions, so we
> > shouldn't do that here as well.  OTOH, if someone puts a function on
> > those hooks which does something legitimate, we should meet their
> > expectations and let those functions run, as the contract says.
> 
> I think that, with my latest patch, that is the case.
> 
> > So I think you shouldn't filter anything from the hook before you run
> > it.
> 
> I thought you were urging me to do precisely that two or three posts ago.
> 
> I just tried taking a particular function off of
> c--unsafe-post-self-insert-hook-functions and enabling electric-pair
> mode.  On typing a brace, electric-pair-mode threw an obscure error.  It
> doesn't make sense to call electric-pair-post-self-insert-function twice
> for one keypress.  That is a good reason for having that function
> filtered out of the hook.

There might be a misunderstanding on my part here.  Could you please
explain how come electric-pair-post-self-insert-function is called
twice if it isn't removed from the hook? where's the second (or the
first) call?

> The root of the problem is the hook post-self-insert-hook.  It is a
> thoroughly bad idea.  The implications of introducing it a few years ago
> weren't thought through.

That might be so, but I think it's too late for removing it now.

> Assuming that removing this hook from Emacs isn't an option, we are
> left with ugly ad-hoc workarounds, such as the patch we're currently
> discussing.

Yes.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38406; Package emacs. Full text available.

Message received at 38406 <at> debbugs.gnu.org:


Received: (at 38406) by debbugs.gnu.org; 5 Dec 2019 20:45:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 05 15:45:17 2019
Received: from localhost ([127.0.0.1]:45340 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1icxzx-00065J-90
	for submit <at> debbugs.gnu.org; Thu, 05 Dec 2019 15:45:17 -0500
Received: from mail-wm1-f66.google.com ([209.85.128.66]:39657)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1icxzv-0005zT-Uc
 for 38406 <at> debbugs.gnu.org; Thu, 05 Dec 2019 15:45:16 -0500
Received: by mail-wm1-f66.google.com with SMTP id s14so5144561wmh.4
 for <38406 <at> debbugs.gnu.org>; Thu, 05 Dec 2019 12:45:15 -0800 (PST)
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=udX4OWfgyPohGBMpWeBfrY+GeW3IsXXZq3DEc1scEHY=;
 b=I7JSuIquTUZoQ5ctlZrrjL678RtfgVvqA6sI4J2pEY5YJw7Fpaw96NjzLbO0U8PrxP
 irgauWI9uhlIJ3Y214K6OHxVqOPNla8/kiZa09n5NE1h9tmNatczGGg/Q99ymX7da5hJ
 HNjOUcHrWBeq2F7oD8XznywB+PDWuHaqBlt2q980Dty5cDobNJbsnAnv1mv8CcByfw12
 tU1yeO6qa8dlRuAnPEQOJbv49IDuhTagYscRqNf7yU5QRK8X956UMaBFfd7kvgrgOGgJ
 +8bn0EqNWbOcJ/nEsgVSCGs3APBEgoJh2+izDElBqHR00KbjTxxuSt7hwWCAvezE2Qba
 36JQ==
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=udX4OWfgyPohGBMpWeBfrY+GeW3IsXXZq3DEc1scEHY=;
 b=ItSCgNL3X8s9X3zWY+7DArfQM5SzvPO1kyoEdLqefz45DwOgp2aiS/u3+MAiLSPZ9v
 R9g2VF1sITskuxncBGK2+9tOtSmLJZH0OD/QS2Bgzyu3eDaLUFAvNRt6aEOhsUaoH2nT
 SVywOJlQG+Zd6gslvak0xRbiTd6HQ0UhYyUupyKINqz4deg1t4KvdLDLGa/xtqZy8yKQ
 t3YCvsnDjK58CCIwhVD6qVvtTTU0lVqvw841tP/C2V9RLfxvAGX5mR8XLYCnJxMVeVQK
 UB9eoSnOZXpqJrhi9Hok2c2nnT0NODi5oPGitSUZQlDBJo2oLaouf5NTAXkCLkGywLmJ
 Jeeg==
X-Gm-Message-State: APjAAAUDRz8yXFHA4LVnOtW+a3OYfI7uaXoOfDoOi/1+a1d1eht3zcJh
 VC75QlwtbheBrSRFI4G38GRCRd1H
X-Google-Smtp-Source: APXvYqzAo8bIGqCSR0vBD1byymR3Ybfbwj1cut6FUDxy7iUo4pp6sHMwa1Slqh3/q6MwH39FKt+gAQ==
X-Received: by 2002:a05:600c:2283:: with SMTP id
 3mr7172081wmf.100.1575578709853; 
 Thu, 05 Dec 2019 12:45:09 -0800 (PST)
Received: from [192.168.0.5] ([212.50.117.215])
 by smtp.googlemail.com with ESMTPSA id c72sm1129988wmd.11.2019.12.05.12.45.07
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Thu, 05 Dec 2019 12:45:08 -0800 (PST)
Subject: Re: bug#38406: 27.0.50; post-self-insert-hook does not hold its
 contract in cc-mode derived modes
To: Alan Mackenzie <acm@HIDDEN>
References: <CACCVLQX-r3tb6ocbTwgTL2SYS+BTogZ4dh2KdhK5pbnh_=hT1A@HIDDEN>
 <20191130143638.GA6716@ACM>
 <CACCVLQWSXY5mMfcvinL0ZqeocoL6BK53OVdj9hKF6+OD7ZiNgg@HIDDEN>
 <20191201150738.GB5085@ACM> <83imn0lyed.fsf@HIDDEN>
 <20191201192709.GE5085@ACM> <83blsrn58a.fsf@HIDDEN>
 <20191204204159.GA7587@ACM> <798bda88-41a7-361c-c01b-22ca4d6138e0@HIDDEN>
 <20191205191459.GB6252@ACM>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <1c3dea25-5606-76d5-b35d-2486583b8f38@HIDDEN>
Date: Thu, 5 Dec 2019 22:44:55 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
 Thunderbird/60.9.0
MIME-Version: 1.0
In-Reply-To: <20191205191459.GB6252@ACM>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 38406
Cc: Eli Zaretskii <eliz@HIDDEN>, yyoncho@HIDDEN, 38406 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

On 05.12.2019 21:14, Alan Mackenzie wrote:

> On Wed, Dec 04, 2019 at 23:04:27 +0200, Dmitry Gutov wrote:
>> On 04.12.2019 22:41, Alan Mackenzie wrote:
>>> +(defvar c--unsafe-post-self-insert-hook-functions
>>> +  '(smie-blink-matching-open
>>> +    electric-pair-post-self-insert-function
>>> +    blink-paren-post-self-insert-function
>>> +    electric-indent-post-self-insert-function
>>> +    electric-layout-post-self-insert-function
>>> +    electric-quote-post-self-insert-function)
>>> +    "Known unsafe functions when members of `post-self-insert-hook' in CC Mode")
> 
>> I don't see how filtering out a bunch of popular consumers of
>> post-self-insert-hook can make it "act as per its contract again".
> 
> Think of it more as "filtering in" all functions on
> post-self-insert-hook _except_ the ones mentioned, which are harmful in
> CC Mode.

blink-paren is harmful for CC Mode? Or is it reimplemented, like other 
features (e.g. electric-*), inside CC Mode?

In the latter case, I think CC Mode should just disable the respective 
minor modes/variables locally and call it a day (the hook won't be used 
them, so no need for filtering).

Of course, ideally users of recent enough Emacs would be able to disable 
these built-in features and switch on the generic ones instead.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38406; Package emacs. Full text available.

Message received at 38406 <at> debbugs.gnu.org:


Received: (at 38406) by debbugs.gnu.org; 5 Dec 2019 20:17:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 05 15:17:21 2019
Received: from localhost ([127.0.0.1]:45278 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1icxYu-00039n-Ky
	for submit <at> debbugs.gnu.org; Thu, 05 Dec 2019 15:17:20 -0500
Received: from colin.muc.de ([193.149.48.1]:43840 helo=mail.muc.de)
 by debbugs.gnu.org with smtp (Exim 4.84_2)
 (envelope-from <acm@HIDDEN>) id 1icxYr-00039d-8P
 for 38406 <at> debbugs.gnu.org; Thu, 05 Dec 2019 15:17:19 -0500
Received: (qmail 69103 invoked by uid 3782); 5 Dec 2019 20:17:15 -0000
Received: from acm.muc.de (p4FE15A39.dip0.t-ipconnect.de [79.225.90.57]) by
 colin.muc.de (tmda-ofmipd) with ESMTP;
 Thu, 05 Dec 2019 21:17:13 +0100
Received: (qmail 6719 invoked by uid 1000); 5 Dec 2019 20:17:13 -0000
Date: Thu, 5 Dec 2019 20:17:13 +0000
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#38406: 27.0.50; post-self-insert-hook does not hold its
 contract in cc-mode derived modes
Message-ID: <20191205201713.GC6252@ACM>
References: <20191130143638.GA6716@ACM>
 <CACCVLQWSXY5mMfcvinL0ZqeocoL6BK53OVdj9hKF6+OD7ZiNgg@HIDDEN>
 <20191201150738.GB5085@ACM> <83imn0lyed.fsf@HIDDEN>
 <20191201192709.GE5085@ACM> <83blsrn58a.fsf@HIDDEN>
 <20191204204159.GA7587@ACM> <83immuj0g7.fsf@HIDDEN>
 <20191205190951.GA6252@ACM> <83pnh2h8x1.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <83pnh2h8x1.fsf@HIDDEN>
User-Agent: Mutt/1.10.1 (2018-07-13)
X-Delivery-Agent: TMDA/1.1.12 (Macallan)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 38406
Cc: yyoncho@HIDDEN, 38406 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello, Eli.

On Thu, Dec 05, 2019 at 21:25:14 +0200, Eli Zaretskii wrote:
> > Date: Thu, 5 Dec 2019 19:09:51 +0000
> > Cc: yyoncho@HIDDEN, 38406 <at> debbugs.gnu.org
> > From: Alan Mackenzie <acm@HIDDEN>

> > > Can you explain why you exempt these from being called from CC Mode?

> > There is already a call to the matching-paren blink functionality in
> > cc-cmds.el, which must stay for older Emacsen.  If blink-paren-p-s-i-f
> > was allowed to run too, the result would probably be a doubling of the
> > blink time.  This is not desirable.  The same applies to smie-blink-m-o,
> > which in any case will not be used for CC Mode.

> > electric-pair-post-self-insert-function must not run in
> > c-electric-brace/paren except as carefully coded in these functions
> > explicitly; it would otherwise foul things up, one way or another, as it
> > did in the scenario for which bug #33794 was raised.

> > Of the other three electric-* functions, only one has a complete doc
> > string, so it is work to work out what the other two do.
> > electric-indent-post-self-insert-function is redundant in CC Mode, and
> > probably harmful.  At best it will just take up processor cycles.  I
> > believe electric-layout-p-s-i-f just duplicates the auto-newline
> > behaviour of the c-electric-* functions, making it redundant.  I don't
> > know exactly what electric-quote-p-s-i-f does, but it is likely to be
> > something to do with quotes, and thus likely to clash with CC Mode's
> > handling of quotes.

> I don't think CC Mode should protect users of those hooks from
> themselves.

It doesn't.  Ivan's hook functions will now get called.

> If the user or Lisp set up these hooks such that they end up shooting
> themselves in the foot, we should let them.

It's not a matter of what users might do.  It's about what Emacs
maintainers have already done.  The current changes to CC Mode are to
protect users of CC Mode from these design clashes inside Emacs.

> We never provide any "safety nets" for silly hook functions, so we
> shouldn't do that here as well.  OTOH, if someone puts a function on
> those hooks which does something legitimate, we should meet their
> expectations and let those functions run, as the contract says.

I think that, with my latest patch, that is the case.

> So I think you shouldn't filter anything from the hook before you run
> it.

I thought you were urging me to do precisely that two or three posts ago.

I just tried taking a particular function off of
c--unsafe-post-self-insert-hook-functions and enabling electric-pair
mode.  On typing a brace, electric-pair-mode threw an obscure error.  It
doesn't make sense to call electric-pair-post-self-insert-function twice
for one keypress.  That is a good reason for having that function
filtered out of the hook.  For the other five filtered out functions, I
gave what I think were good reasons in my last post.

The root of the problem is the hook post-self-insert-hook.  It is a
thoroughly bad idea.  The implications of introducing it a few years ago
weren't thought through.  Assuming that removing this hook from Emacs
isn't an option, we are left with ugly ad-hoc workarounds, such as the
patch we're currently discussing.

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38406; Package emacs. Full text available.

Message received at 38406 <at> debbugs.gnu.org:


Received: (at 38406) by debbugs.gnu.org; 5 Dec 2019 19:25:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 05 14:25:38 2019
Received: from localhost ([127.0.0.1]:45230 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1icwks-0001Z3-0y
	for submit <at> debbugs.gnu.org; Thu, 05 Dec 2019 14:25:38 -0500
Received: from eggs.gnu.org ([209.51.188.92]:54921)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1icwkq-0001Ys-LT
 for 38406 <at> debbugs.gnu.org; Thu, 05 Dec 2019 14:25:37 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:45753)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1icwkg-0005dN-GA; Thu, 05 Dec 2019 14:25:27 -0500
Received: from [176.228.60.248] (port=3747 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1icwkb-0006wo-8j; Thu, 05 Dec 2019 14:25:25 -0500
Date: Thu, 05 Dec 2019 21:25:14 +0200
Message-Id: <83pnh2h8x1.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Alan Mackenzie <acm@HIDDEN>
In-reply-to: <20191205190951.GA6252@ACM> (message from Alan Mackenzie on Thu, 
 5 Dec 2019 19:09:51 +0000)
Subject: Re: bug#38406: 27.0.50; post-self-insert-hook does not hold its
 contract in cc-mode derived modes
References: <CACCVLQX-r3tb6ocbTwgTL2SYS+BTogZ4dh2KdhK5pbnh_=hT1A@HIDDEN>
 <20191130143638.GA6716@ACM>
 <CACCVLQWSXY5mMfcvinL0ZqeocoL6BK53OVdj9hKF6+OD7ZiNgg@HIDDEN>
 <20191201150738.GB5085@ACM> <83imn0lyed.fsf@HIDDEN>
 <20191201192709.GE5085@ACM> <83blsrn58a.fsf@HIDDEN>
 <20191204204159.GA7587@ACM> <83immuj0g7.fsf@HIDDEN>
 <20191205190951.GA6252@ACM>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 38406
Cc: yyoncho@HIDDEN, 38406 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Thu, 5 Dec 2019 19:09:51 +0000
> Cc: yyoncho@HIDDEN, 38406 <at> debbugs.gnu.org
> From: Alan Mackenzie <acm@HIDDEN>
> 
> > Can you explain why you exempt these from being called from CC Mode?
> 
> There is already a call to the matching-paren blink functionality in
> cc-cmds.el, which must stay for older Emacsen.  If blink-paren-p-s-i-f
> was allowed to run too, the result would probably be a doubling of the
> blink time.  This is not desirable.  The same applies to smie-blink-m-o,
> which in any case will not be used for CC Mode.
> 
> electric-pair-post-self-insert-function must not run in
> c-electric-brace/paren except as carefully coded in these functions
> explicitly; it would otherwise foul things up, one way or another, as it
> did in the scenario for which bug #33794 was raised.
> 
> Of the other three electric-* functions, only one has a complete doc
> string, so it is work to work out what the other two do.
> electric-indent-post-self-insert-function is redundant in CC Mode, and
> probably harmful.  At best it will just take up processor cycles.  I
> believe electric-layout-p-s-i-f just duplicates the auto-newline
> behaviour of the c-electric-* functions, making it redundant.  I don't
> know exactly what electric-quote-p-s-i-f does, but it is likely to be
> something to do with quotes, and thus likely to clash with CC Mode's
> handling of quotes.

I don't think CC Mode should protect users of those hooks from
themselves.  If the user or Lisp set up these hooks such that they end
up shooting themselves in the foot, we should let them.  We never
provide any "safety nets" for silly hook functions, so we shouldn't do
that here as well.  OTOH, if someone puts a function on those hooks
which does something legitimate, we should meet their expectations and
let those functions run, as the contract says.

So I think you shouldn't filter anything from the hook before you run
it.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38406; Package emacs. Full text available.

Message received at 38406 <at> debbugs.gnu.org:


Received: (at 38406) by debbugs.gnu.org; 5 Dec 2019 19:15:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 05 14:15:04 2019
Received: from localhost ([127.0.0.1]:45218 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1icwae-0001Eq-DC
	for submit <at> debbugs.gnu.org; Thu, 05 Dec 2019 14:15:04 -0500
Received: from colin.muc.de ([193.149.48.1]:54479 helo=mail.muc.de)
 by debbugs.gnu.org with smtp (Exim 4.84_2)
 (envelope-from <acm@HIDDEN>) id 1icwac-0001E9-3W
 for 38406 <at> debbugs.gnu.org; Thu, 05 Dec 2019 14:15:02 -0500
Received: (qmail 37995 invoked by uid 3782); 5 Dec 2019 19:15:00 -0000
Received: from acm.muc.de (p4FE15A39.dip0.t-ipconnect.de [79.225.90.57]) by
 colin.muc.de (tmda-ofmipd) with ESMTP;
 Thu, 05 Dec 2019 20:14:59 +0100
Received: (qmail 6471 invoked by uid 1000); 5 Dec 2019 19:14:59 -0000
Date: Thu, 5 Dec 2019 19:14:59 +0000
To: Dmitry Gutov <dgutov@HIDDEN>
Subject: Re: bug#38406: 27.0.50; post-self-insert-hook does not hold its
 contract in cc-mode derived modes
Message-ID: <20191205191459.GB6252@ACM>
References: <CACCVLQX-r3tb6ocbTwgTL2SYS+BTogZ4dh2KdhK5pbnh_=hT1A@HIDDEN>
 <20191130143638.GA6716@ACM>
 <CACCVLQWSXY5mMfcvinL0ZqeocoL6BK53OVdj9hKF6+OD7ZiNgg@HIDDEN>
 <20191201150738.GB5085@ACM> <83imn0lyed.fsf@HIDDEN>
 <20191201192709.GE5085@ACM> <83blsrn58a.fsf@HIDDEN>
 <20191204204159.GA7587@ACM>
 <798bda88-41a7-361c-c01b-22ca4d6138e0@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <798bda88-41a7-361c-c01b-22ca4d6138e0@HIDDEN>
User-Agent: Mutt/1.10.1 (2018-07-13)
X-Delivery-Agent: TMDA/1.1.12 (Macallan)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 38406
Cc: Eli Zaretskii <eliz@HIDDEN>, yyoncho@HIDDEN, 38406 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello, Dmitry.

On Wed, Dec 04, 2019 at 23:04:27 +0200, Dmitry Gutov wrote:
> On 04.12.2019 22:41, Alan Mackenzie wrote:
> > +(defvar c--unsafe-post-self-insert-hook-functions
> > +  '(smie-blink-matching-open
> > +    electric-pair-post-self-insert-function
> > +    blink-paren-post-self-insert-function
> > +    electric-indent-post-self-insert-function
> > +    electric-layout-post-self-insert-function
> > +    electric-quote-post-self-insert-function)
> > +    "Known unsafe functions when members of `post-self-insert-hook' in CC Mode")

> I don't see how filtering out a bunch of popular consumers of 
> post-self-insert-hook can make it "act as per its contract again".

Think of it more as "filtering in" all functions on
post-self-insert-hook _except_ the ones mentioned, which are harmful in
CC Mode.

> More surprisingly, what did smie-blink-matching-open and 
> blink-paren-post-self-insert-function ever do so wrong? Neither of them 
> modifies the buffer's contents.

No, but if allowed to run, they would probably double the blink time on
the paren match, which would be a Bad Thing.

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38406; Package emacs. Full text available.

Message received at 38406 <at> debbugs.gnu.org:


Received: (at 38406) by debbugs.gnu.org; 5 Dec 2019 19:09:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 05 14:09:58 2019
Received: from localhost ([127.0.0.1]:45213 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1icwVh-00014c-L0
	for submit <at> debbugs.gnu.org; Thu, 05 Dec 2019 14:09:57 -0500
Received: from colin.muc.de ([193.149.48.1]:54428 helo=mail.muc.de)
 by debbugs.gnu.org with smtp (Exim 4.84_2)
 (envelope-from <acm@HIDDEN>) id 1icwVg-00014S-6P
 for 38406 <at> debbugs.gnu.org; Thu, 05 Dec 2019 14:09:57 -0500
Received: (qmail 35418 invoked by uid 3782); 5 Dec 2019 19:09:55 -0000
Received: from acm.muc.de (p4FE15A39.dip0.t-ipconnect.de [79.225.90.57]) by
 colin.muc.de (tmda-ofmipd) with ESMTP;
 Thu, 05 Dec 2019 20:09:51 +0100
Received: (qmail 6453 invoked by uid 1000); 5 Dec 2019 19:09:51 -0000
Date: Thu, 5 Dec 2019 19:09:51 +0000
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#38406: 27.0.50; post-self-insert-hook does not hold its
 contract in cc-mode derived modes
Message-ID: <20191205190951.GA6252@ACM>
References: <CACCVLQX-r3tb6ocbTwgTL2SYS+BTogZ4dh2KdhK5pbnh_=hT1A@HIDDEN>
 <20191130143638.GA6716@ACM>
 <CACCVLQWSXY5mMfcvinL0ZqeocoL6BK53OVdj9hKF6+OD7ZiNgg@HIDDEN>
 <20191201150738.GB5085@ACM> <83imn0lyed.fsf@HIDDEN>
 <20191201192709.GE5085@ACM> <83blsrn58a.fsf@HIDDEN>
 <20191204204159.GA7587@ACM> <83immuj0g7.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <83immuj0g7.fsf@HIDDEN>
User-Agent: Mutt/1.10.1 (2018-07-13)
X-Delivery-Agent: TMDA/1.1.12 (Macallan)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 38406
Cc: yyoncho@HIDDEN, 38406 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello, Eli.

On Thu, Dec 05, 2019 at 16:45:12 +0200, Eli Zaretskii wrote:
> > Date: Wed, 4 Dec 2019 20:41:59 +0000
> > Cc: 38406 <at> debbugs.gnu.org
> > From: Alan Mackenzie <acm@HIDDEN>

> > OK, here's a patch which I think does just what's wanted.  Would you
> > please try it out, Ivan, then let me know that it works, or about any
> > problems which there still may be?  Thanks.

> Thanks.

Actually, I forgot about testing for the existence of
post-self-insert-hook.  So the following will go in, too, with the
obvious definition for ....-1:

(defmacro c--call-post-self-insert-hook-more-safely ()
  ;; Call post-self-insert-hook, if such exists.  See comment for
  ;; `c--call-post-self-insert-hook-more-safely-1'.
  (if (boundp 'post-self-insert-hook)
      '(c--call-post-self-insert-hook-more-safely-1)
    '(progn)))

> > +(defvar c--unsafe-post-self-insert-hook-functions
> > +  '(smie-blink-matching-open
> > +    electric-pair-post-self-insert-function
> > +    blink-paren-post-self-insert-function
> > +    electric-indent-post-self-insert-function
> > +    electric-layout-post-self-insert-function
> > +    electric-quote-post-self-insert-function)
> > +    "Known unsafe functions when members of `post-self-insert-hook' in CC Mode")

> Can you explain why you exempt these from being called from CC Mode?

There is already a call to the matching-paren blink functionality in
cc-cmds.el, which must stay for older Emacsen.  If blink-paren-p-s-i-f
was allowed to run too, the result would probably be a doubling of the
blink time.  This is not desirable.  The same applies to smie-blink-m-o,
which in any case will not be used for CC Mode.

electric-pair-post-self-insert-function must not run in
c-electric-brace/paren except as carefully coded in these functions
explicitly; it would otherwise foul things up, one way or another, as it
did in the scenario for which bug #33794 was raised.

Of the other three electric-* functions, only one has a complete doc
string, so it is work to work out what the other two do.
electric-indent-post-self-insert-function is redundant in CC Mode, and
probably harmful.  At best it will just take up processor cycles.  I
believe electric-layout-p-s-i-f just duplicates the auto-newline
behaviour of the c-electric-* functions, making it redundant.  I don't
know exactly what electric-quote-p-s-i-f does, but it is likely to be
something to do with quotes, and thus likely to clash with CC Mode's
handling of quotes.

> AFAIU, by disabling them when CC Mode reacts to insertion, you have
> solved the conflict between any such hook and CC Mode, so why not call
> any such hook afterwards?

See above.

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38406; Package emacs. Full text available.

Message received at 38406 <at> debbugs.gnu.org:


Received: (at 38406) by debbugs.gnu.org; 5 Dec 2019 14:45:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 05 09:45:31 2019
Received: from localhost ([127.0.0.1]:43402 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1icsNn-0008N8-11
	for submit <at> debbugs.gnu.org; Thu, 05 Dec 2019 09:45:31 -0500
Received: from eggs.gnu.org ([209.51.188.92]:50454)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1icsNl-0008Mw-Fu
 for 38406 <at> debbugs.gnu.org; Thu, 05 Dec 2019 09:45:29 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:40655)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1icsNf-0000fU-Uq; Thu, 05 Dec 2019 09:45:24 -0500
Received: from [176.228.60.248] (port=2414 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1icsNX-0002nt-2c; Thu, 05 Dec 2019 09:45:22 -0500
Date: Thu, 05 Dec 2019 16:45:12 +0200
Message-Id: <83immuj0g7.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Alan Mackenzie <acm@HIDDEN>
In-reply-to: <20191204204159.GA7587@ACM> (message from Alan Mackenzie on Wed, 
 4 Dec 2019 20:41:59 +0000)
Subject: Re: bug#38406: 27.0.50; post-self-insert-hook does not hold its
 contract in cc-mode derived modes
References: <CACCVLQX-r3tb6ocbTwgTL2SYS+BTogZ4dh2KdhK5pbnh_=hT1A@HIDDEN>
 <20191130143638.GA6716@ACM>
 <CACCVLQWSXY5mMfcvinL0ZqeocoL6BK53OVdj9hKF6+OD7ZiNgg@HIDDEN>
 <20191201150738.GB5085@ACM> <83imn0lyed.fsf@HIDDEN>
 <20191201192709.GE5085@ACM> <83blsrn58a.fsf@HIDDEN>
 <20191204204159.GA7587@ACM>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 38406
Cc: yyoncho@HIDDEN, 38406 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Wed, 4 Dec 2019 20:41:59 +0000
> Cc: 38406 <at> debbugs.gnu.org
> From: Alan Mackenzie <acm@HIDDEN>
> 
> OK, here's a patch which I think does just what's wanted.  Would you
> please try it out, Ivan, then let me know that it works, or about any
> problems which there still may be?  Thanks.

Thanks.

> +(defvar c--unsafe-post-self-insert-hook-functions
> +  '(smie-blink-matching-open
> +    electric-pair-post-self-insert-function
> +    blink-paren-post-self-insert-function
> +    electric-indent-post-self-insert-function
> +    electric-layout-post-self-insert-function
> +    electric-quote-post-self-insert-function)
> +    "Known unsafe functions when members of `post-self-insert-hook' in CC Mode")

Can you explain why you exempt these from being called from CC Mode?
AFAIU, by disabling them when CC Mode reacts to insertion, you have
solved the conflict between any such hook and CC Mode, so why not call
any such hook afterwards?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38406; Package emacs. Full text available.

Message received at 38406 <at> debbugs.gnu.org:


Received: (at 38406) by debbugs.gnu.org; 4 Dec 2019 21:05:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 04 16:05:03 2019
Received: from localhost ([127.0.0.1]:42748 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1icbpX-00059g-Mn
	for submit <at> debbugs.gnu.org; Wed, 04 Dec 2019 16:05:03 -0500
Received: from mail-wr1-f41.google.com ([209.85.221.41]:40424)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1icbpV-00058c-BR
 for 38406 <at> debbugs.gnu.org; Wed, 04 Dec 2019 16:05:01 -0500
Received: by mail-wr1-f41.google.com with SMTP id c14so894130wrn.7
 for <38406 <at> debbugs.gnu.org>; Wed, 04 Dec 2019 13:05:01 -0800 (PST)
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=7JlDxUDtNZf7Jus0YxZljp2tdUp3ELd+Zbc4LcflzJk=;
 b=YzhQdk9STIs0c8TQqNUjNqIyNkMeeiK7Fgsr/qwyRSUO0sA6vNZ9USWoUqlIYLWJY+
 aCuy4r+cIGMJJ40VpVBBbBfPZ+Bzwr6xxb3D+h9p4n8Zxkfgd5QBs1Rw03wXdRYhGA3R
 7LmoJv4toK0njvx5ToX7KFU29N6uoCMzUIeLhbgdZO6wkZd5o7yKzvRv4rh7TI5EPr4N
 4wq3Rnx149i9m8SA8bIkKYqUsVvOHVCOmFb0nQcSAdHAZoolr2cS5CGOooYxSDqfxPwA
 8/v3pJiSHFqYE9zldQ2M9OMhA3win9VbTZShB7GaIvJlajvYtcbEclS6mNwC8eyjT9S0
 KRAA==
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=7JlDxUDtNZf7Jus0YxZljp2tdUp3ELd+Zbc4LcflzJk=;
 b=D0t4r3290ruZhnXBvAJVM5T/ID5EwV/bs42UEPMJbtRHsBgin5mijLbbDFN6WWf4wp
 /xT4XFppRmpVugGty4V9dWZOiDsHX9uYrFQsq2bLB7EttfT3efih8s41E9v9+8DEUbz3
 s5ITNNwfg+JqiQeLjVYhBkDHWVDhMgGNqpc2M2Tr46XZ6TTNHPfB3IMi7e74I65+Biz8
 +TUJSM1CAkA5qjedBP/b35S+O92qpWNqWmv6V0OFvTWZn0Pzsv2gcnVSaG+8Ka4LQb8z
 i01twsTlfhDLHG58ufVr1Cx48mhmjGs0X91ymQXAoxT1/K5lSmt1n30jMEF+PpsXohCo
 2ZpA==
X-Gm-Message-State: APjAAAVLG6YsfDwD2/mTsQlA9fNQHyCsDFGkrmdhW2y1d1A+qtQ92EEh
 DtOIq6JBUQ9wZi90/BRSTj8J8MbN
X-Google-Smtp-Source: APXvYqwgFf6Q/N61gCr7AVta3YljJtj8J4aw9OP5rFDLQL5n3ez1q8WIqbm+3MICTZr7Vcp3nisYkw==
X-Received: by 2002:a5d:55d1:: with SMTP id i17mr6123330wrw.165.1575493470490; 
 Wed, 04 Dec 2019 13:04:30 -0800 (PST)
Received: from [192.168.0.5] ([212.50.117.215])
 by smtp.googlemail.com with ESMTPSA id z13sm8324550wmi.18.2019.12.04.13.04.28
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 04 Dec 2019 13:04:29 -0800 (PST)
Subject: Re: bug#38406: 27.0.50; post-self-insert-hook does not hold its
 contract in cc-mode derived modes
To: Alan Mackenzie <acm@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 yyoncho@HIDDEN
References: <CACCVLQX-r3tb6ocbTwgTL2SYS+BTogZ4dh2KdhK5pbnh_=hT1A@HIDDEN>
 <20191130143638.GA6716@ACM>
 <CACCVLQWSXY5mMfcvinL0ZqeocoL6BK53OVdj9hKF6+OD7ZiNgg@HIDDEN>
 <20191201150738.GB5085@ACM> <83imn0lyed.fsf@HIDDEN>
 <20191201192709.GE5085@ACM> <83blsrn58a.fsf@HIDDEN>
 <20191204204159.GA7587@ACM>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <798bda88-41a7-361c-c01b-22ca4d6138e0@HIDDEN>
Date: Wed, 4 Dec 2019 23:04:27 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
 Thunderbird/60.9.0
MIME-Version: 1.0
In-Reply-To: <20191204204159.GA7587@ACM>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 38406
Cc: 38406 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

On 04.12.2019 22:41, Alan Mackenzie wrote:
> +(defvar c--unsafe-post-self-insert-hook-functions
> +  '(smie-blink-matching-open
> +    electric-pair-post-self-insert-function
> +    blink-paren-post-self-insert-function
> +    electric-indent-post-self-insert-function
> +    electric-layout-post-self-insert-function
> +    electric-quote-post-self-insert-function)
> +    "Known unsafe functions when members of `post-self-insert-hook' in CC Mode")

I don't see how filtering out a bunch of popular consumers of 
post-self-insert-hook can make it "act as per its contract again".

More surprisingly, what did smie-blink-matching-open and 
blink-paren-post-self-insert-function ever do so wrong? Neither of them 
modifies the buffer's contents.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38406; Package emacs. Full text available.

Message received at 38406 <at> debbugs.gnu.org:


Received: (at 38406) by debbugs.gnu.org; 4 Dec 2019 20:42:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 04 15:42:11 2019
Received: from localhost ([127.0.0.1]:42721 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1icbTP-0004DH-C3
	for submit <at> debbugs.gnu.org; Wed, 04 Dec 2019 15:42:11 -0500
Received: from colin.muc.de ([193.149.48.1]:32400 helo=mail.muc.de)
 by debbugs.gnu.org with smtp (Exim 4.84_2)
 (envelope-from <acm@HIDDEN>) id 1icbTI-0004D9-F9
 for 38406 <at> debbugs.gnu.org; Wed, 04 Dec 2019 15:42:05 -0500
Received: (qmail 1870 invoked by uid 3782); 4 Dec 2019 20:42:03 -0000
Received: from acm.muc.de (p4FE15AD3.dip0.t-ipconnect.de [79.225.90.211]) by
 colin.muc.de (tmda-ofmipd) with ESMTP;
 Wed, 04 Dec 2019 21:41:59 +0100
Received: (qmail 8080 invoked by uid 1000); 4 Dec 2019 20:41:59 -0000
Date: Wed, 4 Dec 2019 20:41:59 +0000
To: Eli Zaretskii <eliz@HIDDEN>, yyoncho@HIDDEN
Subject: Re: bug#38406: 27.0.50; post-self-insert-hook does not hold its
 contract in cc-mode derived modes
Message-ID: <20191204204159.GA7587@ACM>
References: <CACCVLQX-r3tb6ocbTwgTL2SYS+BTogZ4dh2KdhK5pbnh_=hT1A@HIDDEN>
 <20191130143638.GA6716@ACM>
 <CACCVLQWSXY5mMfcvinL0ZqeocoL6BK53OVdj9hKF6+OD7ZiNgg@HIDDEN>
 <20191201150738.GB5085@ACM> <83imn0lyed.fsf@HIDDEN>
 <20191201192709.GE5085@ACM> <83blsrn58a.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <83blsrn58a.fsf@HIDDEN>
User-Agent: Mutt/1.10.1 (2018-07-13)
X-Delivery-Agent: TMDA/1.1.12 (Macallan)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 38406
Cc: 38406 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello, Eli and Ivan.

On Sun, Dec 01, 2019 at 22:47:01 +0200, Eli Zaretskii wrote:
> > Date: Sun, 1 Dec 2019 19:27:09 +0000
> > Cc: yyoncho@HIDDEN, 38406 <at> debbugs.gnu.org
> > From: Alan Mackenzie <acm@HIDDEN>

[ .... ]

> But breaking a hook's contract as a means to teach people not to shoot
> themselves in the foot is not right.  If the uses are legitimate, they
> should be able to do them; if they aren't, let them cope with the
> consequences.

> > So to call this hook at the end of c-electric-brace would mean
> > having to filter the hook first (at the very least, to remove
> > electric-pair-post-self-insert-function), which just seems very
> > hackish and unsatisfactory.

> It doesn't seem too hackish to me, and as a nice bonus we will have
> post-self-insert-hook act as per its contract again.

> So could you please do that?  TIA.

OK, here's a patch which I think does just what's wanted.  Would you
please try it out, Ivan, then let me know that it works, or about any
problems which there still may be?  Thanks.

It's merely necessary to apply the patch below, byte compile cc-cmds.el,
and load it.  (In the highly unlikely event you want any help with the
patch or the compilation, feel free to send me private email.)  The
patch should apply cleanly to the Emacs master branch.



diff -r d20020192bd6 cc-cmds.el
--- a/cc-cmds.el	Sat Nov 30 21:10:11 2019 +0000
+++ b/cc-cmds.el	Wed Dec 04 20:15:11 2019 +0000
@@ -493,6 +493,34 @@
       (c-hungry-delete-forward)
     (c-hungry-delete-backwards)))
 
+(defvar c--unsafe-post-self-insert-hook-functions
+  '(smie-blink-matching-open
+    electric-pair-post-self-insert-function
+    blink-paren-post-self-insert-function
+    electric-indent-post-self-insert-function
+    electric-layout-post-self-insert-function
+    electric-quote-post-self-insert-function)
+    "Known unsafe functions when members of `post-self-insert-hook' in CC Mode")
+
+(defun c--call-post-self-insert-hook-more-safely ()
+  ;; Call post-self-insert-hook, having removed from `post-self-insert-hook'
+  ;; function known not to be safe to CC Mode.  The result is of no
+  ;; significance.  Note that the hook call is NOT absolutely safe.
+  (let ((src post-self-insert-hook)
+	dest)
+    (while src
+      (cond
+       ((memq (car src) c--unsafe-post-self-insert-hook-functions))
+       ((eq (car src) t)
+	(let ((src (default-value 'post-self-insert-hook)))
+	  (while src
+	    (unless (memq (car src) c--unsafe-post-self-insert-hook-functions)
+	      (add-hook dest (car src) t)) ; Preserve the order of the functions.
+	    (setq src (cdr src)))))
+       (t (add-hook dest (car src) t)))	; Preserve the order of the functions.
+      (setq src (cdr src)))
+    (run-hooks dest)))
+
 (defun c-electric-pound (arg)
   "Insert a \"#\".
 If `c-electric-flag' is set, handle it specially according to the variable
@@ -522,7 +550,8 @@
       (insert (c-last-command-char))
       (and (not bolp)
 	   (goto-char (- (point-max) pos)))
-      )))
+      ))
+  (c--call-post-self-insert-hook-more-safely))
 
 (defun c-point-syntax ()
   ;; Return the syntactic context of the construct at point.  (This is NOT
@@ -903,7 +932,8 @@
 	 (save-excursion
 	   (c-save-buffer-state nil
 	     (c-backward-syntactic-ws safepos))
-	   (funcall old-blink-paren)))))
+	   (funcall old-blink-paren)))
+    (c--call-post-self-insert-hook-more-safely)))
 
 (defun c-electric-slash (arg)
   "Insert a slash character.
@@ -955,7 +985,8 @@
     (let (post-self-insert-hook)	; Disable random functionality.
       (self-insert-command (prefix-numeric-value arg)))
     (if indentp
-	(indent-according-to-mode))))
+	(indent-according-to-mode))
+    (c--call-post-self-insert-hook-more-safely)))
 
 (defun c-electric-star (arg)
   "Insert a star character.
@@ -985,7 +1016,8 @@
 	       (bolp))))
       (let (c-echo-syntactic-information-p) ; shut this up
 	(indent-according-to-mode))
-    ))
+    )
+  (c--call-post-self-insert-hook-more-safely))
 
 (defun c-electric-semi&comma (arg)
   "Insert a comma or semicolon.
@@ -1057,8 +1089,8 @@
 		(setq add-newline-p (not (eq answer 'stop)))
 		))
 	    (if add-newline-p
-		(c-newline-and-indent))
-	    )))))
+		(c-newline-and-indent)))))
+    (c--call-post-self-insert-hook-more-safely)))
 
 (defun c-electric-colon (arg)
   "Insert a colon.
@@ -1160,8 +1192,8 @@
 	  ;; does a newline go after the colon?
 	  (if (and (memq 'after (cdr-safe newlines))
 		   (not is-scope-op))
-	      (c-newline-and-indent))
-	  ))))
+	      (c-newline-and-indent))))
+    (c--call-post-self-insert-hook-more-safely)))
 
 (defun c-electric-lt-gt (arg)
   "Insert a \"<\" or \">\" character.
@@ -1251,7 +1283,8 @@
 	;; From now (2016-01-01), the syntax-table text properties on < and >
 	;; are applied in an after-change function, not during redisplay.  Hence
 	;; we no longer need to call (sit-for 0) for blink paren to work.
-	(funcall blink-paren-function)))))
+	(funcall blink-paren-function))))
+  (c--call-post-self-insert-hook-more-safely))
 
 (defun c-electric-paren (arg)
   "Insert a parenthesis.
@@ -1370,7 +1403,8 @@
       ;; Apply `electric-pair-mode' stuff inside a string or comment.
       (when (and (boundp 'electric-pair-mode) electric-pair-mode)
 	(let (post-self-insert-hook)
-	  (electric-pair-post-self-insert-function))))))
+	  (electric-pair-post-self-insert-function))))
+    (c--call-post-self-insert-hook-more-safely)))
 
 (defun c-electric-continued-statement ()
   "Reindent the current line if appropriate.


-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38406; Package emacs. Full text available.

Message received at 38406 <at> debbugs.gnu.org:


Received: (at 38406) by debbugs.gnu.org; 2 Dec 2019 20:17:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 02 15:17:23 2019
Received: from localhost ([127.0.0.1]:38991 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ibs8I-0007KP-VW
	for submit <at> debbugs.gnu.org; Mon, 02 Dec 2019 15:17:23 -0500
Received: from eggs.gnu.org ([209.51.188.92]:35405)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1ibs8G-0007KB-8B
 for 38406 <at> debbugs.gnu.org; Mon, 02 Dec 2019 15:17:21 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:44353)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1ibs8A-0008O1-2U; Mon, 02 Dec 2019 15:17:14 -0500
Received: from [176.228.60.248] (port=2998 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1ibs89-0002tf-Hu; Mon, 02 Dec 2019 15:17:13 -0500
Date: Mon, 02 Dec 2019 22:17:01 +0200
Message-Id: <837e3elbya.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Alan Mackenzie <acm@HIDDEN>
In-reply-to: <20191202183156.GA4175@ACM> (message from Alan Mackenzie on Mon, 
 2 Dec 2019 18:31:56 +0000)
Subject: Re: bug#38406: 27.0.50; post-self-insert-hook does not hold its
 contract in cc-mode derived modes
References: <CACCVLQX-r3tb6ocbTwgTL2SYS+BTogZ4dh2KdhK5pbnh_=hT1A@HIDDEN>
 <20191130143638.GA6716@ACM>
 <CACCVLQWSXY5mMfcvinL0ZqeocoL6BK53OVdj9hKF6+OD7ZiNgg@HIDDEN>
 <20191201150738.GB5085@ACM> <83imn0lyed.fsf@HIDDEN>
 <20191201192709.GE5085@ACM> <83blsrn58a.fsf@HIDDEN>
 <20191202183156.GA4175@ACM>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 38406
Cc: yyoncho@HIDDEN, 38406 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Mon, 2 Dec 2019 18:31:56 +0000
> Cc: yyoncho@HIDDEN, 38406 <at> debbugs.gnu.org
> From: Alan Mackenzie <acm@HIDDEN>
> 
> > You'd be surprised to know what some of those hooks do.  Everything
> > you say they don't, and then some.
> 
> Any chance you could name one (or even two), thus letting me see for
> myself?

I'd have to dig for them.  I'll try.

> > It doesn't seem too hackish to me, and as a nice bonus we will have
> > post-self-insert-hook act as per its contract again.
> 
> > So could you please do that?  TIA.
> 
> OK, I'll do that.  It's not a nice thing to do, but we're kind of
> lacking nice things in this situation.  Give me a few days, please - I'm
> a touch busy in RL at the moment.

Thanks, there's no special rush.

> Additionally, how about reversing the encouragement in the Elisp manual
> to put buffer changing functions onto post-self-insert-hook?

If you could suggest the text to explain why this should be
discouraged, I promise to consider it.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38406; Package emacs. Full text available.

Message received at 38406 <at> debbugs.gnu.org:


Received: (at 38406) by debbugs.gnu.org; 2 Dec 2019 18:37:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 02 13:37:37 2019
Received: from localhost ([127.0.0.1]:38940 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ibqZl-0004fe-3m
	for submit <at> debbugs.gnu.org; Mon, 02 Dec 2019 13:37:37 -0500
Received: from colin.muc.de ([193.149.48.1]:18993 helo=mail.muc.de)
 by debbugs.gnu.org with smtp (Exim 4.84_2)
 (envelope-from <acm@HIDDEN>) id 1ibqZj-0004fW-P3
 for 38406 <at> debbugs.gnu.org; Mon, 02 Dec 2019 13:37:36 -0500
Received: (qmail 81770 invoked by uid 3782); 2 Dec 2019 18:37:34 -0000
Received: from acm.muc.de (p4FE15992.dip0.t-ipconnect.de [79.225.89.146]) by
 colin.muc.de (tmda-ofmipd) with ESMTP;
 Mon, 02 Dec 2019 19:37:31 +0100
Received: (qmail 4188 invoked by uid 1000); 2 Dec 2019 18:37:31 -0000
Date: Mon, 2 Dec 2019 18:37:31 +0000
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#38406: 27.0.50; post-self-insert-hook does not hold its
 contract in cc-mode derived modes
Message-ID: <20191202183731.GB4175@ACM>
References: <CACCVLQX-r3tb6ocbTwgTL2SYS+BTogZ4dh2KdhK5pbnh_=hT1A@HIDDEN>
 <20191130143638.GA6716@ACM>
 <CACCVLQWSXY5mMfcvinL0ZqeocoL6BK53OVdj9hKF6+OD7ZiNgg@HIDDEN>
 <20191201150738.GB5085@ACM>
 <CACCVLQXsArOmw0Xw-pbH_7zetSLdz7XNXYEHOqXPKRCU6+OnyQ@HIDDEN>
 <20191201155842.GC5085@ACM> <83h82jncsl.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <83h82jncsl.fsf@HIDDEN>
User-Agent: Mutt/1.10.1 (2018-07-13)
X-Delivery-Agent: TMDA/1.1.12 (Macallan)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 38406
Cc: yyoncho@HIDDEN, 38406 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello, Eli.

On Sun, Dec 01, 2019 at 20:03:38 +0200, Eli Zaretskii wrote:
> > Date: Sun, 1 Dec 2019 15:58:42 +0000
> > From: Alan Mackenzie <acm@HIDDEN>
> > Cc: 38406 <at> debbugs.gnu.org

> > Why not use post-command-hook here instead?

> I don't know what's Ivan's reason, but I know mine: post-command-hook
> runs much more frequently (since self-insert-command's are a small
> subset of commands in general), and therefore its use is much more
> likely to make Emacs less responsive.  E.g., cursor motion commands
> will not call post-self-insert-hook.

What we could do with here is a post-change-command-functions, something
a bit like after-change-functions in what triggers it, and a bit like
post-command-hook in when it gets triggered.

Of course, one could say that we have too many hooks already .....

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38406; Package emacs. Full text available.

Message received at 38406 <at> debbugs.gnu.org:


Received: (at 38406) by debbugs.gnu.org; 2 Dec 2019 18:32:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 02 13:32:03 2019
Received: from localhost ([127.0.0.1]:38930 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ibqUM-0004XY-Ob
	for submit <at> debbugs.gnu.org; Mon, 02 Dec 2019 13:32:02 -0500
Received: from colin.muc.de ([193.149.48.1]:18852 helo=mail.muc.de)
 by debbugs.gnu.org with smtp (Exim 4.84_2)
 (envelope-from <acm@HIDDEN>) id 1ibqUL-0004X9-6q
 for 38406 <at> debbugs.gnu.org; Mon, 02 Dec 2019 13:32:02 -0500
Received: (qmail 79959 invoked by uid 3782); 2 Dec 2019 18:31:59 -0000
Received: from acm.muc.de (p4FE15992.dip0.t-ipconnect.de [79.225.89.146]) by
 colin.muc.de (tmda-ofmipd) with ESMTP;
 Mon, 02 Dec 2019 19:31:56 +0100
Received: (qmail 4180 invoked by uid 1000); 2 Dec 2019 18:31:56 -0000
Date: Mon, 2 Dec 2019 18:31:56 +0000
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#38406: 27.0.50; post-self-insert-hook does not hold its
 contract in cc-mode derived modes
Message-ID: <20191202183156.GA4175@ACM>
References: <CACCVLQX-r3tb6ocbTwgTL2SYS+BTogZ4dh2KdhK5pbnh_=hT1A@HIDDEN>
 <20191130143638.GA6716@ACM>
 <CACCVLQWSXY5mMfcvinL0ZqeocoL6BK53OVdj9hKF6+OD7ZiNgg@HIDDEN>
 <20191201150738.GB5085@ACM> <83imn0lyed.fsf@HIDDEN>
 <20191201192709.GE5085@ACM> <83blsrn58a.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <83blsrn58a.fsf@HIDDEN>
User-Agent: Mutt/1.10.1 (2018-07-13)
X-Delivery-Agent: TMDA/1.1.12 (Macallan)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 38406
Cc: yyoncho@HIDDEN, 38406 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello, Eli.

On Sun, Dec 01, 2019 at 22:47:01 +0200, Eli Zaretskii wrote:
> > Date: Sun, 1 Dec 2019 19:27:09 +0000
> > Cc: yyoncho@HIDDEN, 38406 <at> debbugs.gnu.org
> > From: Alan Mackenzie <acm@HIDDEN>

> > post-self-insert-hook's functions, unusually amongs hooks, interfere
> > with its triggering event.  This contrasts with, say,
> > after-change-functions, where the functions don't insert into or
> > delete from the buffer, or pre-redisplay-functions, where the
> > functions don't try to prevent a particular window getting
> > displayed.

> You'd be surprised to know what some of those hooks do.  Everything
> you say they don't, and then some.

Any chance you could name one (or even two), thus letting me see for
myself?

> There's nothing we can do to prevent people from shooting themselves
> in the foot or hanging themselves with the rope we provided.

In the case of post-self-insert-hook, the damaging functions are part of
Emacs itself, not crazy user-written code.

> And if you think you are the only one who needs to harden your code to
> let people do the craziest things with these hooks, please don't think
> so: you are definitely not alone.

OK.

> But breaking a hook's contract as a means to teach people not to shoot
> themselves in the foot is not right.  If the uses are legitimate, they
> should be able to do them; if they aren't, let them cope with the
> consequences.

> > So to call this hook at the end of c-electric-brace would mean having to
> > filter the hook first (at the very least, to remove
> > electric-pair-post-self-insert-function), which just seems very hackish
> > and unsatisfactory.

> It doesn't seem too hackish to me, and as a nice bonus we will have
> post-self-insert-hook act as per its contract again.

> So could you please do that?  TIA.

OK, I'll do that.  It's not a nice thing to do, but we're kind of
lacking nice things in this situation.  Give me a few days, please - I'm
a touch busy in RL at the moment.

Additionally, how about reversing the encouragement in the Elisp manual
to put buffer changing functions onto post-self-insert-hook?

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38406; Package emacs. Full text available.

Message received at 38406 <at> debbugs.gnu.org:


Received: (at 38406) by debbugs.gnu.org; 1 Dec 2019 20:47:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 01 15:47:27 2019
Received: from localhost ([127.0.0.1]:36776 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ibW7q-0007Fs-Uy
	for submit <at> debbugs.gnu.org; Sun, 01 Dec 2019 15:47:27 -0500
Received: from eggs.gnu.org ([209.51.188.92]:37623)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1ibW7o-0007Fd-FX
 for 38406 <at> debbugs.gnu.org; Sun, 01 Dec 2019 15:47:25 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:53133)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1ibW7i-0003Zy-TU; Sun, 01 Dec 2019 15:47:18 -0500
Received: from [176.228.60.248] (port=4846 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1ibW7f-00049x-QJ; Sun, 01 Dec 2019 15:47:18 -0500
Date: Sun, 01 Dec 2019 22:47:01 +0200
Message-Id: <83blsrn58a.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Alan Mackenzie <acm@HIDDEN>
In-reply-to: <20191201192709.GE5085@ACM> (message from Alan Mackenzie on Sun, 
 1 Dec 2019 19:27:09 +0000)
Subject: Re: bug#38406: 27.0.50; post-self-insert-hook does not hold its
 contract in cc-mode derived modes
References: <CACCVLQX-r3tb6ocbTwgTL2SYS+BTogZ4dh2KdhK5pbnh_=hT1A@HIDDEN>
 <20191130143638.GA6716@ACM>
 <CACCVLQWSXY5mMfcvinL0ZqeocoL6BK53OVdj9hKF6+OD7ZiNgg@HIDDEN>
 <20191201150738.GB5085@ACM> <83imn0lyed.fsf@HIDDEN>
 <20191201192709.GE5085@ACM>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 38406
Cc: yyoncho@HIDDEN, 38406 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Sun, 1 Dec 2019 19:27:09 +0000
> Cc: yyoncho@HIDDEN, 38406 <at> debbugs.gnu.org
> From: Alan Mackenzie <acm@HIDDEN>
> 
> post-self-insert-hook's functions, unusually amongs hooks, interfere with
> its triggering event.  This contrasts with, say, after-change-functions,
> where the functions don't insert into or delete from the buffer, or
> pre-redisplay-functions, where the functions don't try to prevent a
> particular window getting displayed.

You'd be surprised to know what some of those hooks do.  Everything
you say they don't, and then some.  There's nothing we can do to
prevent people from shooting themselves in the foot or hanging
themselves with the rope we provided.  And if you think you are the
only one who needs to harden your code to let people do the craziest
things with these hooks, please don't think so: you are definitely
not alone.

But breaking a hook's contract as a means to teach people not to shoot
themselves in the foot is not right.  If the uses are legitimate, they
should be able to do them; if they aren't, let them cope with the
consequences.

> So to call this hook at the end of c-electric-brace would mean having to
> filter the hook first (at the very least, to remove
> electric-pair-post-self-insert-function), which just seems very hackish
> and unsatisfactory.

It doesn't seem too hackish to me, and as a nice bonus we will have
post-self-insert-hook act as per its contract again.

So could you please do that?  TIA.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38406; Package emacs. Full text available.

Message received at 38406 <at> debbugs.gnu.org:


Received: (at 38406) by debbugs.gnu.org; 1 Dec 2019 19:27:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 01 14:27:15 2019
Received: from localhost ([127.0.0.1]:36721 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ibUsE-00057c-Ts
	for submit <at> debbugs.gnu.org; Sun, 01 Dec 2019 14:27:15 -0500
Received: from colin.muc.de ([193.149.48.1]:20940 helo=mail.muc.de)
 by debbugs.gnu.org with smtp (Exim 4.84_2)
 (envelope-from <acm@HIDDEN>) id 1ibUsC-00057S-0C
 for 38406 <at> debbugs.gnu.org; Sun, 01 Dec 2019 14:27:13 -0500
Received: (qmail 74664 invoked by uid 3782); 1 Dec 2019 19:27:10 -0000
Received: from acm.muc.de (p2E5D5336.dip0.t-ipconnect.de [46.93.83.54]) by
 colin.muc.de (tmda-ofmipd) with ESMTP;
 Sun, 01 Dec 2019 20:27:08 +0100
Received: (qmail 8906 invoked by uid 1000); 1 Dec 2019 19:27:09 -0000
Date: Sun, 1 Dec 2019 19:27:09 +0000
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#38406: 27.0.50; post-self-insert-hook does not hold its
 contract in cc-mode derived modes
Message-ID: <20191201192709.GE5085@ACM>
References: <CACCVLQX-r3tb6ocbTwgTL2SYS+BTogZ4dh2KdhK5pbnh_=hT1A@HIDDEN>
 <20191130143638.GA6716@ACM>
 <CACCVLQWSXY5mMfcvinL0ZqeocoL6BK53OVdj9hKF6+OD7ZiNgg@HIDDEN>
 <20191201150738.GB5085@ACM> <83imn0lyed.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <83imn0lyed.fsf@HIDDEN>
User-Agent: Mutt/1.10.1 (2018-07-13)
X-Delivery-Agent: TMDA/1.1.12 (Macallan)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 38406
Cc: yyoncho@HIDDEN, 38406 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello, Eli.

On Sun, Dec 01, 2019 at 19:59:54 +0200, Eli Zaretskii wrote:
> > Date: Sun, 1 Dec 2019 15:07:38 +0000
> > From: Alan Mackenzie <acm@HIDDEN>
> > Cc: 38406 <at> debbugs.gnu.org

> > > > There are other possible "fixes", for example modifying these
> > > > functions so that they don't use self-insert-command at all, but
> > > > somehow I don't think that's what you want.

> > > I don't think that the code that is implemented against the
> > > contract listed in the hook documentation should be rewritten. If
> > > electric stuff is so that important and there is no way to disable
> > > it by default then at least a function to unbind the electric
> > > functionality the documentation of post-self-insert-hook should
> > > state: "Don't rely on this hook in cc derived modes because of
> > > {implementation details}. If you still want to use
> > > post-self-insert-hook disable use {implementation details} to turn
> > > electric off."

> > The problem you have stumbled over is more of a political problem
> > than a technical one.

> Can we please make it technical again?  Why can't the CC Mode function
> which temporarily disables post-self-insert-hook call the hook
> functions after it does its thing?  (I think I already asked this in
> the past, but I cannot find that question or any discussion of it.)

See bug #33794 (but a lot of the discussion is unedifying).

post-self-insert-hook's functions, unusually amongs hooks, interfere with
its triggering event.  This contrasts with, say, after-change-functions,
where the functions don't insert into or delete from the buffer, or
pre-redisplay-functions, where the functions don't try to prevent a
particular window getting displayed.  But post-s-i-h customarily makes
its own buffer changes such that self-insert-command no longer performs
its prime function, which is to insert exactly one copy (or N copies) of
the typed key into the buffer.  This makes it problematic for Lisp code
which calls self-insert-command.

It would be nice if functions on post-self-insert-hook could be split
into "disruptive" ones and "safe" ones, so that a function such as
c-electric-brace could elect to run just the "safe" ones.  I think Ivan's
functions would likely be classed as "safe".  How about this idea for
Emacs 28?

Anyhow back to your question: c-electric-brace carefully calls
electric-pair-post-self-insert-function testing various states afterwards
(such as the buffer reducing in size) so as to be able to complete
c-electric-brace's own processing.  Just calling post-self-insert-hook
instead could easily upset this balance.  Unfortunately this hook can
contain arbitrary code, and frequently does.

So to call this hook at the end of c-electric-brace would mean having to
filter the hook first (at the very least, to remove
electric-pair-post-self-insert-function), which just seems very hackish
and unsatisfactory.

As a statistic, there are approximately 111 occurrences of
(self-insert-command ...) in the Emacs Lisp sources.  Any of them might
be vulnerable to disruption by post-self-insert-hook.

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38406; Package emacs. Full text available.

Message received at 38406 <at> debbugs.gnu.org:


Received: (at 38406) by debbugs.gnu.org; 1 Dec 2019 18:04:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 01 13:04:01 2019
Received: from localhost ([127.0.0.1]:36673 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ibTZg-0000y7-MI
	for submit <at> debbugs.gnu.org; Sun, 01 Dec 2019 13:04:00 -0500
Received: from eggs.gnu.org ([209.51.188.92]:43995)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1ibTZe-0000xv-Ar
 for 38406 <at> debbugs.gnu.org; Sun, 01 Dec 2019 13:03:59 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:51658)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1ibTZY-0000BT-CV; Sun, 01 Dec 2019 13:03:52 -0500
Received: from [176.228.60.248] (port=2410 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1ibTZX-0005B1-MH; Sun, 01 Dec 2019 13:03:52 -0500
Date: Sun, 01 Dec 2019 20:03:38 +0200
Message-Id: <83h82jncsl.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Alan Mackenzie <acm@HIDDEN>
In-reply-to: <20191201155842.GC5085@ACM> (message from Alan Mackenzie on Sun, 
 1 Dec 2019 15:58:42 +0000)
Subject: Re: bug#38406: 27.0.50;
 post-self-insert-hook does not hold its contract in cc-mode derived
 modes
References: <CACCVLQX-r3tb6ocbTwgTL2SYS+BTogZ4dh2KdhK5pbnh_=hT1A@HIDDEN>
 <20191130143638.GA6716@ACM>
 <CACCVLQWSXY5mMfcvinL0ZqeocoL6BK53OVdj9hKF6+OD7ZiNgg@HIDDEN>
 <20191201150738.GB5085@ACM>
 <CACCVLQXsArOmw0Xw-pbH_7zetSLdz7XNXYEHOqXPKRCU6+OnyQ@HIDDEN>
 <20191201155842.GC5085@ACM>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 38406
Cc: yyoncho@HIDDEN, 38406 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Sun, 1 Dec 2019 15:58:42 +0000
> From: Alan Mackenzie <acm@HIDDEN>
> Cc: 38406 <at> debbugs.gnu.org
> 
> Why not use post-command-hook here instead?

I don't know what's Ivan's reason, but I know mine: post-command-hook
runs much more frequently (since self-insert-command's are a small
subset of commands in general), and therefore its use is much more
likely to make Emacs less responsive.  E.g., cursor motion commands
will not call post-self-insert-hook.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38406; Package emacs. Full text available.

Message received at 38406 <at> debbugs.gnu.org:


Received: (at 38406) by debbugs.gnu.org; 1 Dec 2019 18:00:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 01 13:00:21 2019
Received: from localhost ([127.0.0.1]:36669 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ibTW9-0000t7-50
	for submit <at> debbugs.gnu.org; Sun, 01 Dec 2019 13:00:21 -0500
Received: from eggs.gnu.org ([209.51.188.92]:43217)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1ibTW6-0000sp-W0
 for 38406 <at> debbugs.gnu.org; Sun, 01 Dec 2019 13:00:19 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:51581)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1ibTW0-0005IZ-9E; Sun, 01 Dec 2019 13:00:13 -0500
Received: from [176.228.60.248] (port=2184 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1ibTVx-0008JR-5F; Sun, 01 Dec 2019 13:00:11 -0500
Date: Sun, 01 Dec 2019 19:59:54 +0200
Message-Id: <83imn0lyed.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Alan Mackenzie <acm@HIDDEN>
In-reply-to: <20191201150738.GB5085@ACM> (message from Alan Mackenzie on Sun, 
 1 Dec 2019 15:07:38 +0000)
Subject: Re: bug#38406: 27.0.50;
 post-self-insert-hook does not hold its contract in cc-mode derived
 modes
References: <CACCVLQX-r3tb6ocbTwgTL2SYS+BTogZ4dh2KdhK5pbnh_=hT1A@HIDDEN>
 <20191130143638.GA6716@ACM>
 <CACCVLQWSXY5mMfcvinL0ZqeocoL6BK53OVdj9hKF6+OD7ZiNgg@HIDDEN>
 <20191201150738.GB5085@ACM>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 38406
Cc: yyoncho@HIDDEN, 38406 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Sun, 1 Dec 2019 15:07:38 +0000
> From: Alan Mackenzie <acm@HIDDEN>
> Cc: 38406 <at> debbugs.gnu.org
> 
> > > There are other possible "fixes", for example modifying these functions
> > > so that they don't use self-insert-command at all, but somehow I don't
> > > think that's what you want.
> 
> > I don't think that the code that is implemented against the contract listed
> > in the hook documentation should be rewritten. If electric stuff is so
> > that important and there is no way to disable it by default then at
> > least a function to unbind the electric functionality the
> > documentation of post-self-insert-hook should state: "Don't rely on
> > this hook in cc derived modes because of {implementation details}. If
> > you still want to use post-self-insert-hook disable use
> > {implementation details} to turn electric off."
> 
> The problem you have stumbled over is more of a political problem than a
> technical one.

Can we please make it technical again?  Why can't the CC Mode function
which temporarily disables post-self-insert-hook call the hook
functions after it does its thing?  (I think I already asked this in
the past, but I cannot find that question of any discussion of it.)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38406; Package emacs. Full text available.

Message received at 38406 <at> debbugs.gnu.org:


Received: (at 38406) by debbugs.gnu.org; 1 Dec 2019 15:58:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 01 10:58:48 2019
Received: from localhost ([127.0.0.1]:36591 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ibRcV-00065u-Uv
	for submit <at> debbugs.gnu.org; Sun, 01 Dec 2019 10:58:48 -0500
Received: from colin.muc.de ([193.149.48.1]:61000 helo=mail.muc.de)
 by debbugs.gnu.org with smtp (Exim 4.84_2)
 (envelope-from <acm@HIDDEN>) id 1ibRcU-00065m-Ih
 for 38406 <at> debbugs.gnu.org; Sun, 01 Dec 2019 10:58:47 -0500
Received: (qmail 23761 invoked by uid 3782); 1 Dec 2019 15:58:44 -0000
Received: from acm.muc.de (p2E5D5336.dip0.t-ipconnect.de [46.93.83.54]) by
 colin.muc.de (tmda-ofmipd) with ESMTP;
 Sun, 01 Dec 2019 16:58:42 +0100
Received: (qmail 6403 invoked by uid 1000); 1 Dec 2019 15:58:42 -0000
Date: Sun, 1 Dec 2019 15:58:42 +0000
To: yyoncho <yyoncho@HIDDEN>
Subject: Re: bug#38406: 27.0.50; post-self-insert-hook does not hold its
 contract in cc-mode derived modes
Message-ID: <20191201155842.GC5085@ACM>
References: <CACCVLQX-r3tb6ocbTwgTL2SYS+BTogZ4dh2KdhK5pbnh_=hT1A@HIDDEN>
 <20191130143638.GA6716@ACM>
 <CACCVLQWSXY5mMfcvinL0ZqeocoL6BK53OVdj9hKF6+OD7ZiNgg@HIDDEN>
 <20191201150738.GB5085@ACM>
 <CACCVLQXsArOmw0Xw-pbH_7zetSLdz7XNXYEHOqXPKRCU6+OnyQ@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <CACCVLQXsArOmw0Xw-pbH_7zetSLdz7XNXYEHOqXPKRCU6+OnyQ@HIDDEN>
User-Agent: Mutt/1.10.1 (2018-07-13)
X-Delivery-Agent: TMDA/1.1.12 (Macallan)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 38406
Cc: 38406 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello, Ivan.

On Sun, Dec 01, 2019 at 17:27:33 +0200, yyoncho wrote:
> Hi Alan

> I am not aware of how exactly smartparens uses post-insert-hook.

In the simplest case, when you type, e.g. "{", it inserts "{}".  In other
cases, when you type "}" onto the existing Rbrace in "{}" it erases one
of the Rbraces.

The problem with this for CC Mode (in c-electric-brace, for example) is
that all these extra and removed characters play havoc with CC Mode's
insertion of auto-newlines and its execution of "clean ups" (e.g.
compacting "}\n    else {"  to  "} else {").

> > Again, how does this binding of post-self-insert-hook to nil in CC
> > Mode affect you?  What is it you're trying to do that this binding
> > makes difficult?

> ATM this change breaks at least 2 packages - lsp-mode and smartparents. I
> am the maintainer of lsp-mode and it uses the hook for 2 things:

> 1. There are keys that are triggering displaying function signature.
> 2. There are keys that are triggering onTypeFormatting which happens
> asynchronously.

Ok, thanks for telling me!

Why are you using post-self-insert-hook for these?  This hook can run in
the middle of a major mode's command, but surely you want them to run
_after_ that command, no?  Why not use post-command-hook here instead?

> Thanks,
> Ivan

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38406; Package emacs. Full text available.

Message received at 38406 <at> debbugs.gnu.org:


Received: (at 38406) by debbugs.gnu.org; 1 Dec 2019 15:27:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 01 10:27:54 2019
Received: from localhost ([127.0.0.1]:36587 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ibR8c-0005DD-7m
	for submit <at> debbugs.gnu.org; Sun, 01 Dec 2019 10:27:54 -0500
Received: from mail-lf1-f41.google.com ([209.85.167.41]:43985)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <yyoncho@HIDDEN>) id 1ibR8Z-0005Cy-Ka
 for 38406 <at> debbugs.gnu.org; Sun, 01 Dec 2019 10:27:52 -0500
Received: by mail-lf1-f41.google.com with SMTP id l14so25980389lfh.10
 for <38406 <at> debbugs.gnu.org>; Sun, 01 Dec 2019 07:27:51 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=s1STr6e7h0iWM3ZsBw1T250Wv1ueieZbGLXHFG2ov3g=;
 b=LA+mgqsByaq8rSLLYqD00IVZhFA4QEqrikgf3OHDSKsaAerHLsBuzeMAPj5Jsphy3l
 Gj7Y0tSoMdLMlPkuvYIZtwHj15CY2jsEE3pBrhfSXWumBZ0m5hqlIh9Z3iJGgWnFcdou
 cxy1rHOIJ7phR6rexFOizUYga746h7Kv7HKonud/VeRJ1Cr2DAf2IO9GR87hVSrHzsU1
 k30VuuPW5RV70a6+RoyurtPFVAr6O0FClCwUgmYNPivR/5eabOezA36Gk41jI3fNX4yS
 JhPpqmejbXYdZfJYQPdhGntoUN2oY43B4Hmk0FokOWzsH2+42vh+/hxVSnBB5uFjICTw
 VNPQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=s1STr6e7h0iWM3ZsBw1T250Wv1ueieZbGLXHFG2ov3g=;
 b=RbAxBab/x91CDiUuBefnhqFQTzFvIkE+u0r5LGINe+X+3SsbkCW7VppOyh6XJN1cFK
 yHQr/GuY9T28JouamCJOsoLPzCcxykuZz0LUq0Qnh+XBmV9jSaM7fX9ZlWuIE/Et1ka/
 TYKItdQL6DtPRQkmVIMvDqFASkrZxL/t4I9rkUpBXE6FFmdgsRPC+lEXRj0uAHWhZJM1
 3R6XEuG9R09DADytlGtjgcxIOxqdyQjyUm1fFERVLtxHpCj7DykHx7otzSuubtbcTMA1
 zFYVAJsnLfGh5x8P2QA6CZ2NuR2lejGRMeBFF6jNFp+hvQNnzTFUGS2c0UkpDEfDviq9
 3ejQ==
X-Gm-Message-State: APjAAAWEtVP8ald+uFzoAMSyWFc26zxiKv54/MevN9jSraJEjirWbzqk
 WqpzsO4ij9ufAZjJ+O4kZPkzt4F9LRwhOCqP12w=
X-Google-Smtp-Source: APXvYqzZVV9MYGhe6tlnNhp3PrpGxlj/1XNNg5mgNf8dKQox8d4ps6M6NXAXOl3JcB6WWBV430Oni67pXvx3H1AFE4M=
X-Received: by 2002:ac2:5931:: with SMTP id v17mr12285745lfi.166.1575214065466; 
 Sun, 01 Dec 2019 07:27:45 -0800 (PST)
MIME-Version: 1.0
References: <CACCVLQX-r3tb6ocbTwgTL2SYS+BTogZ4dh2KdhK5pbnh_=hT1A@HIDDEN>
 <20191130143638.GA6716@ACM>
 <CACCVLQWSXY5mMfcvinL0ZqeocoL6BK53OVdj9hKF6+OD7ZiNgg@HIDDEN>
 <20191201150738.GB5085@ACM>
In-Reply-To: <20191201150738.GB5085@ACM>
From: yyoncho <yyoncho@HIDDEN>
Date: Sun, 1 Dec 2019 17:27:33 +0200
Message-ID: <CACCVLQXsArOmw0Xw-pbH_7zetSLdz7XNXYEHOqXPKRCU6+OnyQ@HIDDEN>
Subject: Re: bug#38406: 27.0.50; post-self-insert-hook does not hold its
 contract in cc-mode derived modes
To: Alan Mackenzie <acm@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000d141720598a61af3"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 38406
Cc: 38406 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--000000000000d141720598a61af3
Content-Type: text/plain; charset="UTF-8"

Hi Alan

> Again, how does this binding of post-self-insert-hook to nil in CC Mode
> affect you?  What is it you're trying to do that this binding makes
> difficult?

ATM this change breaks at least 2 packages - lsp-mode and smartparents. I
am the maintainer of lsp-mode and it uses the hook for 2 things:

1. There are keys that are triggering displaying function signature.
2. There are keys that are triggering onTypeFormatting which happens
asynchronously.

I am not aware of how exactly smartparens uses post-insert-hook.

Thanks,
Ivan

On Sun, Dec 1, 2019 at 5:07 PM Alan Mackenzie <acm@HIDDEN> wrote:

> Hello, Ivan.
>
> On Sun, Dec 01, 2019 at 12:02:56 +0200, yyoncho wrote:
> > Hi Alan,
>
> > > There are other possible "fixes", for example modifying these functions
> > > so that they don't use self-insert-command at all, but somehow I don't
> > > think that's what you want.
>
> > I don't think that the code that is implemented against the contract
> listed
> > in the hook documentation should be rewritten. If electric stuff is so
> > that important and there is no way to disable it by default then at
> > least a function to unbind the electric functionality the
> > documentation of post-self-insert-hook should state: "Don't rely on
> > this hook in cc derived modes because of {implementation details}. If
> > you still want to use post-self-insert-hook disable use
> > {implementation details} to turn electric off."
>
> The problem you have stumbled over is more of a political problem than a
> technical one.
>
> post-self-insert-hook was introduced relatively recently as a quick and
> dirty method of doing certain things.  Its implications weren't thought
> through beforehand.  In particular, it breaks major modes which use
> self-insert-command as part of their processing, including CC Mode.
>
> If functions put onto post-self-insert-hook didn't violate the
> definition of self-insert-command (inserting exactly one copy of the key
> typed), there wouldn't be a problem.  An example of such a function is
> blink-paren-post-self-insert-function (see lisp/simple.el L7801).
>
> However, there are several functions put onto this hook that make
> extensive buffer changes.  An example is
> electric-pair-post-self-insert-function (in lisp/elec-pair.el).  These
> mess up self-insert-command, and violate the principle that major modes
> should be in charge of what text goes where in a window.
>
> People like using post-self-insert-hook without worrying about the
> problems it causes.  Binding post-self-insert-hook to nil in CC Mode,
> while not good, was a pragmatic workaround from around a year ago.  This
> allowed electric-pair-mode to function in CC Mode.  As I said, this
> problem is primarily a political problem.  Forgive me not wanting to
> draw too much attention to it at the moment.
>
> Again, how does this binding of post-self-insert-hook to nil in CC Mode
> affect you?  What is it you're trying to do that this binding makes
> difficult?
>
> > Thanks,
> > Ivan
>
> --
> Alan Mackenzie (Nuremberg, Germany).
>

--000000000000d141720598a61af3
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><br></div><div>Hi Alan</div><div><br></div><div>&gt; =
Again, how does this binding of post-self-insert-hook to nil in CC Mode<br>=
&gt; affect you?=C2=A0 What is it you&#39;re trying to do that this binding=
 makes<br>&gt; difficult?<br></div><div><br></div><div>ATM this change brea=
ks at least 2 packages - lsp-mode and smartparents. I</div><div>am the main=
tainer of lsp-mode and it uses the hook for 2 things:</div><div><br></div><=
div>1. There are keys that are triggering displaying function signature.</d=
iv><div>2. There are keys that are triggering onTypeFormatting which happen=
s asynchronously.=C2=A0</div><div><br></div><div>I am not aware of how exac=
tly=C2=A0smartparens uses post-insert-hook.</div><div><br></div><div>Thanks=
,</div><div>Ivan</div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr"=
 class=3D"gmail_attr">On Sun, Dec 1, 2019 at 5:07 PM Alan Mackenzie &lt;<a =
href=3D"mailto:acm@HIDDEN">acm@HIDDEN</a>&gt; wrote:<br></div><blockquote c=
lass=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px soli=
d rgb(204,204,204);padding-left:1ex">Hello, Ivan.<br>
<br>
On Sun, Dec 01, 2019 at 12:02:56 +0200, yyoncho wrote:<br>
&gt; Hi Alan,<br>
<br>
&gt; &gt; There are other possible &quot;fixes&quot;, for example modifying=
 these functions<br>
&gt; &gt; so that they don&#39;t use self-insert-command at all, but someho=
w I don&#39;t<br>
&gt; &gt; think that&#39;s what you want.<br>
<br>
&gt; I don&#39;t think that the code that is implemented against the contra=
ct listed<br>
&gt; in the hook documentation should be rewritten. If electric stuff is so=
<br>
&gt; that important and there is no way to disable it by default then at<br=
>
&gt; least a function to unbind the electric functionality the<br>
&gt; documentation of post-self-insert-hook should state: &quot;Don&#39;t r=
ely on<br>
&gt; this hook in cc derived modes because of {implementation details}. If<=
br>
&gt; you still want to use post-self-insert-hook disable use<br>
&gt; {implementation details} to turn electric off.&quot;<br>
<br>
The problem you have stumbled over is more of a political problem than a<br=
>
technical one.<br>
<br>
post-self-insert-hook was introduced relatively recently as a quick and<br>
dirty method of doing certain things.=C2=A0 Its implications weren&#39;t th=
ought<br>
through beforehand.=C2=A0 In particular, it breaks major modes which use<br=
>
self-insert-command as part of their processing, including CC Mode.<br>
<br>
If functions put onto post-self-insert-hook didn&#39;t violate the<br>
definition of self-insert-command (inserting exactly one copy of the key<br=
>
typed), there wouldn&#39;t be a problem.=C2=A0 An example of such a functio=
n is<br>
blink-paren-post-self-insert-function (see lisp/simple.el L7801).<br>
<br>
However, there are several functions put onto this hook that make<br>
extensive buffer changes.=C2=A0 An example is<br>
electric-pair-post-self-insert-function (in lisp/elec-pair.el).=C2=A0 These=
<br>
mess up self-insert-command, and violate the principle that major modes<br>
should be in charge of what text goes where in a window.<br>
<br>
People like using post-self-insert-hook without worrying about the<br>
problems it causes.=C2=A0 Binding post-self-insert-hook to nil in CC Mode,<=
br>
while not good, was a pragmatic workaround from around a year ago.=C2=A0 Th=
is<br>
allowed electric-pair-mode to function in CC Mode.=C2=A0 As I said, this<br=
>
problem is primarily a political problem.=C2=A0 Forgive me not wanting to<b=
r>
draw too much attention to it at the moment.<br>
<br>
Again, how does this binding of post-self-insert-hook to nil in CC Mode<br>
affect you?=C2=A0 What is it you&#39;re trying to do that this binding make=
s<br>
difficult?<br>
<br>
&gt; Thanks,<br>
&gt; Ivan<br>
<br>
-- <br>
Alan Mackenzie (Nuremberg, Germany).<br>
</blockquote></div>

--000000000000d141720598a61af3--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38406; Package emacs. Full text available.

Message received at 38406 <at> debbugs.gnu.org:


Received: (at 38406) by debbugs.gnu.org; 1 Dec 2019 15:07:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 01 10:07:44 2019
Received: from localhost ([127.0.0.1]:36567 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ibQp6-0004aE-75
	for submit <at> debbugs.gnu.org; Sun, 01 Dec 2019 10:07:44 -0500
Received: from colin.muc.de ([193.149.48.1]:14157 helo=mail.muc.de)
 by debbugs.gnu.org with smtp (Exim 4.84_2)
 (envelope-from <acm@HIDDEN>) id 1ibQp4-0004a2-Cq
 for 38406 <at> debbugs.gnu.org; Sun, 01 Dec 2019 10:07:43 -0500
Received: (qmail 9933 invoked by uid 3782); 1 Dec 2019 15:07:40 -0000
Received: from acm.muc.de (p2E5D5336.dip0.t-ipconnect.de [46.93.83.54]) by
 colin.muc.de (tmda-ofmipd) with ESMTP;
 Sun, 01 Dec 2019 16:07:38 +0100
Received: (qmail 6172 invoked by uid 1000); 1 Dec 2019 15:07:38 -0000
Date: Sun, 1 Dec 2019 15:07:38 +0000
To: yyoncho <yyoncho@HIDDEN>
Subject: Re: bug#38406: 27.0.50; post-self-insert-hook does not hold its
 contract in cc-mode derived modes
Message-ID: <20191201150738.GB5085@ACM>
References: <CACCVLQX-r3tb6ocbTwgTL2SYS+BTogZ4dh2KdhK5pbnh_=hT1A@HIDDEN>
 <20191130143638.GA6716@ACM>
 <CACCVLQWSXY5mMfcvinL0ZqeocoL6BK53OVdj9hKF6+OD7ZiNgg@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <CACCVLQWSXY5mMfcvinL0ZqeocoL6BK53OVdj9hKF6+OD7ZiNgg@HIDDEN>
User-Agent: Mutt/1.10.1 (2018-07-13)
X-Delivery-Agent: TMDA/1.1.12 (Macallan)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 38406
Cc: 38406 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello, Ivan.

On Sun, Dec 01, 2019 at 12:02:56 +0200, yyoncho wrote:
> Hi Alan,

> > There are other possible "fixes", for example modifying these functions
> > so that they don't use self-insert-command at all, but somehow I don't
> > think that's what you want.

> I don't think that the code that is implemented against the contract listed
> in the hook documentation should be rewritten. If electric stuff is so
> that important and there is no way to disable it by default then at
> least a function to unbind the electric functionality the
> documentation of post-self-insert-hook should state: "Don't rely on
> this hook in cc derived modes because of {implementation details}. If
> you still want to use post-self-insert-hook disable use
> {implementation details} to turn electric off."

The problem you have stumbled over is more of a political problem than a
technical one.

post-self-insert-hook was introduced relatively recently as a quick and
dirty method of doing certain things.  Its implications weren't thought
through beforehand.  In particular, it breaks major modes which use
self-insert-command as part of their processing, including CC Mode.

If functions put onto post-self-insert-hook didn't violate the
definition of self-insert-command (inserting exactly one copy of the key
typed), there wouldn't be a problem.  An example of such a function is
blink-paren-post-self-insert-function (see lisp/simple.el L7801).

However, there are several functions put onto this hook that make
extensive buffer changes.  An example is
electric-pair-post-self-insert-function (in lisp/elec-pair.el).  These
mess up self-insert-command, and violate the principle that major modes
should be in charge of what text goes where in a window.

People like using post-self-insert-hook without worrying about the
problems it causes.  Binding post-self-insert-hook to nil in CC Mode,
while not good, was a pragmatic workaround from around a year ago.  This
allowed electric-pair-mode to function in CC Mode.  As I said, this
problem is primarily a political problem.  Forgive me not wanting to
draw too much attention to it at the moment.

Again, how does this binding of post-self-insert-hook to nil in CC Mode
affect you?  What is it you're trying to do that this binding makes
difficult?

> Thanks,
> Ivan

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38406; Package emacs. Full text available.

Message received at 38406 <at> debbugs.gnu.org:


Received: (at 38406) by debbugs.gnu.org; 1 Dec 2019 10:03:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 01 05:03:17 2019
Received: from localhost ([127.0.0.1]:35490 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ibM4S-0001B9-RY
	for submit <at> debbugs.gnu.org; Sun, 01 Dec 2019 05:03:17 -0500
Received: from mail-lj1-f182.google.com ([209.85.208.182]:34889)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <yyoncho@HIDDEN>) id 1ibM4P-0001Au-VU
 for 38406 <at> debbugs.gnu.org; Sun, 01 Dec 2019 05:03:15 -0500
Received: by mail-lj1-f182.google.com with SMTP id j6so27469545lja.2
 for <38406 <at> debbugs.gnu.org>; Sun, 01 Dec 2019 02:03:13 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=maZFkN/Z5cMsDDpqK5peUCiAP1Mu0ulFOBOKw14i9PE=;
 b=aGN6nijrXZaUxMWtydf8muM5ACWG3v/eBvE2g3mWy+SexaFPmCLwBQr02+/vmJVNkV
 rdC1kndTjADoqymTdVay6HNewFJIQ9OoWb1i9TjZuAymD7V2Mah1NTMIT5qqTB4UZL/6
 x2OviFqruY/disyH8KaR+a67qyULIP9Y/7TMXh1RPUOUz3+2disuNJO3+pKuXDFXgvKv
 9za439U7Z1HMYZcNMFdiE/1wENL6fprBAIK0F2Apqo4aV91Co0KbqV42IbpSzdbUPA4l
 UtMJCtwdn8QC0oC7BDRk0Q5BuxZ6qqgvEsAgonI0j8eSieXm+79kISmpUW3e3orjyEJP
 3QEw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=maZFkN/Z5cMsDDpqK5peUCiAP1Mu0ulFOBOKw14i9PE=;
 b=XtCH1DECKaw5wBKff5NTdEEn/xESk0E4w1RFobIZGEsuLxRRpHQt3QqlcKci9C/GX9
 BIfunhrSE9Uz1MIn7CamHXezVrhtwTR+vBwA5FQ2ajkCRB46ZlqcjeYq67dG+Itxvvek
 incGJEHPda9DsgutEb3vD/9G+OE7mYkkZeXKX/bGplY2g6V4O8ji5QexXsEnR7ely0B/
 g3meBZcFye4Bt6arswI8RNRWUljuZrzDlz+itYo5sLJST9gjBsOMTM6EUi9Pvl+cPrLg
 aLEBXE/ql0sWb8UvUk4HtCKyIPzKci6R8lNfTK/w+pg+feQHTFQlvqTo7AI14Y6+yjLy
 YpPQ==
X-Gm-Message-State: APjAAAUt1Qu4CGmY5awOe5XH0PgT2LEz6We/v9xxnc8RZKcEtnalEl/d
 88UMIBqJRhhJPYp0bAaMGFlkVNKwjP7zthQ9LfQ=
X-Google-Smtp-Source: APXvYqwgcPTAJ0gFKwE5/h/hjpCE5Xv8lwYoJMnj0/JNCtXZxUBwnOdByCcf6awCi078seyaZb4SXqkcmKQMNNFtp0A=
X-Received: by 2002:a2e:808a:: with SMTP id i10mr27028889ljg.151.1575194587733; 
 Sun, 01 Dec 2019 02:03:07 -0800 (PST)
MIME-Version: 1.0
References: <CACCVLQX-r3tb6ocbTwgTL2SYS+BTogZ4dh2KdhK5pbnh_=hT1A@HIDDEN>
 <20191130143638.GA6716@ACM>
In-Reply-To: <20191130143638.GA6716@ACM>
From: yyoncho <yyoncho@HIDDEN>
Date: Sun, 1 Dec 2019 12:02:56 +0200
Message-ID: <CACCVLQWSXY5mMfcvinL0ZqeocoL6BK53OVdj9hKF6+OD7ZiNgg@HIDDEN>
Subject: Re: bug#38406: 27.0.50; post-self-insert-hook does not hold its
 contract in cc-mode derived modes
To: Alan Mackenzie <acm@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000daa3840598a191af"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 38406
Cc: 38406 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--000000000000daa3840598a191af
Content-Type: text/plain; charset="UTF-8"

Hi Alan,

> There are other possible "fixes", for example modifying these functions
> so that they don't use self-insert-command at all, but somehow I don't
> think that's what you want.

I don't think that the code that is implemented against the contract listed
in
the hook documentation should be rewritten. If electric stuff is so that
important and there is no way to disable it by default then at least a
function
to unbind the electric functionality the documentation of
post-self-insert-hook
should state: "Don't rely on this hook in cc derived modes because of
{implementation details}. If you still want to use post-self-insert-hook
disable
use {implementation details} to turn electric off."

Thanks,
Ivan


On Sat, Nov 30, 2019 at 4:36 PM Alan Mackenzie <acm@HIDDEN> wrote:

> Hello, Yyoncho.
>
> On Wed, Nov 27, 2019 at 22:00:26 +0200, yyoncho wrote:
> > As per post-self-insert-hook documentation.
>
> > > Hook run at the end of `self-insert-command'.
> > > This is run after inserting the character.
>
> Yes.  This is a problematic hook, since it is capable of disrupting the
> correct functionality of any Lisp program which uses
> self-insert-command.  This transpired in CC Mode, so to make
> c-electric-brace and friends work, the action of the hook was nullified.
>
> > This does not hold by default in cc-mode due to the following mapped by
> > default functions:
>
> > > (define-key c-mode-base-map "#"         'c-electric-pound)
> > > (define-key c-mode-base-map "{"         'c-electric-brace)
> > > (define-key c-mode-base-map "}"         'c-electric-brace)
> > > (define-key c-mode-base-map "/"         'c-electric-slash)
> > > (define-key c-mode-base-map "*"         'c-electric-star)
> > > (define-key c-mode-base-map ";"         'c-electric-semi&comma)
> > > (define-key c-mode-base-map ","         'c-electric-semi&comma)
> > > (define-key c-mode-base-map ":"         'c-electric-colon)
> > > (define-key c-mode-base-map "("         'c-electric-paren)
> > > (define-key c-mode-base-map ")"         'c-electric-paren)
>
> > All of these functions (or at least majority) contain the following
> lines:
>
> > > (let (post-self-insert-hook) ; Disable random functionality.
> > >      (self-insert-command (prefix-numeric-value arg)))
>
> Yes.  This was one way to get self-insert-function to perform its
> correct functionality, namely inserting exactly one copy of a typed key
> (or alternatively N copies when there's a prefix key).
>
> > Possible fixes:
>
> First question, what's the problem?  What do you want to do that the
> above mechanism hinders?
>
> > 1. Do not bind the functions by default.
>
> They are essential to the correct functioning of CC Mode.
>
> > 2. Rewrite them so they do not inhibit post-self-insert-hook functions.
>
> This is difficult.  If there were an easy way to do this, I would have
> done it.  Note that, from the point of view of a major mode,
> post-self-insert-hook is totally random functionality - it is a bit like
> a trojan horse.  The major mode has no way to control what it does, thus
> is unable to guarantee the major mode will work.
>
> There are other possible "fixes", for example modifying these functions
> so that they don't use self-insert-command at all, but somehow I don't
> think that's what you want.
>
> Another fix would be to specify restrictions on what one is allowed to
> do in this hook.  I would prefer this, but other people would object
> strongly.
>
> I would advise against using post-self-insert-hook, if you possibly can.
> after-change-functions may be a good alternative.  Maybe you can't.  So,
> again, what is it you're trying to do?
>
> > In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.1)
> >  of 2019-11-23 built on kyoncho-H87-D3H
> > Repository revision: 8934762bb37273e6606097de92dcc2556456acd2
> > Repository branch: master
> > Windowing system distributor 'The X.Org Foundation', version
> 11.0.12001000
> > System Description: Linux Mint 19.1
>
> [ .... ]
>
> --
> Alan Mackenzie (Nuremberg, Germany).
>

--000000000000daa3840598a191af
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi Alan,<div><br></div><div>&gt; There are other possible =
&quot;fixes&quot;, for example modifying these functions</div>&gt; so that =
they don&#39;t use self-insert-command at all, but somehow I don&#39;t<br>&=
gt; think that&#39;s what you want.<br><div><br></div><div>I don&#39;t thin=
k that the code that is implemented against the contract listed in<br>the h=
ook documentation should be rewritten. If electric=C2=A0stuff is so that<br=
>important and there is no way to disable it by default then at least a fun=
ction<br>to unbind the electric functionality the documentation of post-sel=
f-insert-hook<br>should state: &quot;Don&#39;t rely on this hook in cc deri=
ved modes because of<br>{implementation details}. If you still want to use =
post-self-insert-hook disable<br>use {implementation details} to turn elect=
ric off.&quot;=C2=A0<br></div><div><br></div><div>Thanks,<br></div><div>Iva=
n</div></div><div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"=
gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Sat, Nov 30, 2019 at =
4:36 PM Alan Mackenzie &lt;<a href=3D"mailto:acm@HIDDEN" target=3D"_blank">=
acm@HIDDEN</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=
=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding=
-left:1ex">Hello, Yyoncho.<br>
<br>
On Wed, Nov 27, 2019 at 22:00:26 +0200, yyoncho wrote:<br>
&gt; As per post-self-insert-hook documentation.<br>
<br>
&gt; &gt; Hook run at the end of `self-insert-command&#39;.<br>
&gt; &gt; This is run after inserting the character.<br>
<br>
Yes.=C2=A0 This is a problematic hook, since it is capable of disrupting th=
e<br>
correct functionality of any Lisp program which uses<br>
self-insert-command.=C2=A0 This transpired in CC Mode, so to make<br>
c-electric-brace and friends work, the action of the hook was nullified.<br=
>
<br>
&gt; This does not hold by default in cc-mode due to the following mapped b=
y<br>
&gt; default functions:<br>
<br>
&gt; &gt; (define-key c-mode-base-map &quot;#&quot;=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0&#39;c-electric-pound)<br>
&gt; &gt; (define-key c-mode-base-map &quot;{&quot;=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0&#39;c-electric-brace)<br>
&gt; &gt; (define-key c-mode-base-map &quot;}&quot;=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0&#39;c-electric-brace)<br>
&gt; &gt; (define-key c-mode-base-map &quot;/&quot;=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0&#39;c-electric-slash)<br>
&gt; &gt; (define-key c-mode-base-map &quot;*&quot;=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0&#39;c-electric-star)<br>
&gt; &gt; (define-key c-mode-base-map &quot;;&quot;=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0&#39;c-electric-semi&amp;comma)<br>
&gt; &gt; (define-key c-mode-base-map &quot;,&quot;=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0&#39;c-electric-semi&amp;comma)<br>
&gt; &gt; (define-key c-mode-base-map &quot;:&quot;=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0&#39;c-electric-colon)<br>
&gt; &gt; (define-key c-mode-base-map &quot;(&quot;=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0&#39;c-electric-paren)<br>
&gt; &gt; (define-key c-mode-base-map &quot;)&quot;=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0&#39;c-electric-paren)<br>
<br>
&gt; All of these functions (or at least majority) contain the following li=
nes:<br>
<br>
&gt; &gt; (let (post-self-insert-hook) ; Disable random functionality.<br>
&gt; &gt;=C2=A0 =C2=A0 =C2=A0 (self-insert-command (prefix-numeric-value ar=
g)))<br>
<br>
Yes.=C2=A0 This was one way to get self-insert-function to perform its<br>
correct functionality, namely inserting exactly one copy of a typed key<br>
(or alternatively N copies when there&#39;s a prefix key).<br>
<br>
&gt; Possible fixes:<br>
<br>
First question, what&#39;s the problem?=C2=A0 What do you want to do that t=
he<br>
above mechanism hinders?<br>
<br>
&gt; 1. Do not bind the functions by default.<br>
<br>
They are essential to the correct functioning of CC Mode.<br>
<br>
&gt; 2. Rewrite them so they do not inhibit post-self-insert-hook functions=
.<br>
<br>
This is difficult.=C2=A0 If there were an easy way to do this, I would have=
<br>
done it.=C2=A0 Note that, from the point of view of a major mode,<br>
post-self-insert-hook is totally random functionality - it is a bit like<br=
>
a trojan horse.=C2=A0 The major mode has no way to control what it does, th=
us<br>
is unable to guarantee the major mode will work.<br>
<br>
There are other possible &quot;fixes&quot;, for example modifying these fun=
ctions<br>
so that they don&#39;t use self-insert-command at all, but somehow I don&#3=
9;t<br>
think that&#39;s what you want.<br>
<br>
Another fix would be to specify restrictions on what one is allowed to<br>
do in this hook.=C2=A0 I would prefer this, but other people would object<b=
r>
strongly.<br>
<br>
I would advise against using post-self-insert-hook, if you possibly can.<br=
>
after-change-functions may be a good alternative.=C2=A0 Maybe you can&#39;t=
.=C2=A0 So,<br>
again, what is it you&#39;re trying to do?<br>
<br>
&gt; In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.=
1)<br>
&gt;=C2=A0 of 2019-11-23 built on kyoncho-H87-D3H<br>
&gt; Repository revision: 8934762bb37273e6606097de92dcc2556456acd2<br>
&gt; Repository branch: master<br>
&gt; Windowing system distributor &#39;The X.Org Foundation&#39;, version 1=
1.0.12001000<br>
&gt; System Description: Linux Mint 19.1<br>
<br>
[ .... ]<br>
<br>
-- <br>
Alan Mackenzie (Nuremberg, Germany).<br>
</blockquote></div></div>

--000000000000daa3840598a191af--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38406; Package emacs. Full text available.

Message received at 38406 <at> debbugs.gnu.org:


Received: (at 38406) by debbugs.gnu.org; 30 Nov 2019 14:36:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 30 09:36:45 2019
Received: from localhost ([127.0.0.1]:33859 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ib3rY-0002Az-Sb
	for submit <at> debbugs.gnu.org; Sat, 30 Nov 2019 09:36:45 -0500
Received: from colin.muc.de ([193.149.48.1]:35146 helo=mail.muc.de)
 by debbugs.gnu.org with smtp (Exim 4.84_2)
 (envelope-from <acm@HIDDEN>) id 1ib3rW-0002Aq-EN
 for 38406 <at> debbugs.gnu.org; Sat, 30 Nov 2019 09:36:44 -0500
Received: (qmail 5590 invoked by uid 3782); 30 Nov 2019 14:36:40 -0000
Received: from acm.muc.de (p2E5D5014.dip0.t-ipconnect.de [46.93.80.20]) by
 colin.muc.de (tmda-ofmipd) with ESMTP;
 Sat, 30 Nov 2019 15:36:38 +0100
Received: (qmail 6867 invoked by uid 1000); 30 Nov 2019 14:36:38 -0000
Date: Sat, 30 Nov 2019 14:36:38 +0000
To: yyoncho <yyoncho@HIDDEN>
Subject: Re: bug#38406: 27.0.50; post-self-insert-hook does not hold its
 contract in cc-mode derived modes
Message-ID: <20191130143638.GA6716@ACM>
References: <CACCVLQX-r3tb6ocbTwgTL2SYS+BTogZ4dh2KdhK5pbnh_=hT1A@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <CACCVLQX-r3tb6ocbTwgTL2SYS+BTogZ4dh2KdhK5pbnh_=hT1A@HIDDEN>
User-Agent: Mutt/1.10.1 (2018-07-13)
X-Delivery-Agent: TMDA/1.1.12 (Macallan)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 38406
Cc: 38406 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello, Yyoncho.

On Wed, Nov 27, 2019 at 22:00:26 +0200, yyoncho wrote:
> As per post-self-insert-hook documentation.

> > Hook run at the end of `self-insert-command'.
> > This is run after inserting the character.

Yes.  This is a problematic hook, since it is capable of disrupting the
correct functionality of any Lisp program which uses
self-insert-command.  This transpired in CC Mode, so to make
c-electric-brace and friends work, the action of the hook was nullified.

> This does not hold by default in cc-mode due to the following mapped by
> default functions:

> > (define-key c-mode-base-map "#"         'c-electric-pound)
> > (define-key c-mode-base-map "{"         'c-electric-brace)
> > (define-key c-mode-base-map "}"         'c-electric-brace)
> > (define-key c-mode-base-map "/"         'c-electric-slash)
> > (define-key c-mode-base-map "*"         'c-electric-star)
> > (define-key c-mode-base-map ";"         'c-electric-semi&comma)
> > (define-key c-mode-base-map ","         'c-electric-semi&comma)
> > (define-key c-mode-base-map ":"         'c-electric-colon)
> > (define-key c-mode-base-map "("         'c-electric-paren)
> > (define-key c-mode-base-map ")"         'c-electric-paren)

> All of these functions (or at least majority) contain the following lines:

> > (let (post-self-insert-hook) ; Disable random functionality.
> >      (self-insert-command (prefix-numeric-value arg)))

Yes.  This was one way to get self-insert-function to perform its
correct functionality, namely inserting exactly one copy of a typed key
(or alternatively N copies when there's a prefix key).

> Possible fixes:

First question, what's the problem?  What do you want to do that the
above mechanism hinders?

> 1. Do not bind the functions by default.

They are essential to the correct functioning of CC Mode.

> 2. Rewrite them so they do not inhibit post-self-insert-hook functions.

This is difficult.  If there were an easy way to do this, I would have
done it.  Note that, from the point of view of a major mode,
post-self-insert-hook is totally random functionality - it is a bit like
a trojan horse.  The major mode has no way to control what it does, thus
is unable to guarantee the major mode will work.

There are other possible "fixes", for example modifying these functions
so that they don't use self-insert-command at all, but somehow I don't
think that's what you want.

Another fix would be to specify restrictions on what one is allowed to
do in this hook.  I would prefer this, but other people would object
strongly.

I would advise against using post-self-insert-hook, if you possibly can.
after-change-functions may be a good alternative.  Maybe you can't.  So,
again, what is it you're trying to do?

> In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.1)
>  of 2019-11-23 built on kyoncho-H87-D3H
> Repository revision: 8934762bb37273e6606097de92dcc2556456acd2
> Repository branch: master
> Windowing system distributor 'The X.Org Foundation', version 11.0.12001000
> System Description: Linux Mint 19.1

[ .... ]

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38406; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 27 Nov 2019 20:01:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 27 15:01:01 2019
Received: from localhost ([127.0.0.1]:56242 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ia3Uh-0005I8-58
	for submit <at> debbugs.gnu.org; Wed, 27 Nov 2019 15:01:01 -0500
Received: from lists.gnu.org ([209.51.188.17]:58154)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <yyoncho@HIDDEN>) id 1ia3Ue-0005Hz-7Z
 for submit <at> debbugs.gnu.org; Wed, 27 Nov 2019 15:00:58 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:60389)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <yyoncho@HIDDEN>) id 1ia3UW-0005dG-VP
 for bug-gnu-emacs@HIDDEN; Wed, 27 Nov 2019 15:00:55 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 HTML_MESSAGE,URIBL_BLOCKED autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <yyoncho@HIDDEN>) id 1ia3UP-00009R-VP
 for bug-gnu-emacs@HIDDEN; Wed, 27 Nov 2019 15:00:48 -0500
Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]:33657)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <yyoncho@HIDDEN>) id 1ia3UP-00005k-9K
 for bug-gnu-emacs@HIDDEN; Wed, 27 Nov 2019 15:00:41 -0500
Received: by mail-lf1-x132.google.com with SMTP id d6so18191686lfc.0
 for <bug-gnu-emacs@HIDDEN>; Wed, 27 Nov 2019 12:00:40 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:from:date:message-id:subject:to;
 bh=62iyDEK5YQG8T7xIhpNkxWQHHR2jFzkOWjQWpKWAiqI=;
 b=JkijSUwnUrRgVizQbZtG5hC/IBRVDAP5EfRaB9vaoRP8WmVHQ71MS7hEq+RoePCTJC
 hM0Nc4PyDarzm9vHLYABm2POwN2PLRiuqb7apWznc4N+nXB5AWg652uBN1mxhYUwUCMZ
 VXLKP4a1u9FH0tfrmxgKNw4SD2jWvtZw2j95j73oIJ8wufj/lCCbhn46Ecv1FTac8gor
 iAnkKOOKOBy0sDg4Gu7lDB7+YPY6Vxqfx/LbF7j+zOjf/YN6Z0sV8v7qL0uLhsdqi7p5
 FiW2R2Z01eQMcrROLPgKA3RvGKAoatODFoo+Etab9C35SopEd+bx59Y9DjAHWtqRXQYx
 z4xw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=62iyDEK5YQG8T7xIhpNkxWQHHR2jFzkOWjQWpKWAiqI=;
 b=MDiPcNYu5FxgBKlMT6c0uOEfVYfP60BeKfxm5KEeShEDXWaPPkLvhWDvbpVsnLJQb7
 djWQbWLzzc6TY0zNpdKb8KgRyWNNNjL0m1NzL7V7iVhEraED7nLxEcOAirsehUMy04mE
 ygavLmpj3JOZo37MWmuNGpnkOY/eXLCV1rTIC+RGblZQup7Z7S5DVyhophtZ0l77F2VM
 +oZgMnXLuuAx8a8wvrYl0JYP61Uzz5RUYQxH5f+i7+Mgev+DjXvsTi5trFMrOIZitQLu
 nl3TSJSjuVoDSVsKJ83l6BA/BxCotve5EoiRiDeszKqNmntw7EsHCEhUM5RzFDOrRSDq
 xBpQ==
X-Gm-Message-State: APjAAAVoRj/M0Ys6CtJlKXyYIgaZNNh3+Q48Nxu1V0NAXjsi3NokqrTk
 mu+gVdVZ7KS36SBFkgciqYRFMTAJZKdDSAZFb0qlI98i
X-Google-Smtp-Source: APXvYqzlgLbEEdEKOhWNSSwY7yqwyPVXXBvy8TDVXZtuE8ywPyhWkpvvwYvqIF8Mo+dAcDJNvRh1NB72IZQDUkx8a6Q=
X-Received: by 2002:ac2:5210:: with SMTP id a16mr30790742lfl.156.1574884837977; 
 Wed, 27 Nov 2019 12:00:37 -0800 (PST)
MIME-Version: 1.0
From: yyoncho <yyoncho@HIDDEN>
Date: Wed, 27 Nov 2019 22:00:26 +0200
Message-ID: <CACCVLQX-r3tb6ocbTwgTL2SYS+BTogZ4dh2KdhK5pbnh_=hT1A@HIDDEN>
Subject: 27.0.50; post-self-insert-hook does not hold its contract in cc-mode
 derived modes
To: bug-gnu-emacs@HIDDEN
Content-Type: multipart/alternative; boundary="000000000000547bdf0598597355"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-Received-From: 2a00:1450:4864:20::132
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

--000000000000547bdf0598597355
Content-Type: text/plain; charset="UTF-8"

As per post-self-insert-hook documentation.

> Hook run at the end of `self-insert-command'.
> This is run after inserting the character.

This does not hold by default in cc-mode due to the following mapped by
default functions:

> (define-key c-mode-base-map "#"         'c-electric-pound)
> (define-key c-mode-base-map "{"         'c-electric-brace)
> (define-key c-mode-base-map "}"         'c-electric-brace)
> (define-key c-mode-base-map "/"         'c-electric-slash)
> (define-key c-mode-base-map "*"         'c-electric-star)
> (define-key c-mode-base-map ";"         'c-electric-semi&comma)
> (define-key c-mode-base-map ","         'c-electric-semi&comma)
> (define-key c-mode-base-map ":"         'c-electric-colon)
> (define-key c-mode-base-map "("         'c-electric-paren)
> (define-key c-mode-base-map ")"         'c-electric-paren)

All of these functions (or at least majority) contain the following lines:

> (let (post-self-insert-hook) ; Disable random functionality.
>      (self-insert-command (prefix-numeric-value arg)))

Possible fixes:

1. Do not bind the functions by default.
2. Rewrite them so they do not inhibit post-self-insert-hook functions.

In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.1)
 of 2019-11-23 built on kyoncho-H87-D3H
Repository revision: 8934762bb37273e6606097de92dcc2556456acd2
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12001000
System Description: Linux Mint 19.1

Configured using:
 'configure --with-modules --with-json'

Configured features:
XPM JPEG TIFF GIF PNG SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY GNUTLS
LIBXML2 FREETYPE HARFBUZZ XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM
MODULES THREADS JSON PDUMPER GMP

Important settings:
  value of $LC_CTYPE: en_US.UTF-8
  value of $LC_MONETARY: bg_BG.UTF-8
  value of $LC_NUMERIC: bg_BG.UTF-8
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Emacs-Lisp

Minor modes in effect:
  helm-spacemacs-help-mode: t
  global-magit-file-mode: t
  global-evil-surround-mode: t
  evil-surround-mode: t
  helm-descbinds-mode: t
  helm-mode: t
  helm-flx-mode: t
  dap-tooltip-mode: t
  dap-ui-mode: t
  gdb-many-windows: t
  dap-mode: t
  gradle-mode: t
  global-git-gutter+-mode: t
  global-git-commit-mode: t
  async-bytecomp-package-mode: t
  pupo-mode: t
  purpose-mode: t
  evil-escape-mode: t
  projectile-mode: t
  recentf-mode: t
  company-mode: t
  auto-compile-mode: t
  elisp-slime-nav-mode: t
  eval-sexp-fu-flash-mode: t
  goto-address-prog-mode: t
  bug-reference-prog-mode: t
  auto-highlight-symbol-mode: t
  flycheck-pos-tip-mode: t
  global-flycheck-mode: t
  highlight-numbers-mode: t
  highlight-parentheses-mode: t
  rainbow-delimiters-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  evil-cleverparens-mode: t
  show-smartparens-global-mode: t
  show-smartparens-mode: t
  smartparens-mode: t
  persistent-scratch-autosave-mode: t
  winner-mode: t
  global-spacemacs-whitespace-cleanup-mode: t
  spacemacs-whitespace-cleanup-mode: t
  winum-mode: t
  global-vi-tilde-fringe-mode: t
  save-place-mode: t
  savehist-mode: t
  persp-mode: t
  global-hl-todo-mode: t
  hl-todo-mode: t
  global-fasd-mode: t
  eyebrowse-mode: t
  evil-mc-mode: t
  global-anzu-mode: t
  anzu-mode: t
  editorconfig-mode: t
  doom-modeline-mode: t
  clean-aindent-mode: t
  hybrid-mode: t
  which-key-mode: t
  override-global-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  shell-dirtrack-mode: t
  evil-mode: t
  evil-local-mode: t
  spacemacs-leader-override-mode: t
  global-spacemacs-leader-override-mode: t
  global-hl-line-mode: t
  xterm-mouse-mode: t
  global-auto-revert-mode: t
  ido-vertical-mode: t
  global-page-break-lines-mode: t
  page-break-lines-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  hs-minor-mode: t

Load-path shadows:
/home/kyoncho/.emacs.d/elpa/27.0/develop/ht-20190924.704/ht hides
/home/kyoncho/.emacs.d/core/libs/ht
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-exp
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-exp
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-footnote
hides /usr/local/share/emacs/27.0.50/lisp/org/org-footnote
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-scheme
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-scheme
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-entities
hides /usr/local/share/emacs/27.0.50/lisp/org/org-entities
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-clojure
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-clojure
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ox-odt
hides /usr/local/share/emacs/27.0.50/lisp/org/ox-odt
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-ledger
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-ledger
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ox-man
hides /usr/local/share/emacs/27.0.50/lisp/org/ox-man
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-duration
hides /usr/local/share/emacs/27.0.50/lisp/org/org-duration
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-core
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-core
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-css
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-css
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ox-org
hides /usr/local/share/emacs/27.0.50/lisp/org/ox-org
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-sass
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-sass
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-maxima
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-maxima
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-matlab
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-matlab
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-ebnf
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-ebnf
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-ocaml
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-ocaml
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ox-ascii
hides /usr/local/share/emacs/27.0.50/lisp/org/ox-ascii
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-lilypond
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-lilypond
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ox-md
hides /usr/local/share/emacs/27.0.50/lisp/org/ox-md
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-timer
hides /usr/local/share/emacs/27.0.50/lisp/org/org-timer
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-calc
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-calc
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-macro
hides /usr/local/share/emacs/27.0.50/lisp/org/org-macro
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-attach
hides /usr/local/share/emacs/27.0.50/lisp/org/org-attach
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-plantuml
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-plantuml
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-element
hides /usr/local/share/emacs/27.0.50/lisp/org/org-element
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-eww
hides /usr/local/share/emacs/27.0.50/lisp/org/org-eww
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-crypt
hides /usr/local/share/emacs/27.0.50/lisp/org/org-crypt
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-forth
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-forth
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-clock
hides /usr/local/share/emacs/27.0.50/lisp/org/org-clock
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-colview
hides /usr/local/share/emacs/27.0.50/lisp/org/org-colview
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-w3m
hides /usr/local/share/emacs/27.0.50/lisp/org/org-w3m
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-src
hides /usr/local/share/emacs/27.0.50/lisp/org/org-src
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-vala
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-vala
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-stan
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-stan
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-gnus
hides /usr/local/share/emacs/27.0.50/lisp/org/org-gnus
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-fortran
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-fortran
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-lob
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-lob
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-processing
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-processing
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-mobile
hides /usr/local/share/emacs/27.0.50/lisp/org/org-mobile
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-groovy
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-groovy
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-habit
hides /usr/local/share/emacs/27.0.50/lisp/org/org-habit
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-shen
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-shen
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-lua
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-lua
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-ruby
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-ruby
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-info
hides /usr/local/share/emacs/27.0.50/lisp/org/org-info
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-mouse
hides /usr/local/share/emacs/27.0.50/lisp/org/org-mouse
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-archive
hides /usr/local/share/emacs/27.0.50/lisp/org/org-archive
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-rmail
hides /usr/local/share/emacs/27.0.50/lisp/org/org-rmail
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-comint
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-comint
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-io
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-io
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-hledger
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-hledger
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-id
hides /usr/local/share/emacs/27.0.50/lisp/org/org-id
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-octave
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-octave
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-ref
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-ref
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-table
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-table
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ox-beamer
hides /usr/local/share/emacs/27.0.50/lisp/org/ox-beamer
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-picolisp
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-picolisp
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-agenda
hides /usr/local/share/emacs/27.0.50/lisp/org/org-agenda
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-python
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-python
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-makefile
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-makefile
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ox-texinfo
hides /usr/local/share/emacs/27.0.50/lisp/org/ox-texinfo
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-gnuplot
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-gnuplot
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-lint
hides /usr/local/share/emacs/27.0.50/lisp/org/org-lint
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ox-publish
hides /usr/local/share/emacs/27.0.50/lisp/org/ox-publish
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-version
hides /usr/local/share/emacs/27.0.50/lisp/org/org-version
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-perl
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-perl
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-eshell
hides /usr/local/share/emacs/27.0.50/lisp/org/org-eshell
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-tangle
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-tangle
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-ctags
hides /usr/local/share/emacs/27.0.50/lisp/org/org-ctags
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-eval
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-eval
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ox-latex
hides /usr/local/share/emacs/27.0.50/lisp/org/ox-latex
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-keys
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-keys
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-java
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-java
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-macs
hides /usr/local/share/emacs/27.0.50/lisp/org/org-macs
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-awk
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-awk
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-abc
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-abc
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-asymptote
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-asymptote
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-org
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-org
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-js
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-js
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-plot
hides /usr/local/share/emacs/27.0.50/lisp/org/org-plot
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-indent
hides /usr/local/share/emacs/27.0.50/lisp/org/org-indent
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-table
hides /usr/local/share/emacs/27.0.50/lisp/org/org-table
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-sql
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-sql
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-screen
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-screen
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-dot
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-dot
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-coq
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-coq
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-pcomplete
hides /usr/local/share/emacs/27.0.50/lisp/org/org-pcomplete
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-mscgen
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-mscgen
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-irc
hides /usr/local/share/emacs/27.0.50/lisp/org/org-irc
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-latex
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-latex
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ox hides
/usr/local/share/emacs/27.0.50/lisp/org/ox
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-capture
hides /usr/local/share/emacs/27.0.50/lisp/org/org-capture
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org
hides /usr/local/share/emacs/27.0.50/lisp/org/org
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-feed
hides /usr/local/share/emacs/27.0.50/lisp/org/org-feed
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-shell
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-shell
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-protocol
hides /usr/local/share/emacs/27.0.50/lisp/org/org-protocol
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-R
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-R
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-ditaa
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-ditaa
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ox-icalendar
hides /usr/local/share/emacs/27.0.50/lisp/org/ox-icalendar
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-sed
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-sed
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-lisp
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-lisp
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-datetree
hides /usr/local/share/emacs/27.0.50/lisp/org/org-datetree
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-install
hides /usr/local/share/emacs/27.0.50/lisp/org/org-install
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-loaddefs
hides /usr/local/share/emacs/27.0.50/lisp/org/org-loaddefs
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-sqlite
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-sqlite
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-bibtex
hides /usr/local/share/emacs/27.0.50/lisp/org/org-bibtex
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-J
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-J
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-inlinetask
hides /usr/local/share/emacs/27.0.50/lisp/org/org-inlinetask
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-mhe
hides /usr/local/share/emacs/27.0.50/lisp/org/org-mhe
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-emacs-lisp
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-emacs-lisp
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-faces
hides /usr/local/share/emacs/27.0.50/lisp/org/org-faces
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-docview
hides /usr/local/share/emacs/27.0.50/lisp/org/org-docview
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ox-html
hides /usr/local/share/emacs/27.0.50/lisp/org/ox-html
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob hides
/usr/local/share/emacs/27.0.50/lisp/org/ob
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-list
hides /usr/local/share/emacs/27.0.50/lisp/org/org-list
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-haskell
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-haskell
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-bbdb
hides /usr/local/share/emacs/27.0.50/lisp/org/org-bbdb
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-C
hides /usr/local/share/emacs/27.0.50/lisp/org/ob-C
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-compat
hides /usr/local/share/emacs/27.0.50/lisp/org/org-compat

Features:
(shadow sort mail-extr emacsbug sendmail helm-c-yasnippet
evil-indent-plus hippie-exp org-eldoc evil-org org-table ob-groovy ob-js
ob-python ob-java ob-C ob-scala ensime-expand-region expand-region-core
expand-region-custom ensime ensime-mode ensime-sbt sbt-mode
sbt-mode-rgrep sbt-mode-comint sbt-mode-buffer sbt-mode-project
sbt-mode-vars ensime-http ensime-ui ensime-semantic-highlight ensime-doc
ensime-search ensime-helm ensime-undo ensime-startup ensime-refactor
ensime-popup ensime-eldoc ensime-notes ensime-company ensime-editor
ensime-ivy ensime-model ivy delsel colir ivy-overlay popup ensime-debug
ensime-stacktrace ensime-inf ensime-overlay ensime-completion-util
ensime-config ensime-util ensime-client ensime-vars smartparens-scala
scala-mode scala-mode-prettify-symbols scala-mode-imenu scala-mode-map
scala-mode-fontlock scala-mode-indent scala-mode-paragraph
scala-mode-syntax scala-mode-lib arc-mode archive-mode ensime-macros
ob-shell ob-clojure org-bullets org-download toc-org image-file org-eww
org-rmail org-mhe org-irc org-info org-gnus nnir gnus-sum shr svg dom
gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source
utf7 netrc nnoo gnus-spec gnus-int gnus-range gnus-win gnus nnheader
org-docview doc-view image-mode exif org-bibtex bibtex org-bbdb org-w3m
smartparens-org orgit org-element avl-tree org ob ob-tangle ob-ref
ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint ob-keys
org-pcomplete org-list org-faces org-entities org-version ob-emacs-lisp
ob-core ob-eval org-compat org-macs org-loaddefs cal-menu calendar
cal-loaddefs helm-projectile eieio-opt mwim pulse cursor-sensor
company-go go-mode find-file helm-ag dired-aux drupal-mode
drupal/emacs-drush drupal/flycheck drupal/phpcs drupal/ispell
drupal/etags drupal/eldoc sql php-mode speedbar sb-image ezimage dframe
cc-langs php-face php php-project diff-hl-dired diff-hl vc-dir dired-x
gravatar url-cache misearch multi-isearch semantic/find helm-semantic
helm-imenu semantic/util-modes semantic/util semantic semantic/tag
semantic/lex semantic/fw mode-local cedet jka-compr ffap helm-swoop
vc-mtn vc-hg mule-util magit-extras fill-column-indicator
helm-spacemacs-help helm-command helm-elisp helm-eval edebug backtrace
magit-gitflow evil-magit git-rebase forge-list forge-commands forge-semi
forge-bitbucket buck forge-gogs gogs forge-gitea gtea forge-gitlab glab
forge-github ghub-graphql treepy gsexp ghub gnutls forge-notify
forge-revnote forge-pullreq forge-issue forge-topic forge-post
forge-repo forge forge-core forge-db closql emacsql-sqlite emacsql
emacsql-compiler magit-bookmark magit-submodule magit-obsolete
magit-popup magit-blame magit-stash magit-reflog magit-bisect magit-push
magit-pull magit-fetch magit-clone magit-remote magit-commit
magit-sequence magit-notes magit-worktree magit-tag magit-merge
magit-branch magit-reset magit-files magit-refs magit-status magit
magit-repos magit-apply magit-wip magit-log which-func magit-diff
diminish smerge-mode magit-core magit-autorevert magit-margin
magit-transient magit-process magit-mode transient flx helm-x-files
helm-for-files helm-bookmark helm-adaptive helm-info bookmark pp
helm-external helm-net evil-surround whitespace tabify helm-fasd
helm-descbinds helm-mode helm-files helm-buffers helm-occur helm-tags
helm-locate helm-grep helm-regexp helm-utils helm-help helm-types
helm-flx helm helm-source helm-multi-match helm-lib vc-git diff-mode
vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs vc vc-dispatcher dap-java
dap-mouse dap-ui gdb-mi gud bui bui-list bui-info bui-entry bui-core
bui-history bui-button bui-utils tree-mode dap-mode dap-overlays lsp-ui
lsp-ui-doc lsp-ui-imenu lsp-ui-peek lsp-ui-sideline view company-lsp
flycheck-rust lsp-ui-flycheck lsp-clients lsp-pwsh lsp-terraform
lsp-yaml lsp-vhdl lsp-haxe lsp-erlang lsp-fsharp lsp-metals lsp-elm
lsp-dart lsp-clojure lsp-go lsp-xml lsp-css lsp-intelephense lsp-vetur
lsp-html lsp-solargraph lsp-rust lsp-pyls lsp-java request lsp lsp-mode
ewoc smartparens-markdown markdown-mode color spinner network-stream
inline em-glob esh-util dash-functional bindat flymake-proc flymake
gradle-mode maven-test-mode company-c-headers cc-mode cc-fonts cc-guess
cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs
editorconfig-core editorconfig-core-handle editorconfig-fnmatch
git-gutter-fringe+ fringe-helper git-gutter+ git-commit with-editor
async-bytecomp async server magit-git magit-section magit-utils crm
log-edit message rfc822 mml mml-sec epa gnus-util rmail rmail-loaddefs
text-property-search mailabbrev mail-utils gmm-utils mailheader
pcvs-util add-log face-remap spacemacs-purpose-popwin window-purpose-x
imenu-list dired dired-loaddefs window-purpose window-purpose-fixes
window-purpose-prefix-overload window-purpose-switch
window-purpose-layout window-purpose-core window-purpose-configuration
window-purpose-utils evil-escape projectile grep ibuf-ext ibuffer
ibuffer-loaddefs tramp-sh docker-tramp tramp-cache tramp tramp-loaddefs
trampver tramp-integration files-x tramp-compat parse-time iso8601
time-date ls-lisp recentf tree-widget evil-better-visual-line
company-files company-keywords company-etags company-gtags
company-dabbrev-code company-dabbrev company-semantic company-template
company-capf php-extras company overseer pkg-info url-http url url-proxy
url-privacy url-expand url-methods url-history mailcap url-auth
url-cookie url-domsuf url-util url-gw nsm rmc puny epl compile
auto-compile packed elisp-slime-nav etags fileloop generator xref
project flycheck-package package-lint let-alist imenu finder
cider-eval-sexp-fu eval-sexp-fu goto-addr bug-reference
auto-highlight-symbol evil-lisp-state flycheck-pos-tip pos-tip flycheck
find-func highlight-numbers parent-mode highlight-parentheses hideshow
rainbow-delimiters yasnippet-snippets clojure-snippets yasnippet
evil-cleverparens evil-cleverparens-text-objects evil-cleverparens-util
smartparens-config smartparens-text smartparens paredit
persistent-scratch winner xterm-color spacemacs-whitespace-cleanup
ws-butler winum vi-tilde-fringe symbol-overlay string-inflection
saveplace savehist popwin persp-mode noflet cl-indent hl-todo fasd
eyebrowse evil-unimpaired evil-textobj-line evil-mc
evil-mc-command-execute evil-mc-command-record evil-mc-cursor-make
evil-mc-region evil-mc-cursor-state evil-mc-undo evil-mc-vars
evil-mc-known-commands evil-mc-common evil-anzu anzu editorconfig
noutline outline doom-modeline doom-modeline-segments doom-modeline-env
doom-modeline-core shrink-path f s dash all-the-icons
all-the-icons-faces data-material data-weathericons data-octicons
data-fileicons data-faicons data-alltheicons memoize clean-aindent-mode
clang-format xml helm-easymenu gh-common marshal drupal/pcomplete
hybrid-mode evil-evilified-state which-key use-package
use-package-ensure use-package-delight use-package-diminish
use-package-bind-key bind-key use-package-core hydra lv cus-edit
cus-start cus-load evil evil-keybindings evil-integration undo-tree diff
evil-maps evil-commands reveal flyspell ispell evil-jumps
evil-command-window evil-types evil-search evil-ex shell pcomplete
comint ansi-color evil-macros evil-repeat evil-states evil-core
evil-common windmove thingatpt rect evil-digraphs evil-vars ring
bind-map quelpa mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047
rfc2045 mm-util ietf-drums mail-prsvr lisp-mnt help-fns radix-tree
hl-line xt-mouse autorevert filenotify cl-extra disp-table wid-edit
spacemacs-dark-theme spacemacs-common format-spec info finder-inf
ido-vertical-mode ido core-spacemacs core-use-package-ext
core-transient-state core-micro-state core-toggle core-keybindings
core-fonts-support core-themes-support core-display-init core-jump
core-release-management core-custom-settings core-configuration-layer
eieio-compat core-progress-bar core-spacemacs-buffer core-funcs ht cl
help-mode warnings package browse-url url-handlers url-parse auth-source
cl-seq password-cache json map url-vars seq eieio byte-opt bytecomp
byte-compile cconv eieio-core eieio-loaddefs epg epg-config
core-command-line pcase core-debug edmacro kmacro derived cl-macs gv
profiler easymenu cl-loaddefs cl-lib core-hooks page-break-lines
easy-mmode core-env load-env-vars rx core-dotspacemacs advice
core-emacs-backports subr-x core-dumper tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads dbusbind inotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 1748405 1637619)
 (symbols 48 124025 14)
 (strings 32 353167 161247)
 (string-bytes 1 11869694)
 (vectors 16 146728)
 (vector-slots 8 3379598 989814)
 (floats 8 1585 12951)
 (intervals 56 79951 27733)
 (buffers 1000 123))

--000000000000547bdf0598597355
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">As per post-self-insert-hook documentation.<br><br>&gt; Ho=
ok run at the end of `self-insert-command&#39;.<br>&gt; This is run after i=
nserting the character.<br><br>This does not hold by default in cc-mode due=
 to the following mapped by default functions:<br><br>&gt; (define-key c-mo=
de-base-map &quot;#&quot; =C2=A0 =C2=A0 =C2=A0 =C2=A0 &#39;c-electric-pound=
)<br>&gt; (define-key c-mode-base-map &quot;{&quot; =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 &#39;c-electric-brace)<br>&gt; (define-key c-mode-base-map &quot;}&q=
uot; =C2=A0 =C2=A0 =C2=A0 =C2=A0 &#39;c-electric-brace)<br>&gt; (define-key=
 c-mode-base-map &quot;/&quot; =C2=A0 =C2=A0 =C2=A0 =C2=A0 &#39;c-electric-=
slash)<br>&gt; (define-key c-mode-base-map &quot;*&quot; =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 &#39;c-electric-star)<br>&gt; (define-key c-mode-base-map &quot;=
;&quot; =C2=A0 =C2=A0 =C2=A0 =C2=A0 &#39;c-electric-semi&amp;comma)<br>&gt;=
 (define-key c-mode-base-map &quot;,&quot; =C2=A0 =C2=A0 =C2=A0 =C2=A0 &#39=
;c-electric-semi&amp;comma)<br>&gt; (define-key c-mode-base-map &quot;:&quo=
t; =C2=A0 =C2=A0 =C2=A0 =C2=A0 &#39;c-electric-colon)<br>&gt; (define-key c=
-mode-base-map &quot;(&quot; =C2=A0 =C2=A0 =C2=A0 =C2=A0 &#39;c-electric-pa=
ren)<br>&gt; (define-key c-mode-base-map &quot;)&quot; =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 &#39;c-electric-paren)<br><br>All of these functions (or at least m=
ajority) contain the following lines:<div><br>&gt; (let (post-self-insert-h=
ook)	; Disable random functionality.<br>&gt;=C2=A0 =C2=A0 =C2=A0 (self-inse=
rt-command (prefix-numeric-value arg)))<br><br><div>Possible fixes:<br><br>=
1. Do not bind the functions by default.<br>2. Rewrite them so they do not =
inhibit post-self-insert-hook functions.</div><div><br></div><div>In GNU Em=
acs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.1)<br>=C2=A0of=
 2019-11-23 built on kyoncho-H87-D3H<br>Repository revision: 8934762bb37273=
e6606097de92dcc2556456acd2<br>Repository branch: master<br>Windowing system=
 distributor &#39;The X.Org Foundation&#39;, version 11.0.12001000<br>Syste=
m Description: Linux Mint 19.1<br><br>Configured using:<br>=C2=A0&#39;confi=
gure --with-modules --with-json&#39;<br><br>Configured features:<br>XPM JPE=
G TIFF GIF PNG SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY GNUTLS<br>LIBXML2 F=
REETYPE HARFBUZZ XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM<br>MODULES =
THREADS JSON PDUMPER GMP<br><br>Important settings:<br>=C2=A0 value of $LC_=
CTYPE: en_US.UTF-8<br>=C2=A0 value of $LC_MONETARY: bg_BG.UTF-8<br>=C2=A0 v=
alue of $LC_NUMERIC: bg_BG.UTF-8<br>=C2=A0 value of $LANG: en_US.UTF-8<br>=
=C2=A0 value of $XMODIFIERS: @im=3Dibus<br>=C2=A0 locale-coding-system: utf=
-8-unix<br><br>Major mode: Emacs-Lisp<br><br>Minor modes in effect:<br>=C2=
=A0 helm-spacemacs-help-mode: t<br>=C2=A0 global-magit-file-mode: t<br>=C2=
=A0 global-evil-surround-mode: t<br>=C2=A0 evil-surround-mode: t<br>=C2=A0 =
helm-descbinds-mode: t<br>=C2=A0 helm-mode: t<br>=C2=A0 helm-flx-mode: t<br=
>=C2=A0 dap-tooltip-mode: t<br>=C2=A0 dap-ui-mode: t<br>=C2=A0 gdb-many-win=
dows: t<br>=C2=A0 dap-mode: t<br>=C2=A0 gradle-mode: t<br>=C2=A0 global-git=
-gutter+-mode: t<br>=C2=A0 global-git-commit-mode: t<br>=C2=A0 async-byteco=
mp-package-mode: t<br>=C2=A0 pupo-mode: t<br>=C2=A0 purpose-mode: t<br>=C2=
=A0 evil-escape-mode: t<br>=C2=A0 projectile-mode: t<br>=C2=A0 recentf-mode=
: t<br>=C2=A0 company-mode: t<br>=C2=A0 auto-compile-mode: t<br>=C2=A0 elis=
p-slime-nav-mode: t<br>=C2=A0 eval-sexp-fu-flash-mode: t<br>=C2=A0 goto-add=
ress-prog-mode: t<br>=C2=A0 bug-reference-prog-mode: t<br>=C2=A0 auto-highl=
ight-symbol-mode: t<br>=C2=A0 flycheck-pos-tip-mode: t<br>=C2=A0 global-fly=
check-mode: t<br>=C2=A0 highlight-numbers-mode: t<br>=C2=A0 highlight-paren=
theses-mode: t<br>=C2=A0 rainbow-delimiters-mode: t<br>=C2=A0 yas-global-mo=
de: t<br>=C2=A0 yas-minor-mode: t<br>=C2=A0 evil-cleverparens-mode: t<br>=
=C2=A0 show-smartparens-global-mode: t<br>=C2=A0 show-smartparens-mode: t<b=
r>=C2=A0 smartparens-mode: t<br>=C2=A0 persistent-scratch-autosave-mode: t<=
br>=C2=A0 winner-mode: t<br>=C2=A0 global-spacemacs-whitespace-cleanup-mode=
: t<br>=C2=A0 spacemacs-whitespace-cleanup-mode: t<br>=C2=A0 winum-mode: t<=
br>=C2=A0 global-vi-tilde-fringe-mode: t<br>=C2=A0 save-place-mode: t<br>=
=C2=A0 savehist-mode: t<br>=C2=A0 persp-mode: t<br>=C2=A0 global-hl-todo-mo=
de: t<br>=C2=A0 hl-todo-mode: t<br>=C2=A0 global-fasd-mode: t<br>=C2=A0 eye=
browse-mode: t<br>=C2=A0 evil-mc-mode: t<br>=C2=A0 global-anzu-mode: t<br>=
=C2=A0 anzu-mode: t<br>=C2=A0 editorconfig-mode: t<br>=C2=A0 doom-modeline-=
mode: t<br>=C2=A0 clean-aindent-mode: t<br>=C2=A0 hybrid-mode: t<br>=C2=A0 =
which-key-mode: t<br>=C2=A0 override-global-mode: t<br>=C2=A0 global-undo-t=
ree-mode: t<br>=C2=A0 undo-tree-mode: t<br>=C2=A0 shell-dirtrack-mode: t<br=
>=C2=A0 evil-mode: t<br>=C2=A0 evil-local-mode: t<br>=C2=A0 spacemacs-leade=
r-override-mode: t<br>=C2=A0 global-spacemacs-leader-override-mode: t<br>=
=C2=A0 global-hl-line-mode: t<br>=C2=A0 xterm-mouse-mode: t<br>=C2=A0 globa=
l-auto-revert-mode: t<br>=C2=A0 ido-vertical-mode: t<br>=C2=A0 global-page-=
break-lines-mode: t<br>=C2=A0 page-break-lines-mode: t<br>=C2=A0 tooltip-mo=
de: t<br>=C2=A0 global-eldoc-mode: t<br>=C2=A0 eldoc-mode: t<br>=C2=A0 elec=
tric-indent-mode: t<br>=C2=A0 mouse-wheel-mode: t<br>=C2=A0 file-name-shado=
w-mode: t<br>=C2=A0 global-font-lock-mode: t<br>=C2=A0 font-lock-mode: t<br=
>=C2=A0 auto-composition-mode: t<br>=C2=A0 auto-encryption-mode: t<br>=C2=
=A0 auto-compression-mode: t<br>=C2=A0 buffer-read-only: t<br>=C2=A0 column=
-number-mode: t<br>=C2=A0 line-number-mode: t<br>=C2=A0 transient-mark-mode=
: t<br>=C2=A0 hs-minor-mode: t<br><br>Load-path shadows:<br>/home/kyoncho/.=
emacs.d/elpa/27.0/develop/ht-20190924.704/ht hides /home/kyoncho/.emacs.d/c=
ore/libs/ht<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20=
191111/ob-exp hides /usr/local/share/emacs/27.0.50/lisp/org/ob-exp<br>/home=
/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-footnote =
hides /usr/local/share/emacs/27.0.50/lisp/org/org-footnote<br>/home/kyoncho=
/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-scheme hides /usr/=
local/share/emacs/27.0.50/lisp/org/ob-scheme<br>/home/kyoncho/.emacs.d/elpa=
/27.0/develop/org-plus-contrib-20191111/org-entities hides /usr/local/share=
/emacs/27.0.50/lisp/org/org-entities<br>/home/kyoncho/.emacs.d/elpa/27.0/de=
velop/org-plus-contrib-20191111/ob-clojure hides /usr/local/share/emacs/27.=
0.50/lisp/org/ob-clojure<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-pl=
us-contrib-20191111/ox-odt hides /usr/local/share/emacs/27.0.50/lisp/org/ox=
-odt<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/=
ob-ledger hides /usr/local/share/emacs/27.0.50/lisp/org/ob-ledger<br>/home/=
kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ox-man hides /=
usr/local/share/emacs/27.0.50/lisp/org/ox-man<br>/home/kyoncho/.emacs.d/elp=
a/27.0/develop/org-plus-contrib-20191111/org-duration hides /usr/local/shar=
e/emacs/27.0.50/lisp/org/org-duration<br>/home/kyoncho/.emacs.d/elpa/27.0/d=
evelop/org-plus-contrib-20191111/ob-core hides /usr/local/share/emacs/27.0.=
50/lisp/org/ob-core<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-co=
ntrib-20191111/ob-css hides /usr/local/share/emacs/27.0.50/lisp/org/ob-css<=
br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ox-or=
g hides /usr/local/share/emacs/27.0.50/lisp/org/ox-org<br>/home/kyoncho/.em=
acs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-sass hides /usr/local/=
share/emacs/27.0.50/lisp/org/ob-sass<br>/home/kyoncho/.emacs.d/elpa/27.0/de=
velop/org-plus-contrib-20191111/ob-maxima hides /usr/local/share/emacs/27.0=
.50/lisp/org/ob-maxima<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus=
-contrib-20191111/ob-matlab hides /usr/local/share/emacs/27.0.50/lisp/org/o=
b-matlab<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191=
111/ob-ebnf hides /usr/local/share/emacs/27.0.50/lisp/org/ob-ebnf<br>/home/=
kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-ocaml hides=
 /usr/local/share/emacs/27.0.50/lisp/org/ob-ocaml<br>/home/kyoncho/.emacs.d=
/elpa/27.0/develop/org-plus-contrib-20191111/ox-ascii hides /usr/local/shar=
e/emacs/27.0.50/lisp/org/ox-ascii<br>/home/kyoncho/.emacs.d/elpa/27.0/devel=
op/org-plus-contrib-20191111/ob-lilypond hides /usr/local/share/emacs/27.0.=
50/lisp/org/ob-lilypond<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plu=
s-contrib-20191111/ox-md hides /usr/local/share/emacs/27.0.50/lisp/org/ox-m=
d<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org=
-timer hides /usr/local/share/emacs/27.0.50/lisp/org/org-timer<br>/home/kyo=
ncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-calc hides /us=
r/local/share/emacs/27.0.50/lisp/org/ob-calc<br>/home/kyoncho/.emacs.d/elpa=
/27.0/develop/org-plus-contrib-20191111/org-macro hides /usr/local/share/em=
acs/27.0.50/lisp/org/org-macro<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/=
org-plus-contrib-20191111/org-attach hides /usr/local/share/emacs/27.0.50/l=
isp/org/org-attach<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-con=
trib-20191111/ob-plantuml hides /usr/local/share/emacs/27.0.50/lisp/org/ob-=
plantuml<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191=
111/org-element hides /usr/local/share/emacs/27.0.50/lisp/org/org-element<b=
r>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-ew=
w hides /usr/local/share/emacs/27.0.50/lisp/org/org-eww<br>/home/kyoncho/.e=
macs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-crypt hides /usr/loc=
al/share/emacs/27.0.50/lisp/org/org-crypt<br>/home/kyoncho/.emacs.d/elpa/27=
.0/develop/org-plus-contrib-20191111/ob-forth hides /usr/local/share/emacs/=
27.0.50/lisp/org/ob-forth<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-p=
lus-contrib-20191111/org-clock hides /usr/local/share/emacs/27.0.50/lisp/or=
g/org-clock<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20=
191111/org-colview hides /usr/local/share/emacs/27.0.50/lisp/org/org-colvie=
w<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org=
-w3m hides /usr/local/share/emacs/27.0.50/lisp/org/org-w3m<br>/home/kyoncho=
/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-src hides /usr/lo=
cal/share/emacs/27.0.50/lisp/org/org-src<br>/home/kyoncho/.emacs.d/elpa/27.=
0/develop/org-plus-contrib-20191111/ob-vala hides /usr/local/share/emacs/27=
.0.50/lisp/org/ob-vala<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus=
-contrib-20191111/ob-stan hides /usr/local/share/emacs/27.0.50/lisp/org/ob-=
stan<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/=
org-gnus hides /usr/local/share/emacs/27.0.50/lisp/org/org-gnus<br>/home/ky=
oncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-fortran hides=
 /usr/local/share/emacs/27.0.50/lisp/org/ob-fortran<br>/home/kyoncho/.emacs=
.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-lob hides /usr/local/shar=
e/emacs/27.0.50/lisp/org/ob-lob<br>/home/kyoncho/.emacs.d/elpa/27.0/develop=
/org-plus-contrib-20191111/ob-processing hides /usr/local/share/emacs/27.0.=
50/lisp/org/ob-processing<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-p=
lus-contrib-20191111/org-mobile hides /usr/local/share/emacs/27.0.50/lisp/o=
rg/org-mobile<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-=
20191111/ob-groovy hides /usr/local/share/emacs/27.0.50/lisp/org/ob-groovy<=
br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-h=
abit hides /usr/local/share/emacs/27.0.50/lisp/org/org-habit<br>/home/kyonc=
ho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-shen hides /usr/=
local/share/emacs/27.0.50/lisp/org/ob-shen<br>/home/kyoncho/.emacs.d/elpa/2=
7.0/develop/org-plus-contrib-20191111/ob-lua hides /usr/local/share/emacs/2=
7.0.50/lisp/org/ob-lua<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus=
-contrib-20191111/ob-ruby hides /usr/local/share/emacs/27.0.50/lisp/org/ob-=
ruby<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/=
org-info hides /usr/local/share/emacs/27.0.50/lisp/org/org-info<br>/home/ky=
oncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-mouse hides =
/usr/local/share/emacs/27.0.50/lisp/org/org-mouse<br>/home/kyoncho/.emacs.d=
/elpa/27.0/develop/org-plus-contrib-20191111/org-archive hides /usr/local/s=
hare/emacs/27.0.50/lisp/org/org-archive<br>/home/kyoncho/.emacs.d/elpa/27.0=
/develop/org-plus-contrib-20191111/org-rmail hides /usr/local/share/emacs/2=
7.0.50/lisp/org/org-rmail<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-p=
lus-contrib-20191111/ob-comint hides /usr/local/share/emacs/27.0.50/lisp/or=
g/ob-comint<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20=
191111/ob-io hides /usr/local/share/emacs/27.0.50/lisp/org/ob-io<br>/home/k=
yoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-hledger hide=
s /usr/local/share/emacs/27.0.50/lisp/org/ob-hledger<br>/home/kyoncho/.emac=
s.d/elpa/27.0/develop/org-plus-contrib-20191111/org-id hides /usr/local/sha=
re/emacs/27.0.50/lisp/org/org-id<br>/home/kyoncho/.emacs.d/elpa/27.0/develo=
p/org-plus-contrib-20191111/ob-octave hides /usr/local/share/emacs/27.0.50/=
lisp/org/ob-octave<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-con=
trib-20191111/ob-ref hides /usr/local/share/emacs/27.0.50/lisp/org/ob-ref<b=
r>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-tab=
le hides /usr/local/share/emacs/27.0.50/lisp/org/ob-table<br>/home/kyoncho/=
.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ox-beamer hides /usr/l=
ocal/share/emacs/27.0.50/lisp/org/ox-beamer<br>/home/kyoncho/.emacs.d/elpa/=
27.0/develop/org-plus-contrib-20191111/ob-picolisp hides /usr/local/share/e=
macs/27.0.50/lisp/org/ob-picolisp<br>/home/kyoncho/.emacs.d/elpa/27.0/devel=
op/org-plus-contrib-20191111/org-agenda hides /usr/local/share/emacs/27.0.5=
0/lisp/org/org-agenda<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-=
contrib-20191111/ob-python hides /usr/local/share/emacs/27.0.50/lisp/org/ob=
-python<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-201911=
11/ob-makefile hides /usr/local/share/emacs/27.0.50/lisp/org/ob-makefile<br=
>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ox-texi=
nfo hides /usr/local/share/emacs/27.0.50/lisp/org/ox-texinfo<br>/home/kyonc=
ho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-gnuplot hides /u=
sr/local/share/emacs/27.0.50/lisp/org/ob-gnuplot<br>/home/kyoncho/.emacs.d/=
elpa/27.0/develop/org-plus-contrib-20191111/org-lint hides /usr/local/share=
/emacs/27.0.50/lisp/org/org-lint<br>/home/kyoncho/.emacs.d/elpa/27.0/develo=
p/org-plus-contrib-20191111/ox-publish hides /usr/local/share/emacs/27.0.50=
/lisp/org/ox-publish<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-c=
ontrib-20191111/org-version hides /usr/local/share/emacs/27.0.50/lisp/org/o=
rg-version<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-201=
91111/ob-perl hides /usr/local/share/emacs/27.0.50/lisp/org/ob-perl<br>/hom=
e/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-eshell h=
ides /usr/local/share/emacs/27.0.50/lisp/org/org-eshell<br>/home/kyoncho/.e=
macs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-tangle hides /usr/loc=
al/share/emacs/27.0.50/lisp/org/ob-tangle<br>/home/kyoncho/.emacs.d/elpa/27=
.0/develop/org-plus-contrib-20191111/org-ctags hides /usr/local/share/emacs=
/27.0.50/lisp/org/org-ctags<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org=
-plus-contrib-20191111/ob-eval hides /usr/local/share/emacs/27.0.50/lisp/or=
g/ob-eval<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-2019=
1111/ox-latex hides /usr/local/share/emacs/27.0.50/lisp/org/ox-latex<br>/ho=
me/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-keys hid=
es /usr/local/share/emacs/27.0.50/lisp/org/ob-keys<br>/home/kyoncho/.emacs.=
d/elpa/27.0/develop/org-plus-contrib-20191111/ob-java hides /usr/local/shar=
e/emacs/27.0.50/lisp/org/ob-java<br>/home/kyoncho/.emacs.d/elpa/27.0/develo=
p/org-plus-contrib-20191111/org-macs hides /usr/local/share/emacs/27.0.50/l=
isp/org/org-macs<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contr=
ib-20191111/ob-awk hides /usr/local/share/emacs/27.0.50/lisp/org/ob-awk<br>=
/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-abc h=
ides /usr/local/share/emacs/27.0.50/lisp/org/ob-abc<br>/home/kyoncho/.emacs=
.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-asymptote hides /usr/loca=
l/share/emacs/27.0.50/lisp/org/ob-asymptote<br>/home/kyoncho/.emacs.d/elpa/=
27.0/develop/org-plus-contrib-20191111/ob-org hides /usr/local/share/emacs/=
27.0.50/lisp/org/ob-org<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plu=
s-contrib-20191111/ob-js hides /usr/local/share/emacs/27.0.50/lisp/org/ob-j=
s<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org=
-plot hides /usr/local/share/emacs/27.0.50/lisp/org/org-plot<br>/home/kyonc=
ho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-indent hides /u=
sr/local/share/emacs/27.0.50/lisp/org/org-indent<br>/home/kyoncho/.emacs.d/=
elpa/27.0/develop/org-plus-contrib-20191111/org-table hides /usr/local/shar=
e/emacs/27.0.50/lisp/org/org-table<br>/home/kyoncho/.emacs.d/elpa/27.0/deve=
lop/org-plus-contrib-20191111/ob-sql hides /usr/local/share/emacs/27.0.50/l=
isp/org/ob-sql<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib=
-20191111/ob-screen hides /usr/local/share/emacs/27.0.50/lisp/org/ob-screen=
<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-d=
ot hides /usr/local/share/emacs/27.0.50/lisp/org/ob-dot<br>/home/kyoncho/.e=
macs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-coq hides /usr/local/=
share/emacs/27.0.50/lisp/org/ob-coq<br>/home/kyoncho/.emacs.d/elpa/27.0/dev=
elop/org-plus-contrib-20191111/org-pcomplete hides /usr/local/share/emacs/2=
7.0.50/lisp/org/org-pcomplete<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/o=
rg-plus-contrib-20191111/ob-mscgen hides /usr/local/share/emacs/27.0.50/lis=
p/org/ob-mscgen<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contri=
b-20191111/org-irc hides /usr/local/share/emacs/27.0.50/lisp/org/org-irc<br=
>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-late=
x hides /usr/local/share/emacs/27.0.50/lisp/org/ob-latex<br>/home/kyoncho/.=
emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ox hides /usr/local/sha=
re/emacs/27.0.50/lisp/org/ox<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/or=
g-plus-contrib-20191111/org-capture hides /usr/local/share/emacs/27.0.50/li=
sp/org/org-capture<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-con=
trib-20191111/org hides /usr/local/share/emacs/27.0.50/lisp/org/org<br>/hom=
e/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-feed hid=
es /usr/local/share/emacs/27.0.50/lisp/org/org-feed<br>/home/kyoncho/.emacs=
.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-shell hides /usr/local/sh=
are/emacs/27.0.50/lisp/org/ob-shell<br>/home/kyoncho/.emacs.d/elpa/27.0/dev=
elop/org-plus-contrib-20191111/org-protocol hides /usr/local/share/emacs/27=
.0.50/lisp/org/org-protocol<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org=
-plus-contrib-20191111/ob-R hides /usr/local/share/emacs/27.0.50/lisp/org/o=
b-R<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/o=
b-ditaa hides /usr/local/share/emacs/27.0.50/lisp/org/ob-ditaa<br>/home/kyo=
ncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ox-icalendar hide=
s /usr/local/share/emacs/27.0.50/lisp/org/ox-icalendar<br>/home/kyoncho/.em=
acs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-sed hides /usr/local/s=
hare/emacs/27.0.50/lisp/org/ob-sed<br>/home/kyoncho/.emacs.d/elpa/27.0/deve=
lop/org-plus-contrib-20191111/ob-lisp hides /usr/local/share/emacs/27.0.50/=
lisp/org/ob-lisp<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contr=
ib-20191111/org-datetree hides /usr/local/share/emacs/27.0.50/lisp/org/org-=
datetree<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191=
111/org-install hides /usr/local/share/emacs/27.0.50/lisp/org/org-install<b=
r>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-lo=
addefs hides /usr/local/share/emacs/27.0.50/lisp/org/org-loaddefs<br>/home/=
kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-sqlite hide=
s /usr/local/share/emacs/27.0.50/lisp/org/ob-sqlite<br>/home/kyoncho/.emacs=
.d/elpa/27.0/develop/org-plus-contrib-20191111/org-bibtex hides /usr/local/=
share/emacs/27.0.50/lisp/org/org-bibtex<br>/home/kyoncho/.emacs.d/elpa/27.0=
/develop/org-plus-contrib-20191111/ob-J hides /usr/local/share/emacs/27.0.5=
0/lisp/org/ob-J<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contri=
b-20191111/org-inlinetask hides /usr/local/share/emacs/27.0.50/lisp/org/org=
-inlinetask<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20=
191111/org-mhe hides /usr/local/share/emacs/27.0.50/lisp/org/org-mhe<br>/ho=
me/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-emacs-li=
sp hides /usr/local/share/emacs/27.0.50/lisp/org/ob-emacs-lisp<br>/home/kyo=
ncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-faces hides /=
usr/local/share/emacs/27.0.50/lisp/org/org-faces<br>/home/kyoncho/.emacs.d/=
elpa/27.0/develop/org-plus-contrib-20191111/org-docview hides /usr/local/sh=
are/emacs/27.0.50/lisp/org/org-docview<br>/home/kyoncho/.emacs.d/elpa/27.0/=
develop/org-plus-contrib-20191111/ox-html hides /usr/local/share/emacs/27.0=
.50/lisp/org/ox-html<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-c=
ontrib-20191111/ob hides /usr/local/share/emacs/27.0.50/lisp/org/ob<br>/hom=
e/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-list hid=
es /usr/local/share/emacs/27.0.50/lisp/org/org-list<br>/home/kyoncho/.emacs=
.d/elpa/27.0/develop/org-plus-contrib-20191111/ob-haskell hides /usr/local/=
share/emacs/27.0.50/lisp/org/ob-haskell<br>/home/kyoncho/.emacs.d/elpa/27.0=
/develop/org-plus-contrib-20191111/org-bbdb hides /usr/local/share/emacs/27=
.0.50/lisp/org/org-bbdb<br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plu=
s-contrib-20191111/ob-C hides /usr/local/share/emacs/27.0.50/lisp/org/ob-C<=
br>/home/kyoncho/.emacs.d/elpa/27.0/develop/org-plus-contrib-20191111/org-c=
ompat hides /usr/local/share/emacs/27.0.50/lisp/org/org-compat<br><br>Featu=
res:<br>(shadow sort mail-extr emacsbug sendmail helm-c-yasnippet<br>evil-i=
ndent-plus hippie-exp org-eldoc evil-org org-table ob-groovy ob-js<br>ob-py=
thon ob-java ob-C ob-scala ensime-expand-region expand-region-core<br>expan=
d-region-custom ensime ensime-mode ensime-sbt sbt-mode<br>sbt-mode-rgrep sb=
t-mode-comint sbt-mode-buffer sbt-mode-project<br>sbt-mode-vars ensime-http=
 ensime-ui ensime-semantic-highlight ensime-doc<br>ensime-search ensime-hel=
m ensime-undo ensime-startup ensime-refactor<br>ensime-popup ensime-eldoc e=
nsime-notes ensime-company ensime-editor<br>ensime-ivy ensime-model ivy del=
sel colir ivy-overlay popup ensime-debug<br>ensime-stacktrace ensime-inf en=
sime-overlay ensime-completion-util<br>ensime-config ensime-util ensime-cli=
ent ensime-vars smartparens-scala<br>scala-mode scala-mode-prettify-symbols=
 scala-mode-imenu scala-mode-map<br>scala-mode-fontlock scala-mode-indent s=
cala-mode-paragraph<br>scala-mode-syntax scala-mode-lib arc-mode archive-mo=
de ensime-macros<br>ob-shell ob-clojure org-bullets org-download toc-org im=
age-file org-eww<br>org-rmail org-mhe org-irc org-info org-gnus nnir gnus-s=
um shr svg dom<br>gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail =
mail-source<br>utf7 netrc nnoo gnus-spec gnus-int gnus-range gnus-win gnus =
nnheader<br>org-docview doc-view image-mode exif org-bibtex bibtex org-bbdb=
 org-w3m<br>smartparens-org orgit org-element avl-tree org ob ob-tangle ob-=
ref<br>ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint ob-k=
eys<br>org-pcomplete org-list org-faces org-entities org-version ob-emacs-l=
isp<br>ob-core ob-eval org-compat org-macs org-loaddefs cal-menu calendar<b=
r>cal-loaddefs helm-projectile eieio-opt mwim pulse cursor-sensor<br>compan=
y-go go-mode find-file helm-ag dired-aux drupal-mode<br>drupal/emacs-drush =
drupal/flycheck drupal/phpcs drupal/ispell<br>drupal/etags drupal/eldoc sql=
 php-mode speedbar sb-image ezimage dframe<br>cc-langs php-face php php-pro=
ject diff-hl-dired diff-hl vc-dir dired-x<br>gravatar url-cache misearch mu=
lti-isearch semantic/find helm-semantic<br>helm-imenu semantic/util-modes s=
emantic/util semantic semantic/tag<br>semantic/lex semantic/fw mode-local c=
edet jka-compr ffap helm-swoop<br>vc-mtn vc-hg mule-util magit-extras fill-=
column-indicator<br>helm-spacemacs-help helm-command helm-elisp helm-eval e=
debug backtrace<br>magit-gitflow evil-magit git-rebase forge-list forge-com=
mands forge-semi<br>forge-bitbucket buck forge-gogs gogs forge-gitea gtea f=
orge-gitlab glab<br>forge-github ghub-graphql treepy gsexp ghub gnutls forg=
e-notify<br>forge-revnote forge-pullreq forge-issue forge-topic forge-post<=
br>forge-repo forge forge-core forge-db closql emacsql-sqlite emacsql<br>em=
acsql-compiler magit-bookmark magit-submodule magit-obsolete<br>magit-popup=
 magit-blame magit-stash magit-reflog magit-bisect magit-push<br>magit-pull=
 magit-fetch magit-clone magit-remote magit-commit<br>magit-sequence magit-=
notes magit-worktree magit-tag magit-merge<br>magit-branch magit-reset magi=
t-files magit-refs magit-status magit<br>magit-repos magit-apply magit-wip =
magit-log which-func magit-diff<br>diminish smerge-mode magit-core magit-au=
torevert magit-margin<br>magit-transient magit-process magit-mode transient=
 flx helm-x-files<br>helm-for-files helm-bookmark helm-adaptive helm-info b=
ookmark pp<br>helm-external helm-net evil-surround whitespace tabify helm-f=
asd<br>helm-descbinds helm-mode helm-files helm-buffers helm-occur helm-tag=
s<br>helm-locate helm-grep helm-regexp helm-utils helm-help helm-types<br>h=
elm-flx helm helm-source helm-multi-match helm-lib vc-git diff-mode<br>vc-b=
zr vc-src vc-sccs vc-svn vc-cvs vc-rcs vc vc-dispatcher dap-java<br>dap-mou=
se dap-ui gdb-mi gud bui bui-list bui-info bui-entry bui-core<br>bui-histor=
y bui-button bui-utils tree-mode dap-mode dap-overlays lsp-ui<br>lsp-ui-doc=
 lsp-ui-imenu lsp-ui-peek lsp-ui-sideline view company-lsp<br>flycheck-rust=
 lsp-ui-flycheck lsp-clients lsp-pwsh lsp-terraform<br>lsp-yaml lsp-vhdl ls=
p-haxe lsp-erlang lsp-fsharp lsp-metals lsp-elm<br>lsp-dart lsp-clojure lsp=
-go lsp-xml lsp-css lsp-intelephense lsp-vetur<br>lsp-html lsp-solargraph l=
sp-rust lsp-pyls lsp-java request lsp lsp-mode<br>ewoc smartparens-markdown=
 markdown-mode color spinner network-stream<br>inline em-glob esh-util dash=
-functional bindat flymake-proc flymake<br>gradle-mode maven-test-mode comp=
any-c-headers cc-mode cc-fonts cc-guess<br>cc-menus cc-cmds cc-styles cc-al=
ign cc-engine cc-vars cc-defs<br>editorconfig-core editorconfig-core-handle=
 editorconfig-fnmatch<br>git-gutter-fringe+ fringe-helper git-gutter+ git-c=
ommit with-editor<br>async-bytecomp async server magit-git magit-section ma=
git-utils crm<br>log-edit message rfc822 mml mml-sec epa gnus-util rmail rm=
ail-loaddefs<br>text-property-search mailabbrev mail-utils gmm-utils mailhe=
ader<br>pcvs-util add-log face-remap spacemacs-purpose-popwin window-purpos=
e-x<br>imenu-list dired dired-loaddefs window-purpose window-purpose-fixes<=
br>window-purpose-prefix-overload window-purpose-switch<br>window-purpose-l=
ayout window-purpose-core window-purpose-configuration<br>window-purpose-ut=
ils evil-escape projectile grep ibuf-ext ibuffer<br>ibuffer-loaddefs tramp-=
sh docker-tramp tramp-cache tramp tramp-loaddefs<br>trampver tramp-integrat=
ion files-x tramp-compat parse-time iso8601<br>time-date ls-lisp recentf tr=
ee-widget evil-better-visual-line<br>company-files company-keywords company=
-etags company-gtags<br>company-dabbrev-code company-dabbrev company-semant=
ic company-template<br>company-capf php-extras company overseer pkg-info ur=
l-http url url-proxy<br>url-privacy url-expand url-methods url-history mail=
cap url-auth<br>url-cookie url-domsuf url-util url-gw nsm rmc puny epl comp=
ile<br>auto-compile packed elisp-slime-nav etags fileloop generator xref<br=
>project flycheck-package package-lint let-alist imenu finder<br>cider-eval=
-sexp-fu eval-sexp-fu goto-addr bug-reference<br>auto-highlight-symbol evil=
-lisp-state flycheck-pos-tip pos-tip flycheck<br>find-func highlight-number=
s parent-mode highlight-parentheses hideshow<br>rainbow-delimiters yasnippe=
t-snippets clojure-snippets yasnippet<br>evil-cleverparens evil-cleverparen=
s-text-objects evil-cleverparens-util<br>smartparens-config smartparens-tex=
t smartparens paredit<br>persistent-scratch winner xterm-color spacemacs-wh=
itespace-cleanup<br>ws-butler winum vi-tilde-fringe symbol-overlay string-i=
nflection<br>saveplace savehist popwin persp-mode noflet cl-indent hl-todo =
fasd<br>eyebrowse evil-unimpaired evil-textobj-line evil-mc<br>evil-mc-comm=
and-execute evil-mc-command-record evil-mc-cursor-make<br>evil-mc-region ev=
il-mc-cursor-state evil-mc-undo evil-mc-vars<br>evil-mc-known-commands evil=
-mc-common evil-anzu anzu editorconfig<br>noutline outline doom-modeline do=
om-modeline-segments doom-modeline-env<br>doom-modeline-core shrink-path f =
s dash all-the-icons<br>all-the-icons-faces data-material data-weathericons=
 data-octicons<br>data-fileicons data-faicons data-alltheicons memoize clea=
n-aindent-mode<br>clang-format xml helm-easymenu gh-common marshal drupal/p=
complete<br>hybrid-mode evil-evilified-state which-key use-package<br>use-p=
ackage-ensure use-package-delight use-package-diminish<br>use-package-bind-=
key bind-key use-package-core hydra lv cus-edit<br>cus-start cus-load evil =
evil-keybindings evil-integration undo-tree diff<br>evil-maps evil-commands=
 reveal flyspell ispell evil-jumps<br>evil-command-window evil-types evil-s=
earch evil-ex shell pcomplete<br>comint ansi-color evil-macros evil-repeat =
evil-states evil-core<br>evil-common windmove thingatpt rect evil-digraphs =
evil-vars ring<br>bind-map quelpa mm-decode mm-bodies mm-encode mail-parse =
rfc2231 rfc2047<br>rfc2045 mm-util ietf-drums mail-prsvr lisp-mnt help-fns =
radix-tree<br>hl-line xt-mouse autorevert filenotify cl-extra disp-table wi=
d-edit<br>spacemacs-dark-theme spacemacs-common format-spec info finder-inf=
<br>ido-vertical-mode ido core-spacemacs core-use-package-ext<br>core-trans=
ient-state core-micro-state core-toggle core-keybindings<br>core-fonts-supp=
ort core-themes-support core-display-init core-jump<br>core-release-managem=
ent core-custom-settings core-configuration-layer<br>eieio-compat core-prog=
ress-bar core-spacemacs-buffer core-funcs ht cl<br>help-mode warnings packa=
ge browse-url url-handlers url-parse auth-source<br>cl-seq password-cache j=
son map url-vars seq eieio byte-opt bytecomp<br>byte-compile cconv eieio-co=
re eieio-loaddefs epg epg-config<br>core-command-line pcase core-debug edma=
cro kmacro derived cl-macs gv<br>profiler easymenu cl-loaddefs cl-lib core-=
hooks page-break-lines<br>easy-mmode core-env load-env-vars rx core-dotspac=
emacs advice<br>core-emacs-backports subr-x core-dumper tooltip eldoc elect=
ric uniquify<br>ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win=
<br>term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe<br>t=
abulated-list replace newcomment text-mode elisp-mode lisp-mode<br>prog-mod=
e register page tab-bar menu-bar rfn-eshadow isearch timer<br>select scroll=
-bar mouse jit-lock font-lock syntax facemenu font-core<br>term/tty-colors =
frame minibuffer cl-generic cham georgian utf-8-lang<br>misc-lang vietnames=
e tibetan thai tai-viet lao korean japanese eucjp-ms<br>cp51932 hebrew gree=
k romanian slovak czech european ethiopic indian<br>cyrillic chinese compos=
ite charscript charprop case-table epa-hook<br>jka-cmpr-hook help simple ab=
brev obarray cl-preloaded nadvice loaddefs<br>button faces cus-face macroex=
p files text-properties overlay sha1 md5<br>base64 format env code-pages mu=
le custom widget hashtable-print-readable<br>backquote threads dbusbind ino=
tify dynamic-setting system-font-setting<br>font-render-setting move-toolba=
r gtk x-toolkit x multi-tty<br>make-network-process emacs)<br><br>Memory in=
formation:<br>((conses 16 1748405 1637619)<br>=C2=A0(symbols 48 124025 14)<=
br>=C2=A0(strings 32 353167 161247)<br>=C2=A0(string-bytes 1 11869694)<br>=
=C2=A0(vectors 16 146728)<br>=C2=A0(vector-slots 8 3379598 989814)<br>=C2=
=A0(floats 8 1585 12951)<br>=C2=A0(intervals 56 79951 27733)<br>=C2=A0(buff=
ers 1000 123))<br></div></div></div>

--000000000000547bdf0598597355--




Acknowledgement sent to yyoncho <yyoncho@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#38406; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 8 Dec 2019 02:45:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.