GNU bug report logs - #28091
11.90.0; [PATCH] Fontification of ``this", and interaction with 'composition

Previous Next

Package: auctex;

Reported by: Ilya Zakharevich <nospam-abuse <at> ilyaz.org>

Date: Tue, 15 Aug 2017 00:11:01 UTC

Severity: normal

Tags: notabug, patch

Found in version 11.90.0

Done: Arash Esbati <arash <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 28091 in the body.
You can then email your comments to 28091 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-auctex <at> gnu.org:
bug#28091; Package auctex. (Tue, 15 Aug 2017 00:11:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ilya Zakharevich <nospam-abuse <at> ilyaz.org>:
New bug report received and forwarded. Copy sent to bug-auctex <at> gnu.org. (Tue, 15 Aug 2017 00:11:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ilya Zakharevich <nospam-abuse <at> ilyaz.org>
To: bug-auctex <at> gnu.org
Subject: 11.90.0; [PATCH] Fontification of ``this", and interaction with
 'composition
Date: Mon, 14 Aug 2017 17:10:21 -0700
a) The highlighting of ``this" is wrong (does not stop at the
   finishing quote).
b) Handling of super/subscripts is not compatible with 'composition;
   e.g., with
         latex-pretty-symbols.el
   or https://stackoverflow.com/questions/22937393/emacs-lisp-prettify-symbols-mode-for-latex?rq=1

The patch is appended.

Enjoy,
Ilya

Emacs  : GNU Emacs 25.1.1 (i686-w64-mingw32)
 of 2016-09-17
Package: 11.90.0

current state:
==============
(setq
 AUCTeX-date "2017-01-11"
 window-system 'w32
 LaTeX-version "2e"
 TeX-style-path '("~/.emacs.d/auctex"
		  "c:/Users/Vera/AppData/Roaming/.emacs.d/elpa/auctex-11.90.0/style" "c:/Users/Vera/AppData/Roaming/.emacs.d/auctex/auto" "c:/Users/Vera/AppData/Roaming/.emacs.d/auctex/style" "auto" "style")
 TeX-auto-save nil
 TeX-parse-self nil
 TeX-master t
 TeX-command-list '(("TeX"
		     "%(PDF)%(tex) %(file-line-error) %(extraopts) %`%S%(PDFout)%(mode)%' %t"
		     TeX-run-TeX nil
		     (plain-tex-mode ams-tex-mode texinfo-mode) :help
		     "Run plain TeX")
		    ("LaTeX" "%`%l%(mode)%' %t" TeX-run-TeX nil
		     (latex-mode doctex-mode) :help "Run LaTeX")
		    ("Makeinfo" "makeinfo %(extraopts) %t" TeX-run-compile nil
		     (texinfo-mode) :help "Run Makeinfo with Info output")
		    ("Makeinfo HTML" "makeinfo %(extraopts) --html %t"
		     TeX-run-compile nil (texinfo-mode) :help
		     "Run Makeinfo with HTML output")
		    ("AmSTeX" "amstex %(PDFout) %(extraopts) %`%S%(mode)%' %t"
		     TeX-run-TeX nil (ams-tex-mode) :help "Run AMSTeX")
		    ("ConTeXt"
		     "%(cntxcom) --once --texutil %(extraopts) %(execopts)%t"
		     TeX-run-TeX nil (context-mode) :help "Run ConTeXt once")
		    ("ConTeXt Full" "%(cntxcom) %(extraopts) %(execopts)%t"
		     TeX-run-TeX nil (context-mode) :help
		     "Run ConTeXt until completion")
		    ("BibTeX" "bibtex %s" TeX-run-BibTeX nil t :help
		     "Run BibTeX")
		    ("Biber" "biber %s" TeX-run-Biber nil t :help "Run Biber")
		    ("View" "%V" TeX-run-discard-or-function t t :help
		     "Run Viewer")
		    ("Print" "%p" TeX-run-command t t :help "Print the file")
		    ("Queue" "%q" TeX-run-background nil t :help
		     "View the printer queue" :visible TeX-queue-command)
		    ("File" "%(o?)dvips %d -o %f " TeX-run-dvips t t :help
		     "Generate PostScript file")
		    ("Dvips" "%(o?)dvips %d -o %f " TeX-run-dvips nil t :help
		     "Convert DVI file to PostScript")
		    ("Dvipdfmx" "dvipdfmx %d" TeX-run-dvipdfmx nil t :help
		     "Convert DVI file to PDF with dvipdfmx")
		    ("Ps2pdf" "ps2pdf %f" TeX-run-ps2pdf nil t :help
		     "Convert PostScript file to PDF")
		    ("Index" "makeindex %s" TeX-run-index nil t :help
		     "Run makeindex to create index file")
		    ("Xindy" "texindy %s" TeX-run-command nil t :help
		     "Run xindy to create index file")
		    ("Check" "lacheck %s" TeX-run-compile nil (latex-mode)
		     :help "Check LaTeX file for correctness")
		    ("ChkTeX" "chktex -v6 %s" TeX-run-compile nil (latex-mode)
		     :help "Check LaTeX file for common mistakes")
		    ("Spell" "(TeX-ispell-document \"\")" TeX-run-function nil
		     t :help "Spell-check the document")
		    ("Clean" "TeX-clean" TeX-run-function nil t :help
		     "Delete generated intermediate files")
		    ("Clean All" "(TeX-clean t)" TeX-run-function nil t :help
		     "Delete generated intermediate and output files")
		    ("Other" "" TeX-run-command t t :help
		     "Run an arbitrary command")
		    )
 )

