all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: Ert batch-mode error
Date: Mon, 13 Apr 2020 13:47:50 -0400	[thread overview]
Message-ID: <jwveesrnv4s.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: CAM-tV-_ZsNFpdj8kGBU-hLpr=x_eGHwW1oBAti3p2wnXw2-jxw@mail.gmail.com

>> But looking at yasnippet-tests.el, I'm not sure what's going on:
>> the only case where font-lock seems to be relevant is
>> `do-yas-org-native-tab-in-source-block` (and it already uses
>> `font-lock-ensure` when available).  So (barring compatibility with
>> Emacs<24 for which you still need the non-font-lock-ensure version),
>> would the patch below still perform the tests correctly?
>
> As far as I can tell, the problem actually seems to be 24.3 specific,
> so yes, assuming you meant <=24 rather than <24. In 24.3, the
> following triggers an error when run interactively, but there is no
> error in --batch mode, or when using with-temp-buffer (this is a
> reduction from yasnippet's example-for-issue-474 test). That was the
> motivation for adding yas--with-font-locked-temp-buffer (and I just
> threw it in for all cc-mode related tests, just in case).
>
>     (setq debug-on-error t)
>     (with-current-buffer (get-buffer-create "foo") ;with-temp-buffer
>       (c-mode)
>       (insert "#include <foo>\n")
>       (narrow-to-region (point) (point))
>       (insert "`\"TODO: \"`")
>       (delete-region (point-min) (point-max))
>       (insert "TODO: "))

So, IIUC example-for-issue-474 failed in Emacs-24.3, because of a bug in
CC-mode.  Not sure why yasnippet cares, but in any case, I'd recommend
you put a comment there to clarify it.


        Stefan




      reply	other threads:[~2020-04-13 17:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-06  9:11 Ert batch-mode error Andreas Röhler
2020-04-06 22:55 ` Noam Postavsky
2020-04-07  3:50   ` Stefan Monnier
2020-04-08  6:47     ` Andreas Röhler
2020-04-13 14:50     ` Noam Postavsky
2020-04-13 17:47       ` Stefan Monnier [this message]

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=jwveesrnv4s.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=help-gnu-emacs@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 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.