bug#70779: [PATCH] Emacs 30 and warning about missing lexical-binding declaration

2024-05-05 Thread Arash Esbati
Arash Esbati  writes:

> Arash Esbati  writes:
>
>> I suggest the following change to `TeX-auto-store' in tex.el:
>
> Which can be reduced to:
>
> diff --git a/tex.el b/tex.el
> index cda1d7f6..30f80c7e 100644
> --- a/tex.el
> +++ b/tex.el
> @@ -4267,6 +4267,7 @@ If TEX is a directory, generate style files for all 
> files in the directory."
>  (TeX-unload-style style)
>  (with-current-buffer (generate-new-buffer file)
>(erase-buffer)
> +  (insert ";;" (make-string 40 ?\s) "-*- lexical-binding: t; 
> -*-\n\n")
>(insert "(TeX-add-style-hook\n \""
>style "\"\n (lambda ()")
>(unless (string= tex-cmd-opts "")

That change in Emacs in reverted (d51de0c5d9), but still, I think we can
turn lexical-binding on in auto-parsed style files as well.  I will
install this in a day or two if there are no other comments.

Best, Arash



___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


bug#58005: 13.1.4; Can't work with indirect buffers

2024-05-05 Thread Arash Esbati
Vangelis Evangelou  writes:

> Hi all. I agree with Paul. Sorry for the oversight. For some reason,
> in my local installation, I have what Paul suggests, which is why I
> hadn't picked it up when I submitted the patch.

Thank you all for your comments.  I installed that change (0caa170649).

Best, Arash



___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


bug#58005: 13.1.4; Can't work with indirect buffers

2024-05-05 Thread Vangelis Evangelou
Hi all. I agree with Paul. Sorry for the oversight. For some reason, in my
local installation, I have what Paul suggests, which is why I hadn't picked
it up when I submitted the patch.

On Sun, 5 May 2024 at 04:04, Ikumi Keita  wrote:

> Hi all,
>
> > Arash Esbati  writes:
> > Paul Nelson  writes:
> >> Somewhere between when I tried Vangelis's patch (earlier in this
> >> thread) and when it was installed, it seems that a further change was
> >> made to preview-region that breaks previews in indirect buffers.
> >> Specifically, the substitution buffer-file-name ->
> >> (TeX-buffer-file-name) was applied where it shouldn't be.
> >>
> >> The issue is as explained in my earlier email in this thread -- we
> >> actually want "" to be the filename when doing previews for
> >> indirect buffers, so that preview-parse-messages ultimately places
> >> them according to the command buffer rather than according to the
> >> filename.  (It might clarify here to note that AFAIK, the "original"
> >> argument to TeX-region-create is relevant only when doing
> >> preview-document, which is irrelevant for indirect buffers.)
> >>
> >> I've attached a patch reverting this particular substitution, so that
> >> previews once again work in indirect buffers.
>
> > @Keita and Vangelis: Any comments on Paul's proposal?
>
> Hmm, sorry. Contrary to what I said before, the current master puts the
> preview images in the base buffer for both document preview (C-c C-p
> C-d) and region preview (C-c C-p C-r etc.). Maybe I was doing something
> wrong. :-(
>
> It seems to me that Paul's approach makes sense. I'd like to hear
> Vangelis'es opinion.
>
> Best regards,
> Ikumi Keita
> #StandWithUkraine #StopWarInUkraine
> #Gaza #StopMassiveKilling #CeasefireNOW
>
___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


bug#70782: [PATCH] Set magit commit summary length in dir-locals

2024-05-05 Thread Arash Esbati
tags 70782 wontfix
close 70782
thank

Paul Nelson  writes:

> Ah, I see.  OK, what you suggest sounds good, please feel free to
> close.

Thanks.  Let me know if Git is annoying you about the new file, I can
add it to our .gitignore.

Best, Arash



___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


bug#70782: [PATCH] Set magit commit summary length in dir-locals

2024-05-05 Thread Paul Nelson
Ah, I see.  OK, what you suggest sounds good, please feel free to close.
Thanks, best,  Paul

On Sun, May 5, 2024 at 3:14 PM Arash Esbati  wrote:

> Paul Nelson  writes:
>
> > Unfortunately, it uses text-mode (and I don't know of any way to
> > associate .dir-locals entries with minor modes.)
>
> Thanks.  Your proposal has another side effect for people not having
> Magit installed: I get the following when I open a file inside AUCTeX
> repo with your change installed:
>
> --8<---cut here---start->8---
> The local variables list in /path/to/auctex/
> or .dir-locals.el contains values that may not be safe (*).
>
> Do you want to apply it?  You can type
> y  -- to apply the local variables list.
> n  -- to ignore the local variables list.
> !  -- to apply the local variables list, and permanently mark these
>   values (*) as safe (in the future, they will be set automatically.)
> i  -- to ignore the local variables list, and permanently mark these
>   values (*) as ignored
> +  -- to apply the local variables list, and trust all directory-local
>   variables in this directory
> --8<---cut here---end--->8---
>
> Maybe we should skip this and you add that bit to your personal
> .dir-locals-2.el file inside AUCTeX repo?
>
> Best, Arash
>
___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


bug#70782: [PATCH] Set magit commit summary length in dir-locals

2024-05-05 Thread Arash Esbati
Paul Nelson  writes:

> Unfortunately, it uses text-mode (and I don't know of any way to
> associate .dir-locals entries with minor modes.)

Thanks.  Your proposal has another side effect for people not having
Magit installed: I get the following when I open a file inside AUCTeX
repo with your change installed:

--8<---cut here---start->8---
The local variables list in /path/to/auctex/
or .dir-locals.el contains values that may not be safe (*).

Do you want to apply it?  You can type
y  -- to apply the local variables list.
n  -- to ignore the local variables list.
!  -- to apply the local variables list, and permanently mark these
  values (*) as safe (in the future, they will be set automatically.)
i  -- to ignore the local variables list, and permanently mark these
  values (*) as ignored
+  -- to apply the local variables list, and trust all directory-local
  variables in this directory
--8<---cut here---end--->8---

Maybe we should skip this and you add that bit to your personal
.dir-locals-2.el file inside AUCTeX repo?

Best, Arash



___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


bug#70782: [PATCH] Set magit commit summary length in dir-locals

2024-05-05 Thread Paul Nelson
Hi Arash,

I'm not a Magit user, hence the question: Does Magit use a special mode
> for writing commit logs, like `log-edit-mode'?  Maybe we can put that
> entry somewhere else in .dir-locals.el, next to
>
>
Unfortunately, it uses text-mode (and I don't know of any way to associate
.dir-locals entries with minor modes.)

