auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: \hyperref macro seems to confuse paren matching


From: jfbu
Subject: Re: \hyperref macro seems to confuse paren matching
Date: Wed, 8 Jun 2022 20:20:43 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

Hi Arash,


Le 08/06/2022 à 19:56, Arash Esbati a écrit :
Hi Jean-François,

jfbu <jfbu@free.fr> writes:

Thanks for looking into this.

Thanks for testing.

It does not seem to work with my set-up.

The screenshot is taken with .emacs file reduced to this

Ok, I fetched mic-paren.el (v3.15) from here[1] and did:

  • emacs -Q
  • evaled your code below adjusted to my HD
  • Opened a new .tex file and inserted your code, and it looks like
    this:



I suspect you still have somewhere some AUCTeX code which adds
"hyperref" to `LaTeX-verbatim-macros-with-braces-local'.  The value of
it looks like this in my test file:

   LaTeX-verbatim-macros-with-braces-local is a variable defined in ‘latex.el’.

   Its value is
   ("href" "hyperimage" "hyperbaseurl" "nolinkurl" "url" "path")
   Local in buffer hyperref-test.tex; global value is nil

Note that "hyperref" is missing.

Do have also AUCTeX installed from ELPA or auto-parse information from
your test file in auto/ directory?  These are things come to my mind as
source of trouble.


I was not and still am not located at my usual location for such things,
but I did correctly switch from en ELPA install to a git clone which
I did from scratch and then I (sort of) correctly configured a new .emacs
for bare minimals....

....alas as I am in the midst of a rather big project I created
my testlatex.tex file in a huerry in my big working repertory and never thought
about removing auto/

I can confirm removing auto/ then gives the hoped for behaviour...


(add-hook 'LaTeX-mode-hook
          '(lambda nil
             (paren-toggle-matching-quoted-paren 1)
             (paren-toggle-matching-paired-delimiter 1)
            )

You don't have to quote lambda, you can write this also like this:

(add-hook 'LaTeX-mode-hook
           (lambda nil
             (paren-toggle-matching-quoted-paren 1)
             (paren-toggle-matching-paired-delimiter 1)))



Thanks! I have had that elisp like for 15 years in a file read
by my .emacs but obviously I am as ignorant and certainly dumber
than in those days.  Quite possibly I copied-pasted from somewhere.

Thanks for going the effort to reproduce my locale setting.

It appears to work perfectly now for me.
Best,

Jean-François
PS: I read in a comment that I last updated my mic-paren in September 2012...
...and here is its version
;; Version: 3.10
;; Released: 2012-07-16

Best, Arash

Footnotes:
[1]  https://www.gnuvola.org/software/j/mic-paren/







reply via email to

[Prev in Thread] Current Thread [Next in Thread]