all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Sam Halliday <sam.halliday@gmail.com>
Cc: 36432@debbugs.gnu.org
Subject: bug#36432: 26.2; SMIE does not request forward tokens when point is at point-max
Date: Sat, 29 Jun 2019 16:06:17 +0300	[thread overview]
Message-ID: <83tvc8fsmu.fsf@gnu.org> (raw)
In-Reply-To: <CALR_T9Cwde_5CfPaATpdLZ3yottcqoopq0gKgy50-jKBvHLG0A@mail.gmail.com> (message from Sam Halliday on Sat, 29 Jun 2019 13:51:31 +0100)

> From: Sam Halliday <sam.halliday@gmail.com>
> Date: Sat, 29 Jun 2019 13:51:31 +0100
> Cc: 36432@debbugs.gnu.org
> 
> > So you create an illusion of characters beyond the EOB?
> >
> > How would Emacs know this is the case?
> 
> When testing it is possible to keep polling the lexer until it returns
> nil when at point-max, rather than looking at `point-max` and giving
> up. I think that could work in general inside SMIE.
> https://gitlab.com/tseenshe/haskell-tng.el/blob/tng/test/haskell-tng-lexer-test.el

But SMIE is just an application on top of Emacs basic handling of
buffer positions.  The assumption that there can be nothing at EOB is
hardcoded into many Emacs primitives, into its display engine, and
into core Lisp infrastructure.  You are playing with fire trying to
force Emacs think there are some characters beyond EOB.  Just grep the
C sources for ZV, and you will see the enormous height of the hill you
will need to fight up.  I wouldn't recommend that to anyone.

It should be easier to modify SMIE to take characters from a string,
then you could put whatever you want into that string.  Or maybe SMIE
already supports reading from strings, I don't know.

> BTW, this also happens at the start of the buffer. SMIE doesn't ask
> for backwards tokens when at the beginning.

For the same basic reasons.





  reply	other threads:[~2019-06-29 13:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-29 12:14 bug#36432: 26.2; SMIE does not request forward tokens when point is at point-max Sam Halliday
2019-06-29 12:23 ` Eli Zaretskii
2019-06-29 12:34   ` Sam Halliday
2019-06-29 12:42     ` Eli Zaretskii
2019-06-29 12:51       ` Eli Zaretskii
2019-06-29 13:01         ` Sam Halliday
2019-06-29 13:08           ` Eli Zaretskii
2019-06-29 12:51       ` Sam Halliday
2019-06-29 13:06         ` Eli Zaretskii [this message]
2019-06-29 13:13           ` Sam Halliday
2019-06-29 13:43             ` Eli Zaretskii
2019-06-29 21:39 ` Stefan Monnier
2019-06-30  8:50   ` Sam Halliday

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=83tvc8fsmu.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=36432@debbugs.gnu.org \
    --cc=sam.halliday@gmail.com \
    /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.