unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Clément Pit--Claudel" <clement.pit@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: Bug #22983 (syntax-ppss returns wrong result) is still open. Could we fix it before the release, please.
Date: Sun, 12 Jun 2016 21:44:35 -0400	[thread overview]
Message-ID: <575E1003.5070509@gmail.com> (raw)
In-Reply-To: <a482bfc8-0d04-c6fe-9ae0-8e5e7d8ac252@yandex.ru>


[-- Attachment #1.1: Type: text/plain, Size: 1401 bytes --]

On 2016-06-12 18:58, Dmitry Gutov wrote:
>> I have encountered no such problems in over 15 years of hacking
>> Emacs. I think you're seeing problems somewhere and blaming 
>> narrow-to-region/widen, when the real problem is somewhere else.
> 
> It's been a known problem for a while, and it has come up in multiple
> discussions over the last years.
> 
> The "real problem" is a matter of perspective. Some might argue that
> trying to use narrowing at all, for any purpose, is a bad idea, and
> then, of course, the right choice would be to use something else.

I can share one instance of running into issues with narrow-to-region. I was implementing a simple ‘presenter’ mode, such that special comments were used to delimit ‘slides’. The mode functioned by narrowing the buffer to regions delimited by these special comments. It was a very convenient way to page through code in front of an audience.

Unfortunately, this approach was not robust. I ran into issues with modes using (point-min) and (point-max) without widening, and thereby misplacing overlays. In the end things kept breaking, and I ended up implementing the same feature using two overlays with an invisible property, hiding everything before (respectively after) the region being shown. It was a pain.

Not sure whether this is a useful contribution :) In any case, that's one problem I ran into.

Clément.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2016-06-13  1:44 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-07 22:09 Bug #22983 (syntax-ppss returns wrong result) is still open. Could we fix it before the release, please Alan Mackenzie
2016-06-07 22:15 ` Dmitry Gutov
2016-06-07 22:48   ` Alan Mackenzie
2016-06-07 23:25     ` Dmitry Gutov
2016-06-11 10:07       ` Alan Mackenzie
2016-06-11 16:10         ` Dmitry Gutov
2016-06-11 19:50           ` Alan Mackenzie
2016-06-11 22:52             ` Dmitry Gutov
2016-06-12  9:34               ` Alan Mackenzie
2016-06-12 22:58                 ` Dmitry Gutov
2016-06-13  1:44                   ` Clément Pit--Claudel [this message]
2016-06-13 12:28                   ` Alan Mackenzie
2016-06-13 12:56                     ` Stefan Monnier
2016-06-13 13:28                       ` Drew Adams
2016-06-13 15:36                     ` Dmitry Gutov
2016-06-14 14:55                       ` Alan Mackenzie
2016-06-13 21:12           ` John Wiegley
2016-06-13 21:16     ` John Wiegley
2016-06-08 12:43 ` Stefan Monnier
2016-06-11 10:24   ` Alan Mackenzie
2016-06-11 15:00     ` Stefan Monnier
2016-06-11 16:29       ` Dmitry Gutov
2016-06-11 21:24         ` Stefan Monnier
2016-06-11 21:44           ` Alan Mackenzie
2016-06-11 21:49             ` Stefan Monnier
2016-06-11 22:13               ` Alan Mackenzie
2016-06-12  4:06                 ` Stefan Monnier
2016-06-11 22:17               ` Dmitry Gutov
2016-06-11 22:21             ` Dmitry Gutov
2016-06-11 16:32     ` Dmitry Gutov
2016-06-11 19:58       ` Alan Mackenzie
2016-06-11 22:28         ` Dmitry Gutov
2016-06-14  9:17         ` Andreas Röhler
2016-06-15 22:11           ` Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=575E1003.5070509@gmail.com \
    --to=clement.pit@gmail.com \
    --cc=emacs-devel@gnu.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).