From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.help Subject: Re: Ert batch-mode error Date: Mon, 13 Apr 2020 10:50:52 -0400 Message-ID: References: <087407fd-d0a3-af4e-938d-522f0cdb698b@easy-emacs.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="72142"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Help Gnu Emacs mailing list To: Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 13 16:51:40 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jO0R1-000If3-4T for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 13 Apr 2020 16:51:39 +0200 Original-Received: from localhost ([::1]:45120 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jO0R0-0005Qo-6w for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 13 Apr 2020 10:51:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51266) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jO0QY-0005O4-2t for help-gnu-emacs@gnu.org; Mon, 13 Apr 2020 10:51:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jO0QX-0004P1-3S for help-gnu-emacs@gnu.org; Mon, 13 Apr 2020 10:51:10 -0400 Original-Received: from mail-oi1-x234.google.com ([2607:f8b0:4864:20::234]:38388) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jO0QW-0004Oc-Tf for help-gnu-emacs@gnu.org; Mon, 13 Apr 2020 10:51:09 -0400 Original-Received: by mail-oi1-x234.google.com with SMTP id x21so1338696oic.5 for ; Mon, 13 Apr 2020 07:51:08 -0700 (PDT) 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=XUAyuVckfFnNeDshIXP6oNmexiuCmOZRuMcr71UEsMk=; b=kDl65gXwhLeONuVSg/n670sCKDvaZgYrV8FiFoVz7FlBbpz7qN/x7N76MQ5fYvDdyF XujeFWHKEB4aK2kDcscgr65DvfPU8JTh44sopeWl38uyvE7YQqaJgmDfNrWrDpN/75u2 g/bbY1pbOz/JFIzmPHAxi5a5ENCBMVSci/HvBnV14J2fD2KPRtnXLER4ath8voZGkcd3 02tejaTvpP9YZFjcQcXpkxK+AZ/bZuBepibmn//8mV+nlrNEdkY8ifvcDgep/4HXh0LO LLz18b6x09qm6nqJniWyOWjMu8CeTaDImsxjni2kwlpF/7UOIYC3jJ24lifwn3uqFlNr kR+Q== 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=XUAyuVckfFnNeDshIXP6oNmexiuCmOZRuMcr71UEsMk=; b=srjU1nI59gXGoT9j7D4jDgi6eoetFqEUW46dNFc0bdd2gO2C/8M39fHQaxokYNHMjd hdIKwcEFgGFmQCXnPXPb7vrSEO2PVNBlbxSWj0eUe4azimx+QKB5/WsgkwEDQZw8rNDJ hmdZCHeErrSgjWqVXcLaUMUVtVQ7qHh72kaBAYICRkD4GlBBi5vhcI36PMlFY2S7kQer Qmzim8fSvjIPDaI6SOIWZ/32WSmTdaK8QdQJ/7CV1Uv4o1FTCe3xaiockOPnDaUCeQCY FRCfkNv+i1kn3ll76GwI0dZvXh52lUw0DP+aqMl76XbWQ4f4PJ/Drtxdu8ezeP2NA0Fm xO0w== X-Gm-Message-State: AGi0Pua21BCBV+in1sYGAt374zwgzFLqvLTEALBolpm+r+NdEGZ5pHH8 lizXDyPNpu3x3s5emEDVuA94XgteHhFLmJhJbMQ= X-Google-Smtp-Source: APiQypJF7gvzbOFyiHmeDXaYNm48ZznM62fb4fso3Ms6iQpOYY/sr8LG8QJ1FhayjhKg4YRiJNAvN/UMqE6AhNBYF70= X-Received: by 2002:aca:cf4b:: with SMTP id f72mr6765197oig.177.1586789467733; Mon, 13 Apr 2020 07:51:07 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::234 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:122802 Archived-At: On Mon, 6 Apr 2020 at 23:50, Stefan Monnier wrote: > 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 \n") (narrow-to-region (point) (point)) (insert "`\"TODO: \"`") (delete-region (point-min) (point-max)) (insert "TODO: "))