From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Dimech Newsgroups: gmane.emacs.help Subject: Re: Rainbow-delimiters highlighting { and } for tex and latex Date: Thu, 8 Sep 2022 15:25:23 +0200 Message-ID: References: <87wnae5aj4.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33636"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , wilnerthomas@tutanota.com, help-gnu-emacs@gnu.org To: Alessandro Bertulli Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 08 15:26:37 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 1oWHYC-0008Xs-TH for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 08 Sep 2022 15:26:36 +0200 Original-Received: from localhost ([::1]:44108 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oWHYB-0000Ha-UM for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 08 Sep 2022 09:26:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54530) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWHXB-0000Dv-Ph for help-gnu-emacs@gnu.org; Thu, 08 Sep 2022 09:25:36 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:38375) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWHX8-000242-SO for help-gnu-emacs@gnu.org; Thu, 08 Sep 2022 09:25:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1662643523; bh=fuC5eq4QMq/58PNrQT4i/FiWdPEemadDOihxNe++TJY=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=EHLSWZ+MSAh8pMRh45hj2r6KEfN16F/M+07yw2mUc3YfMBjVWsXN2quNN7n6vEzbL JMKcy/XwPmTlBBYYTWR1MjVyhir4vc9bnfg8xcmtUW0QQnXuny7WIi88DYEbDlGL0S HC12dwviRi7MAVoprtk6q92j5VfMrsQLYPHt5pdo= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [92.251.127.164] ([92.251.127.164]) by web-mail.gmx.net (3c-app-mailcom-bs16.server.lan [172.19.170.184]) (via HTTP); Thu, 8 Sep 2022 15:25:23 +0200 Importance: normal Sensitivity: Normal In-Reply-To: <87wnae5aj4.fsf@gmail.com> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:suKrahtlVpqUS/g+Qrw16U7Bqf/W2ENXg+xgK06zubmn4C3MWSRdlk/WizSdN2jG/ta4t SZxRz4gNhWJ34fXUlEnVR0mfpgWDkGzAghGXxfPbgLFLbpHdp6vXq7sIFL295/KvZOneHCK9142R fJyLN9T8oegT7IxQt9Qzf8Y5HxQ0w2tugwHI0onwGwFsq1Pf41vowcIlfa1OSM73nA5m/GfirT9O gmc9BmaSJJhH7GcRbCClYQTE/v09RWyaRDOF2G62rKZteE4mMGo4WY66l3nJ0HH5IHLwP3T26++I 80= X-UI-Out-Filterresults: notjunk:1;V03:K0:jh3FowcTdCs=:sW/qfdPBx7RvaRhLqi/E6/ 9wcyHaAgGAoLowwjavfHkIKJFkgvs+lcoMSmUSOGUtanwtJ96nGGbZvEjhTa+zYnO0fF1GUrD icDAW+31t42bw72wuiVYYgpkMMI7jP3j+Z1EaD4I5IyaRJAZEyv7KpS9xm4d5JgEOVibRPnRw hcKdRNubZg26RlNuRlJG24QFBFe2SNTqqaiUgel0PPzgkb0Hxw0G0PjFwzn3pVqoUSQgh8r9D ugjhpGcl9qzVxQGQ+tJF8V0VI2cFkNglLL12iPx+y8pzalixpf4lHNliksLfudedYUKQZyzZ8 91PiREbdZ+6Pli8I2kMStSjaf8nfRAn0hiBOOYUNAIkIRY7iqcIt0W/yDqD1Q86ZgNPBNO0Lo Op+3QbYWL/yiiniZ0QyRdPW4O/FBhEl9ZI6OQBan303hQkInKEcExS6Fcp7NSJgR9OMLMpgTf ASpihXAHd+gQNk3kZe+6NW+ZY15BOSd/lrlmGsMqIWxKpA9EHeO/QLZzP09t8HxdXteoUSQTJ 3hw6w1w76qRUFBSXz6QAvxgy9v9skaEaeAUe5NbXYH89fS9s9cUaPUCmTyhUaihtNsjD7x5lX 6ilm1RikAVrjm0K0k+B3+mCtDXjkj5ThTuV1njZAn6N15Jj0ai71biPB1ODWC7QvmzhzSBy0L wPDKdQKn7B86nmvlL5lMHL+YHE0CVUrJnxh0MLzxTsMRqYup6PqIVSx7PEKOexpRLbnSAo0aZ QB3yhl+INQm1djtIRO8PufwyOpsmIOCTCBAilh7J5+2kbjcCsU1RS7MdF9GGgOMfOtzZjsZX Received-SPF: pass client-ip=212.227.17.22; envelope-from=dimech@gmx.com; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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:139327 Archived-At: > Sent: Friday, September 09, 2022 at 12:08 AM > From: "Alessandro Bertulli" > To: "Christopher Dimech" > Cc: "Stefan Monnier" , wilnerthomas@tutanota.c= om, help-gnu-emacs@gnu.org > Subject: Re: Rainbow-delimiters highlighting { and } for tex and latex > > > > Have scrutinised this. The problem is the atrocious design around the= implementation > > of tex and latex major modes. > > > > This will work > > > > (add-to-list 'auto-mode-alist '("\\.sty\\'" . LaTeX-mode)) > > (add-hook 'LaTeX-mode-hook #'rainbow-delimiters-mode) > > > > But this will not > > > > (add-to-list 'auto-mode-alist '("\\.sty\\'" . latex-mode)) > > (add-hook 'latex-mode-hook #'rainbow-delimiters-mode) > > I don't want to add more fuel, but just to clear a bit: latex-mode and > tex-mode are the modes set up by vanilla Emacs. AUCTeX, which is an > awesome package to provide a quick yet powerful LaTeX IDE in Emacs, > provides LaTeX-mode and TeX-mode (note the capitalization). Is it > confusing? Unfortunately, yes it is. The plan would be to integrate the functionality of AUCTeX into tex-mode and latex-mode, even though there can be a core AUCTeX file. The problems associated with the separate functionality has been discussed with Carsten Dominik about his "cdlatex" rapid tools. There is agreement on the need for thinking a new scheme through. > > Work needs to be done so that there is just "tex-mode" and "latex-mode= ", > > and getting rid with all this TeX-mode", "LaTeX-mode", TeX-mode-hook, > > LaTeX-mode-hook, nonsense. > > I agree, but I guess the point is to not break compatibility with old > codebases. I wonder if defining some aliases would work tho. I would say that users expect emacs to honour the contents of auto-mode-al= ist. > > Tools are supposed to work well together but this is not the case with > > "tex-related" modes. > > Actually they do, once corrected this thing. Probably you have > auto-mode-alist set up so that .tex/.sty files are opened in LaTeX-mode, > so latex-mode-hook is never actually run. Is this your problem, maybe? > Anyway, I'm glad you got it work. > > -- > Alessandro Bertulli There is a solution but is very time consuming to realise what is happenin= g. Especially for users who rely on many tools and packages.