--- font-latex.el-pre	2017-01-25 16:22:26.647520000 -0800
+++ font-latex.el	2017-08-13 21:54:42.256744000 -0700
@@ -1895,6 +1895,8 @@ set to french, and >>german<< (and 8-bit
 		 (nest-count 0)
 		 (point-of-surrender (+ beg font-latex-multiline-boundary)))
 	    ;; Find closing quote taking nested quotes into account.
+	    (if (equal closing-quote "''")
+		(setq closing-quote "''\\|\""))
 	    (while (progn
 		     (re-search-forward
 		      (concat opening-quote "\\|" closing-quote)
@@ -1957,7 +1959,8 @@ END marks boundaries for searching for q
   "Match subscript and superscript patterns up to LIMIT."
   (when (and font-latex-fontify-script
 	     (re-search-forward "[_^] *\\([^\n\\{}]\\|\
-\\\\\\([a-zA-Z@]+\\|[^ \t\n]\\)\\|\\({\\)\\)" limit t))
+\\\\\\([a-zA-Z@]+\\|[^ \t\n]\\)\\|\\({\\)\\)" limit t)
+	     (not (get-text-property (match-beginning 0) 'composition)))
     (if (and (not (memq font-latex-fontify-script '(multi-level invisible)))
 	     (font-latex-faces-present-p '(font-latex-subscript-face
 					   font-latex-superscript-face)))
@@ -1981,6 +1984,7 @@ END marks boundaries for searching for q
 (defun font-latex-match-script-chars (limit)
   "Match subscript and superscript chars up to LIMIT."
   (and (re-search-forward "[^_^]\\([_^]\\)" limit t)
+       (not (get-text-property (match-beginning 1) 'composition))
        (let ((pos (match-beginning 1)))
 	 (and (font-latex-faces-present-p 'font-latex-math-face pos)
 	      (not (font-latex-faces-present-p '(font-lock-constant-face




Information forwarded to bug-auctex <at> gnu.org:
bug#28091; Package auctex. (Sun, 20 Aug 2017 21:17:02 GMT) Full text and rfc822 format available.

Message #8 received at 28091 <at> debbugs.gnu.org (full text, mbox):

From: Arash Esbati <arash <at> gnu.org>
To: Ilya Zakharevich <nospam-abuse <at> ilyaz.org>
Cc: 28091 <at> debbugs.gnu.org
Subject: Re: bug#28091: 11.90.0;
 [PATCH] Fontification of ``this", and interaction with 'composition
Date: Sun, 20 Aug 2017 23:15:04 +0200
Ilya Zakharevich <nospam-abuse <at> ilyaz.org> writes:

> a) The highlighting of ``this" is wrong (does not stop at the
>    finishing quote).

Hi Ilya,

thanks for looking into this and the patch.  For the first part, I have
tendencies to keep the current state as " will give you different
results depending on font encoding, example:

--8<---------------cut here---------------start------------->8---
\documentclass{article}

\usepackage[OT1,T1]{fontenc}
\usepackage[utf8]{inputenc}

\setlength{\parindent}{0pt}

\begin{document}

The highlighting of ``this" is wrong \\
The highlighting of ``this'' is wrong

and

\fontencoding{OT1}\selectfont
The highlighting of ``this" is wrong \\
The highlighting of ``this'' is wrong

\end{document}
--8<---------------cut here---------------end--------------->8---

Run this file with pdflatex: With T1 encoding, " in .tex file gives " in
your output file.  '' results in ”.  So to be on the safe side, I think
'' is the way to go for Right Double Quotation Mark.

> b) Handling of super/subscripts is not compatible with 'composition;
>    e.g., with
>          latex-pretty-symbols.el
>    or https://stackoverflow.com/questions/22937393/emacs-lisp-prettify-symbols-mode-for-latex?rq=1
>
> The patch is appended.

I don't use this feature so I can't tell.  Others?

Best, Arash




Added tag(s) notabug. Request was from Arash Esbati <arash <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 03 Mar 2024 16:47:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 28091 <at> debbugs.gnu.org and Ilya Zakharevich <nospam-abuse <at> ilyaz.org> Request was from Arash Esbati <arash <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 03 Mar 2024 16:47:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 01 Apr 2024 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 24 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.