From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arash Esbati Newsgroups: gmane.emacs.help Subject: Re: Rainbow-delimiters highlighting { and } for tex and latex Date: Fri, 09 Sep 2022 21:36:04 +0200 Message-ID: <86y1us5oij.fsf@gnu.org> References: <87wnae5aj4.fsf@gmail.com> <87k06e55im.fsf@gmail.com> <86sfl1vt1m.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38106"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 Cc: Alessandro Bertulli , Stefan Monnier , wilnerthomas@tutanota.com, help-gnu-emacs@gnu.org To: Christopher Dimech Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 09 21:36:58 2022 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 1oWjoA-0009jA-63 for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 09 Sep 2022 21:36:58 +0200 Original-Received: from localhost ([::1]:45122 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oWjo9-0003bl-9x for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 09 Sep 2022 15:36:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49530) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWjnm-0003bc-5m for help-gnu-emacs@gnu.org; Fri, 09 Sep 2022 15:36:34 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:48324) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWjnl-0000dC-0r; Fri, 09 Sep 2022 15:36:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=o4uw0kHK8Ugztx/SvoIO+yJGvgJVSfTqJnD8AYyxkU0=; b=fHJQVrbWIHis8pFaf1zH CCVu9UNbfGbxosUUW3jCqv52oPnKbIFlnEmxky3Ys56mfFARKMyCLjjfjv7pZjXDwnhHbKpuPexAS LyDnhC2LURxVn/c+WCXlo6a4g9MOiIo8BdNvdkG4kda8Z5zqc8aLdBAvOwL7r4p2a9/2KphUc/0hI dYWH61W7jEoqRm4mlQznXWQcGzma1W74U8wj6+MjOl1GlIzkzwTU5yujyjyNZqePC3g3OmYZ+M6Kq 7ajys1LaXrXgypcdR6x/wh14ukRfoqesi/ODw9tdculeDvjmy1pkRThWChVmBWfCYk9+7Vv4pHxni wc8K0+uK1B75SA==; Original-Received: from pd9fb77f7.dip0.t-ipconnect.de ([217.251.119.247]:51622 helo=MUTANT) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWjnk-0003Z5-6d; Fri, 09 Sep 2022 15:36:32 -0400 In-Reply-To: (Christopher Dimech's message of "Fri, 9 Sep 2022 14:33:52 +0200") X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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:139347 Archived-At: Christopher Dimech writes: > For instance, tex-mode and latex-mode do provide a preview tool that uses > "prettify-symbols". I don't understand how the sentence above fits to the next one. The feature "prettify-symbols" is there and working, so what do you want to change? > Being able to introduce keywords rapidly (more efficiently than can be > achieved with text completion) is also valuable for users, currently > provided by cdlatex. The problem with cdlatex is that it also depends > upon texmathp which currently forces users to either pick the file and > add it to their emacs configuration or install auctex. Which > immediately makes the various CamelCase version of modes and hooks > come up. This is admittedly a nuisance: If you want to use the stock tex-mode with cdlatex and you install AUCTeX via ELPA, AUCTeX will take over. Maybe the solution is to provide texmathp.el as an ELPA-package without AUCTeX. > The cdlatex functionality can be introduced into tex-mode and > latex-mode. Getting the community to improve it would be highly > beneficial if the possibilities are included as emacs built-in. You want to duplicate the code and/or functionality? > Auctex and Cdlatex could continue seperately, for more exotic features > like as today. I can't tell for cdlatex since I've never used it, but I don't consider many features provided by AUCTeX as exotic. > For auctex, the recommendation is to reject TeX-mode and LaTeX-mode > (and related hooks), using instead auctex-tex-mode and > auctex-latex-mode (and corresponding hooks). Personally, I think that ship has sailed; one could define some aliases, but I'm not sure if that is going towards a replacement. > In summary, the focus is on these things > > 1. Improve design of tex-mode and latex-mode such that common structures > are separated into a "core-file" applicable to both, with some minor > tweaks in tex-mode and latex-mode if requires. This is what AUCTeX does with tex.el and plain-tex.el, latex.el, context.el etc. > 2. Reevaluate the preview tool that uses prettify-symbols, to see whether > there exists possibility of improvement by looking how auctex does > things. AUCTeX is really dumb in this regard. From tex.el: ;; Prettify Symbols mode (require 'tex-mode) (setq-local prettify-symbols-alist tex--prettify-symbols-alist) (add-function :override (local 'prettify-symbols-compose-predicate) #'TeX--prettify-symbols-compose-p) and (defun TeX--prettify-symbols-compose-p (start end match) (and (tex--prettify-symbols-compose-p start end match) (not (let ((face (get-text-property end 'face))) (if (consp face) (memq 'font-latex-verbatim-face face) (eq face 'font-latex-verbatim-face)))))) Best, Arash