Thanks, best,

Paul
___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


bug#70782: [PATCH] Set magit commit summary length in dir-locals

2024-05-05 Thread Arash Esbati
Hi Paul,

Paul Nelson  writes:

> This patch uses .dir-locals.el to set the magit commit summary maximum
> length to 50.

I'm not a Magit user, hence the question: Does Magit use a special mode
for writing commit logs, like `log-edit-mode'?  Maybe we can put that
entry somewhere else in .dir-locals.el, next to

  (vc-git-log-edit-summary-target-len . 50)

or something like that.

Best, Arash



___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


bug#70779: [PATCH] Emacs 30 and warning about missing lexical-binding declaration

2024-05-05 Thread Arash Esbati
Arash Esbati  writes:

> I suggest the following change to `TeX-auto-store' in tex.el:

Which can be reduced to:

--8<---cut here---start->8---
diff --git a/tex.el b/tex.el
index cda1d7f6..30f80c7e 100644
--- a/tex.el
+++ b/tex.el
@@ -4267,6 +4267,7 @@ If TEX is a directory, generate style files for all files 
in the directory."
 (TeX-unload-style style)
 (with-current-buffer (generate-new-buffer file)
   (erase-buffer)
+  (insert ";;" (make-string 40 ?\s) "-*- lexical-binding: t; -*-\n\n")
   (insert "(TeX-add-style-hook\n \""
   style "\"\n (lambda ()")
   (unless (string= tex-cmd-opts "")
--8<---cut here---end--->8---

Any comments welcome.

Best, Arash



___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


bug#70783: [PATCH] Allow compilation messages to be suppressed

2024-05-05 Thread Paul Nelson
This patch introduces a dynamic variable that allows suppression of the
messages "Type (...) to display results of compilation."

Thanks, best,

Paul


0001-Allow-compilation-messages-to-be-suppressed.patch
Description: Binary data
___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


bug#70782: [PATCH] Set magit commit summary length in dir-locals

2024-05-05 Thread Paul Nelson
This patch uses .dir-locals.el to set the magit commit summary maximum
length to 50.

Thanks, best,

Paul


0001-Set-magit-commit-summary-length-in-dir-locals.patch
Description: Binary data
___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


bug#70779: [PATCH] Emacs 30 and warning about missing lexical-binding declaration

2024-05-05 Thread Arash Esbati
Hi all,

Emacs 30 now emits a warning when it loads an .el file without the
lexical-binding cookie (commits 81bad84a6 and 1121f17d7c).  This is the
entry from Emacs NEWS:

*** Warn about missing 'lexical-binding' directive.
The compiler now warns if an Elisp file lacks the standard
'-*- lexical-binding: ... -*-' cookie on the first line.
This line typically looks something like

;;; My little pony mode  -*- lexical-binding: t -*-

It is needed to inform the compiler about which dialect of ELisp
your code is using: the modern dialect with lexical binding or
the old dialect with only dynamic binding.

Lexical binding avoids some name conflicts and allows the compiler to
detect more mistakes and generate more efficient code, so it is
recommended.  For how to adapt your code to lexical binding, see the
manual section "(elisp) Converting to Lexical Binding".

If your code cannot be converted to lexical binding, you can insert
the line

;;; -*- lexical-binding: nil -*-

first in the file to declare that it uses the old dialect.

This change affects all auto-parsed style files when AUCTeX loads them.
I suggest the following change to `TeX-auto-store' in tex.el:

--8<---cut here---start->8---
diff --git a/tex.el b/tex.el
index cda1d7f6..32cfd21e 100644
--- a/tex.el
+++ b/tex.el
@@ -4267,6 +4267,8 @@ If TEX is a directory, generate style files for all files 
in the directory."
 (TeX-unload-style style)
 (with-current-buffer (generate-new-buffer file)
   (erase-buffer)
+  (insert (concat ";;" (make-string 40 ?\s)
+  "-*- lexical-binding: t; -*-\n\n"))
   (insert "(TeX-add-style-hook\n \""
   style "\"\n (lambda ()")
   (unless (string= tex-cmd-opts "")
--8<---cut here---end--->8---

Any comments welcome.

Best, Arash



___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


bug#70776: [PATCH] Generalize some error description regexp

2024-05-05 Thread Arash Esbati
Paul Nelson  writes:

> On the other hand, the relevant regular expression in
> LaTeX-error-description-list doesn't allow for "on input line X".
> This patch generalizes that regular expression so that it matches such
> output.

Thanks, installed, and closing.

Best, Arash



___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex