all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#20911: 24.5.3; Syntax should not require font-lock
@ 2015-06-27 15:19 Andreas Röhler
  2015-06-27 15:31 ` Dmitry Gutov
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Röhler @ 2015-06-27 15:19 UTC (permalink / raw)
  To: 20911

python.el and others.

While working at a general-close mode, tests succeeded locally, but 
Travis CI repeatedly sent errors like this:

FAILED gen-close-python-doublequoted-tqs-test
FAILED gen-close-python-singlequoted-tqs-test

for example from
https://travis-ci.org/emacs-berlin/general-close/builds/68578148

These tests succeed, if boolean gen-verbose-p was set to t, which OTOH 
isn't intendet at batch-mode.

Both macros in question -- for example gen-test-with-python-buffer-- 
have this:

    `(when gen-verbose-p
  (switch-to-buffer (current-buffer))
  (font-lock-fontify-buffer))`

AFAICS the error is caused, because TQS-syntax in python.el is set by 
syntax-propertize-function

Documentation:
Mode-specific function to apply syntax-table' text properties. It is the 
work horse ofsyntax-propertize', which is called by things like
Font-Lock and indentation.


Setting up syntax seems to require font-lock - which doesn't feel right.

;;;;;;;;;;

GNU Emacs 24.5.3 (i686-pc-linux-gnu, GTK+ Version 2.24.23) of 2015-04-20





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#20911: 24.5.3; Syntax should not require font-lock
  2015-06-27 15:19 bug#20911: 24.5.3; Syntax should not require font-lock Andreas Röhler
@ 2015-06-27 15:31 ` Dmitry Gutov
  2015-06-27 16:37   ` Dmitry Gutov
  0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Gutov @ 2015-06-27 15:31 UTC (permalink / raw)
  To: Andreas Röhler, 20911-done

Tags: notabug

Hi!

On 06/27/2015 06:19 PM, Andreas Röhler wrote:

> Both macros in question -- for example gen-test-with-python-buffer--
> have this:
>
>     `(when gen-verbose-p
>   (switch-to-buffer (current-buffer))
>   (font-lock-fontify-buffer))`

Don't do that, then.

> AFAICS the error is caused, because TQS-syntax in python.el is set by
> syntax-propertize-function

Call (syntax-propertize (point-max)) instead.

> Documentation:
> Mode-specific function to apply syntax-table' text properties. It is the
> work horse of `syntax-propertize', which is called by things like
> Font-Lock and indentation.
>
>
> Setting up syntax seems to require font-lock - which doesn't feel right.

That only says that font-lock requires it, not vice versa. The docstring 
even mentions `syntax-propertize'.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#20911: 24.5.3; Syntax should not require font-lock
  2015-06-27 15:31 ` Dmitry Gutov
@ 2015-06-27 16:37   ` Dmitry Gutov
  2015-06-27 16:40     ` Andreas Röhler
  0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Gutov @ 2015-06-27 16:37 UTC (permalink / raw)
  To: Andreas Röhler, 20911-done

On 06/27/2015 06:31 PM, Dmitry Gutov wrote:

> Call (syntax-propertize (point-max)) instead.

Further, this call should probably be in the code that relies on the 
added text properties, not in the test.

Adjust the actual argument as appropriate: most of the time you only 
need the current buffer propertized until the current position, not 
necessarily until the end (which might take more time).





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#20911: 24.5.3; Syntax should not require font-lock
  2015-06-27 16:37   ` Dmitry Gutov
@ 2015-06-27 16:40     ` Andreas Röhler
  2015-06-27 16:42       ` Dmitry Gutov
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Röhler @ 2015-06-27 16:40 UTC (permalink / raw)
  To: Dmitry Gutov, 20911-done


Am 27.06.2015 um 18:37 schrieb Dmitry Gutov:
> On 06/27/2015 06:31 PM, Dmitry Gutov wrote:
>
>> Call (syntax-propertize (point-max)) instead.
>
> Further, this call should probably be in the code that relies on the 
> added text properties, not in the test.

Maybe, but this adresses python.el and other probably.

My tests succeed by adding an extra fontify- in test buffer - which is a 
workaround.

>
> Adjust the actual argument as appropriate: most of the time you only 
> need the current buffer propertized until the current position, not 
> necessarily until the end (which might take more time).






^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#20911: 24.5.3; Syntax should not require font-lock
  2015-06-27 16:40     ` Andreas Röhler
@ 2015-06-27 16:42       ` Dmitry Gutov
  0 siblings, 0 replies; 5+ messages in thread
From: Dmitry Gutov @ 2015-06-27 16:42 UTC (permalink / raw)
  To: Andreas Röhler, 20911-done

On 06/27/2015 07:40 PM, Andreas Röhler wrote:

> Maybe, but this adresses python.el and other probably.

Feel free to open a relevant bug for each affected mode, with a 
reproduction scenario that starts with disabling font-lock.





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-06-27 16:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-27 15:19 bug#20911: 24.5.3; Syntax should not require font-lock Andreas Röhler
2015-06-27 15:31 ` Dmitry Gutov
2015-06-27 16:37   ` Dmitry Gutov
2015-06-27 16:40     ` Andreas Röhler
2015-06-27 16:42       ` Dmitry Gutov

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.