all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: John Wiegley <jwiegley@gmail.com>
To: Alan Mackenzie <acm@muc.de>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
Subject: Re: New hook before-region-change-functions wanted
Date: Fri, 08 Sep 2017 16:07:37 +0100	[thread overview]
Message-ID: <m24lsdns92.fsf@newartisans.com> (raw)
In-Reply-To: <20170908144657.GA3463@ACM> (Alan Mackenzie's message of "Fri, 8 Sep 2017 14:46:57 +0000")

>>>>> "AM" == Alan Mackenzie <acm@muc.de> writes:

AM> I would like to implement a new abnormal hook,
AM> before-change-region-functions. It would be called just before a change in
AM> the buffer's restriction (i.e., from widen and from narrow-to-region) and
AM> each function on it would take two parameters, the beginning and end of
AM> the new region being set.

I'd call it before-change-restriction-functions, if we wanted the hook.  It
could have interesting uses beyond syntax-ppss too. I'm not sure, though.

AM> The reason I want it is as part of the solution to bug #22983 (syntax-ppss
AM> returns wrong result). I envisage two (or possibly more) mutually
AM> independent caches, and a switch being made to the appropriate cache when
AM> the region is changed. This switch would be made inside a function on
AM> before-change-region-functions.

I was talking to Stefan about syntax-ppss yesterday (in person!). He
acknowledged the bug in syntax-ppss, and said he would like to find a better
way to set the right stage for the fix, involving a more rational scheme for
narrowing (if I understood correctly). Perhaps I can encourage him to chime in
with what he was thinking, because I'd like to hear that before committing to
a new hook that solves one aspect of problem.

It'll likely be a few days before he's done traveling home and gets through
his backlog before we hear from him.

-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2



  reply	other threads:[~2017-09-08 15:07 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-08 14:46 New hook before-region-change-functions wanted Alan Mackenzie
2017-09-08 15:07 ` John Wiegley [this message]
2017-09-08 15:10 ` Eli Zaretskii
2017-09-08 15:12   ` Alan Mackenzie
2017-09-08 20:47 ` Dmitry Gutov
2017-09-09 13:46   ` Stefan Monnier
2017-09-08 22:22 ` Richard Stallman
2017-09-09  8:33   ` Alan Mackenzie
2017-09-10  2:44     ` Richard Stallman
2017-09-10  7:37       ` Alan Mackenzie
2017-09-11  1:17         ` Richard Stallman
2017-09-11 16:45           ` Alan Mackenzie
2017-09-12 15:46       ` Andreas Röhler
2017-09-09 13:44 ` Stefan Monnier
2017-09-10 18:53   ` Alan Mackenzie
2017-09-10 22:21     ` Stefan Monnier
2017-09-10 23:02       ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m24lsdns92.fsf@newartisans.com \
    --to=jwiegley@gmail.com \
    --cc=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.