unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#29775: 26.0.90; Incorrect fontification within double-quoted parts in a TOML multi-line string
@ 2017-12-19 21:00 Kaushal Modi
  2018-01-07 16:08 ` Kaushal Modi
  0 siblings, 1 reply; 3+ messages in thread
From: Kaushal Modi @ 2017-12-19 21:00 UTC (permalink / raw)
  To: 29775; +Cc: tom


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

X-Debbugs-CC: tom@tromey.com

Hello Tom,

I am copying you on this bug report are you are the primary author of the
TOML Config major mode.

Thanks for the past improvements you made to the TOML mode fontification.
Today I ended up with a case where the double-quoted parts in a TOML
multi-line quote (""" ... """) does not look good (see the pasted/attached
image).

[image: image.png]
Below is a screenshot (might show up as attached image depending on your
email client) of a real-world use-case (I need to store a bit of HTML in
that multi-line string variable):

[image: image.png]
While that variable gets parsed correctly, the fontification style gives a
feeling that something is wrong with the syntax (when it's not).

Can a "nested string face" like the font-lock-doc-face applied to conf-mode
and conf-toml-mode in the below 3rd and final screenshot be applied to the
double-quoted parts in a multi-line TOML string?

[image: image.png]

Thanks!

In GNU Emacs 26.0.90 (build 33, x86_64-pc-linux-gnu, GTK+ Version 2.24.23)
 of 2017-12-19
Repository revision: 936136ecab567a2ca320df080595a5fd2693b4c3
Windowing system distributor 'The X.Org Foundation', version 11.0.60900000
System Description:    Red Hat Enterprise Linux Workstation release 6.6
(Santiago)

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Mark set
Saving file /home/kmodi/temp/test.toml...
Wrote /home/kmodi/temp/test.toml
Saving file /home/kmodi/temp/test.toml...
Wrote /home/kmodi/temp/test.toml

Configured using:
 'configure --with-modules
 --prefix=/home/kmodi/usr_local/apps/6/emacs/emacs-26
 '--program-transform-name=s/^ctags$/ctags_emacs/'
 --enable-checking=yes,glyphs --enable-check-lisp-object-type
 'CPPFLAGS=-I/home/kmodi/usr_local/6/include -I/usr/include/freetype2
 -I/usr/include' 'CFLAGS=-ggdb3 -O0' 'CXXFLAGS=-ggdb3 -O0'
 'LDFLAGS=-L/home/kmodi/usr_local/6/lib -L/home/kmodi/usr_local/6/lib64
 -ggdb3''

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK2 X11 MODULES

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=none
  locale-coding-system: utf-8-unix

Major mode: Conf[TOML]

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv
bytecomp byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils conf-mode elec-pair
time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote dbusbind inotify
dynamic-setting system-font-setting font-render-setting move-toolbar gtk
x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 97690 13970)
 (symbols 48 20935 1)
 (miscs 40 62 163)
 (strings 32 29120 1322)
 (string-bytes 1 786562)
 (vectors 16 14287)
 (vector-slots 8 509478 7892)
 (floats 8 51 117)
 (intervals 56 257 0)
 (buffers 992 11)
 (heap 1024 17883 862))

-- 

Kaushal Modi

[-- Attachment #1.2: Type: text/html, Size: 5739 bytes --]

[-- Attachment #2: image.png --]
[-- Type: image/png, Size: 19439 bytes --]

[-- Attachment #3: image.png --]
[-- Type: image/png, Size: 23426 bytes --]

[-- Attachment #4: image.png --]
[-- Type: image/png, Size: 22717 bytes --]

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

* bug#29775: 26.0.90; Incorrect fontification within double-quoted parts in a TOML multi-line string
  2017-12-19 21:00 bug#29775: 26.0.90; Incorrect fontification within double-quoted parts in a TOML multi-line string Kaushal Modi
@ 2018-01-07 16:08 ` Kaushal Modi
  2018-01-23 22:07   ` Kaushal Modi
  0 siblings, 1 reply; 3+ messages in thread
From: Kaushal Modi @ 2018-01-07 16:08 UTC (permalink / raw)
  To: 29775, Tom Tromey

[-- Attachment #1: Type: text/plain, Size: 258 bytes --]

Hi Tom,

This is just a nudge to check if you have time to look into this issue.

As the Conf[TOML] mode is brand new in upcoming emacs 26.1, it would be
awesome if this got fixed before its release.

Thanks again for this major mode! :)


-- 

Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 451 bytes --]

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

* bug#29775: 26.0.90; Incorrect fontification within double-quoted parts in a TOML multi-line string
  2018-01-07 16:08 ` Kaushal Modi
@ 2018-01-23 22:07   ` Kaushal Modi
  0 siblings, 0 replies; 3+ messages in thread
From: Kaushal Modi @ 2018-01-23 22:07 UTC (permalink / raw)
  To: 29775, Tom Tromey


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

Hello,

Today, I noticed another, but related, fontification issue with
triple-quoted strings in TOML. Strings starting with # is interpreted as
comment inside the triple-quoted strings too.

Here's an example:

favicon_code = """
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/manifest.json">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
<meta name="theme-color" content="#ffffff">
"""
It looks like this:

[image: image.png]


-- 

Kaushal Modi

[-- Attachment #1.2: Type: text/html, Size: 1230 bytes --]

[-- Attachment #2: image.png --]
[-- Type: image/png, Size: 28047 bytes --]

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

end of thread, other threads:[~2018-01-23 22:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-19 21:00 bug#29775: 26.0.90; Incorrect fontification within double-quoted parts in a TOML multi-line string Kaushal Modi
2018-01-07 16:08 ` Kaushal Modi
2018-01-23 22:07   ` Kaushal Modi

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).