Rens Oliemans <[email protected]> writes: > The patch failed to apply,
Yes, that's because I went on and installed that change. > so I pulled again (using straight.el, which pulls from this mirror: > https://github.com/emacs-straight/auctex). After the pull, the patch > still doesn't apply. listings.el at the moment looks like this: > > (when (fboundp 'reftex-add-label-environments) > (reftex-add-label-environments > '(("lstlisting" ?l "lst:" "~\\ref{%s}" > LaTeX-keyval-caption-reftex-context-function > (regexp "[Ll]isting")) > ("\\lstinputlisting[]{}" ?l "lst:" "~\\ref{%s}" > LaTeX-keyval-caption-reftex-context-function > (regexp "[Ll]isting"))))) > > ;; Tell RefTeX about \lstinputlisting: > (when (and (boundp 'reftex-label-regexps) > (fboundp 'reftex-compile-variables)) > (let ((regexp (concat "\\\\lstinputlisting" > (LaTeX-extract-key-value-label "label" 1)))) > (unless (member regexp reftex-label-regexps) > (add-to-list (make-local-variable 'reftex-label-regexps) regexp t) > (reftex-compile-variables)))) This is the relevant change I installed, so you already have it. > A quick question before I commit a lot more time into this (I was in the > process of migrating away from straight.el but haven't fully picked that up > yet): May I ask why you're leaving straight behind? > is the code I sent above what should be on the main branch (so is it > to be expected that the patch doesn't apply on the latest code)? Just drop the patch I sent, use the code provided by straight; it is up-to-date, and you can start testing it without further ado. Just remember to reset any customizations to `reftex-label-regexps' and `reftex-label-alist' reg. \lstinputlisting and restart Emacs. > Thanks for the reply after all this time! You're welcome. Looking forward to your response. Best, Arash
