bug#73302: TeX-find-closing-brace and verbatim macros

2024-09-26 Thread Ikumi Keita
Hi Paul,

>>>>> Paul Nelson  writes:
> For whatever it's worth, I updated my package czm-tex-fold to support
> the variety of verbatim formats from Arash's earlier email.  This is
> less flexible than what we would get by extending the display spec
> format, but has the advantage that it's been implemented.

> If you want to try it without setting up my package, just evaluate the
> following code, with the final line evaluated in your tex buffer.
> Then run folding commands (e.g., C-c C-o C-b) as usual.

Thanks, it works well for me.

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#73302: TeX-find-closing-brace and verbatim macros

2024-09-25 Thread Ikumi Keita
>>>>> Arash Esbati  writes:
>> Alternatively, one could view the contents of "|...|" as a "required
>> argument" and extend the string display spec folding to work with
>> "|...|" in addition to "{...}", but I don't see the immediate payoff
>> from doing so.

> What do others think?

It seems a reasonable idea to me, provided that it is limited to
\verb-like commands. It would be nice if it is easily extended for
non-LaTeX mode constructs. (I imagine that ConTeXt has some \verb-like
commands.)

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#73302: TeX-find-closing-brace and verbatim macros

2024-09-21 Thread Ikumi Keita
Hi Paul,

>>>>> Paul Nelson  writes:
> The issue concerns detecting verbatim macros in code immediately after
> moving out of an mmm-mode block in a LaTeX buffer.

There is a TODO entry in syntax.el which says
;; - interaction with mmm-mode.
, so maybe syntax-related facilities including syntax-ppss and
syntax-propertize-function have something incompatible with mmm-mode.

However, I don't know anything concrete with respect to such conflict.

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#73302: TeX-find-closing-brace and verbatim macros

2024-09-20 Thread Ikumi Keita
Hi Paul,

>>>>> Paul Nelson  writes:
> I noticed just now that my patch can break the folding of
> \end{verbatim} environments when called via TeX-fold-region.  Steps to
> reproduce:

> 1. After loading AUCTeX and tex-fold, evaluate

>(add-to-list 'TeX-fold-macro-spec-list '(identity ("end")))

> 2. Create a LaTeX file containing

> \begin{verbatim}
> blah
> \end{verbatim}

> 3. Make the region contain the line "\end{verbatim}", but none of the
> line "\begin{verbatim}"

> 4. C-c C-o C-r (TeX-fold-region).

> This results in [Error: No content or function found], resulting from
> a failure for TeX-fold-macro-nth-arg to recover the first argument to
> \end{verbatim}.

Confirmed.

> One can trace the issue to the following discrepancy:

> a. With point on the "{" in "\end{verbatim}", (TeX-verbatim-p) returns
> nil (as expected).

> b. If we repeat (a) after narrowing to a region that contains the line
> "\end{verbatim}" but none of the line "\begin{verbatim}", then it
> instead returns t.

Indeed.

> As a fix, we could either:

> (i) Do (save-restriction (widen) ...) in TeX-fold-macro-nth-arg before
> (TeX-verbatim-p).

> (ii) Do (save-restriction (widen) ...) in LaTeX-verbatim-p.

> The advantage of (ii) is that it arguably fixes the root cause rather
> than just patching it at the source.  The disadvantage is that I don't
> know off hand whether this would affect other calls to
> LaTeX-verbatim-p in an undesired way.  I lean in favor of (i) for now,
> and have updated my patch accordingly, but would welcome other
> feedback.

I don't have particular preference, so I think we can install your
change, provided that no objection is raised.

Thank you for your contribution!

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#73302: TeX-find-closing-brace and verbatim macros

2024-09-19 Thread Ikumi Keita
Hi Paul,

>>>>> Paul Nelson  writes:
>> (Actually, AUCTeX has generic function `TeX-verbatim-p', but only LaTeX
>> mode has meaningful implementation for it.)

> According to the documentation, TeX-verbatim-p always returns nil
> outside LaTeX-mode, so it seems to me that to fix the issue you raise,
> it would suffice to use that function in place of LaTeX-verbatim-p
> (rather than doing derive-mode-p checks).  Does that sound right to
> you?  (I never use the other modes, so my knowledge there is a bit
> spotty.)

Hmm, then the code takes the form
  (if (TeX-verbatim-p)
   (cdr (LaTeX-verbatim-macro-boundaries))
  ...
, which looks like to call LaTeX-mode specific function
`LaTeX-verbatim-macro-boundaries' in other modes as well... Well, I'd
accept that if you place there some FIXME comments which warns that this
should be fixed when other mode implements non-trivial
`TeX-verbatim-p-function'.

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#73302: TeX-find-closing-brace and verbatim macros

2024-09-19 Thread Ikumi Keita
Hi Paul,

>>>>> Paul Nelson  writes:
> I took another look just now, and the fix to allow string specs was
> simpler than I had thought.  The attached patch suffices for my
> practical purposes, but I'll confess that I don't know all the ways
> verbatim arguments can appear in macros.

TeX-fold-mode is supposed to run in none-LaTeX-mode buffers, so
`LaTeX-verbatim-p' should be wrapped with some conditional using
`derived-mode-p'. Can you work on it?

(Actually, AUCTeX has generic function `TeX-verbatim-p', but only LaTeX
mode has meaningful implementation for it.)

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#73215: 14.0.5; What about excluding .dir-locals.el from GNU ELPA tarballs

2024-09-12 Thread Ikumi Keita
Hi Lin,

>>>>> Lin Jian via bug-auctex via Bug reporting list for AUCTeX 
>>>>>  Currently, the .dir-locals.el file is included in the 
>>>>> GNU ELPA
> tarball[1], which causes this compilation error[2] when doing AOT native
> compilation for Emacs lisp packages in NixOS.

> We can workaround this by skipping native compilation for
> .dir-locals.el.  However, I do not think .dir-locals.el has to be
> included in the GNU ELPA tarball.  In addition, MELPA ignores[3] that
> file by default.

> Could you exclude .dir-locals.el from GNU ELPA tarball?  FYI,
> :ignored-files[4] of GNU ELPA specification can be used to do this.

Thanks for your suggestion. I adapted .elpaignore instead to remove
obsolete entries at the same time. I'll close this bug.

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#71363: 14.0.5; AUCTeX 14.05 and LaTeX Mode

2024-07-10 Thread Ikumi Keita
Hi all,

I have just installed the updated patch. I'll close this bug. Thanks for
all comments.

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW

>>>>> Ikumi Keita  writes:
> Hi Arash,
>>>>> Arash Esbati  writes:
>> Thanks, catering for `major-mode-remap-defaults' is probably a good
>> idea.  I have some minor comments below.

> Thanks.

>>> --- a/tex-site.el.in
>>> +++ b/tex-site.el.in
>>> @@ -113,29 +113,53 @@ Arrange the redirection of the built-in TeX modes 
>>> according to VALUE.
>>> - The built-in modes in VALUE are redirected to the corresponding
>>> AUCTeX major modes.
>>> - The built-in modes not in VALUE discard redirection, if any.
>>> -If `major-mode-remap-alist' is available, use it for redirection.
>>> -Otherwise, use advice facility."
>>> +If either `major-mode-remap-defaults' or `major-mode-remap-alist'
>>> +is available, use it for redirection

>> , in that order

> OK, I'll add those words.

>>> +;; Keep compatibility.  (bug#71363)
>>> +(if (eq elt 'latex-mode)
>>> +(with-eval-after-load 'org-src
>>> +  (progn

>> Do you need this extra `progn' inside `with-eval-after-load'?

> Thanks. I didn't realize the difference of syntax between
> `eval-after-load' and `with-eval-after-load'.



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


bug#71363: 14.0.5; AUCTeX 14.05 and LaTeX Mode

2024-07-05 Thread Ikumi Keita
Hi Arash,

>>>>> Arash Esbati  writes:
> Thanks, catering for `major-mode-remap-defaults' is probably a good
> idea.  I have some minor comments below.

Thanks.

>> --- a/tex-site.el.in
>> +++ b/tex-site.el.in
>> @@ -113,29 +113,53 @@ Arrange the redirection of the built-in TeX modes 
>> according to VALUE.
>> - The built-in modes in VALUE are redirected to the corresponding
>> AUCTeX major modes.
>> - The built-in modes not in VALUE discard redirection, if any.
>> -If `major-mode-remap-alist' is available, use it for redirection.
>> -Otherwise, use advice facility."
>> +If either `major-mode-remap-defaults' or `major-mode-remap-alist'
>> +is available, use it for redirection

> , in that order

OK, I'll add those words.

>> +;; Keep compatibility.  (bug#71363)
>> +(if (eq elt 'latex-mode)
>> +(with-eval-after-load 'org-src
>> +  (progn

> Do you need this extra `progn' inside `with-eval-after-load'?

Thanks. I didn't realize the difference of syntax between
`eval-after-load' and `with-eval-after-load'.

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#71902: tex-site.el is not included in auctex 13.3

2024-07-04 Thread Ikumi Keita
Hi Yizhen,

>>>>> WANG Yizhen  writes:
> Sorry for the inconvenience. I was using straight.el to install
> auctex,

If I understand correctly, straight.el uses ELPA package for AUCTeX.
Thus I expect you already have tex-site.el locally.
1. Is it sure that you lack tex-site.el? I'm not a straght.el user, but
   if it installs ELPA packages in standard place, you will find it as
   ~/.emacs.d/elpa/auctex-X.Y.Z/tex-site.el
   , where X, Y and Z are the version number.
2. If you cannot find tex-site.el where straight.el stores the package
   contents, it means that your installation of AUCTeX is broken. I
   recommend to delete the broken installation of AUCTeX and to
   re-install it again. (I don't know how to do that in standard way of
   straight.el.)
3. If that doesn't help yet, then I suspect that your straight.el isn't
   working correctly. Maybe re-installing straight.el itself helps.

> and as I navigated to the repository directory, there was actually no
> tex-site.el there.

Yes, that's normal; tex-site.el is generated on the ELPA server and
bundled into the distribution files when a new AUCTeX ELPA release is
out.

...I realized that staright.el manifests itself as[2]
,
| Packages are cloned as Git (or other) repositories, not as opaque tarballs.
`
Then it really doesn't install tex-site.el?
...Hmm, straight.el needs special treatment for AUCTeX like this[3]
actually?

[1] https://git.savannah.gnu.org/cgit/auctex.git
[2] https://github.com/radian-software/straight.el?tab=readme-ov-file
[3] https://github.com/radian-software/straight.el/issues/800

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#71363: 14.0.5; AUCTeX 14.05 and LaTeX Mode

2024-07-03 Thread Ikumi Keita
Hi Arash,

>>>>> Arash Esbati  writes:
>> I'd say that people who have such strange preference should be
>> prepared for their difficulty and be able to deal with it by
>> themselves.

> I don't use this feature, so I don't want to be against it too much, so
> if you think it is a good addition, please go ahead and install it.  I
> know where to forward the complaints once they arrive ;-)

😜

I'd like to take this opportunity to take `major-mode-remap-defaults',
which will be introduced in Emacs 30, into account as well so that
AUCTeX wouldn't alter the user customize option
`major-mode-remap-alist'. Thus I propose the attached patch.

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW

>From 78a32e5605a75f2cdbe0e0e3355aad158801b527 Mon Sep 17 00:00:00 2001
From: Ikumi Keita 
Date: Tue, 12 Mar 2024 14:55:11 +0900
Subject: [PATCH] Keep compatibility with Org mode src editing (bug#71363)

* tex-site.el.in (TeX-modes-set): Add entries for AUCTeX LaTeX mode to
`org-src-lang-modes'.
Use `major-mode-remap-defaults' for Emacs 30 and later, instead of
`major-mode-remap-alist', in order to avoid altering user customize
option.
---
 tex-site.el.in | 58 +++---
 1 file changed, 41 insertions(+), 17 deletions(-)

diff --git a/tex-site.el.in b/tex-site.el.in
index 911a2080..62e6583b 100644
--- a/tex-site.el.in
+++ b/tex-site.el.in
@@ -113,29 +113,53 @@ Arrange the redirection of the built-in TeX modes according to VALUE.
 - The built-in modes in VALUE are redirected to the corresponding
   AUCTeX major modes.
 - The built-in modes not in VALUE discard redirection, if any.
-If `major-mode-remap-alist' is available, use it for redirection.
-Otherwise, use advice facility."
+If either `major-mode-remap-defaults' or `major-mode-remap-alist'
+is available, use it for redirection.  Otherwise, use advice
+facility."
   (custom-set-default var value)
   (let (elt dst)
 (dolist (entry TeX-mode-alist)
   (setq elt (car entry)
 dst (cdr entry))
   (if (memq elt value)
-  (if (boundp 'major-mode-remap-alist)
-  (or (eq (cdr-safe (assq elt major-mode-remap-alist)) dst)
-  (push (cons elt dst) major-mode-remap-alist))
-;; COMPATIBILITY for Emacs<29
-(advice-add elt :override dst
-;; COMPATIBILITY for Emacs 28.[12]
-;; Give it higher precedence than the :around
-;; advice given to `tex-mode' in tex-mode.el.
-;; https://lists.gnu.org/r/auctex-devel/2022-09/msg00050.html>
-'((depth . -10
-(if (boundp 'major-mode-remap-alist)
-(setq major-mode-remap-alist
-  (delete entry major-mode-remap-alist))
-  ;; COMPATIBILITY for Emacs<29
-  (advice-remove elt dst))
+  (progn
+(cond ((boundp 'major-mode-remap-defaults)
+   ;; For Emacs 30 and later
+   (add-to-list 'major-mode-remap-defaults (cons elt dst)))
+  ((boundp 'major-mode-remap-alist)
+   ;; COMPATIBILITY for Emacs 29
+   (add-to-list 'major-mode-remap-alist (cons elt dst)))
+  (t
+   ;; COMPATIBILITY for Emacs<29
+   (advice-add elt :override dst
+   ;; COMPATIBILITY for Emacs 28
+   ;; Give it higher precedence than the :around
+   ;; advice given to `tex-mode' in tex-mode.el.
+   ;; https://lists.gnu.org/r/auctex-devel/2022-09/msg00050.html>
+   '((depth . -10)
+;; Keep compatibility.  (bug#71363)
+(if (eq elt 'latex-mode)
+(with-eval-after-load 'org-src
+  (progn
+(defvar org-src-lang-modes) ; Silence byte compiler.
+;; Check the actual presence in the entry in case
+;; that the user once choosed AUCTeX LaTeX mode and
+;; abandoned it afterwards in the same emacs
+;; session.
+(when (memq 'latex-mode TeX-modes)
+  (push '("latex" . LaTeX) org-src-lang-modes)
+  (push '("beamer" . LaTeX) org-src-lang-modes))
+(cond ((boundp 'major-mode-remap-defaults)
+   ;; For Emacs 30 and later
+   (setq major-mode-remap-defaults
+ (delete entry major-mode-remap-defaults)))
+  ((boundp 'major-mode-remap-alist)
+   ;; COMPATIBILITY for

bug#71902: tex-site.el is not included in auctex 13.3

2024-07-02 Thread Ikumi Keita
Hi WANG,

>>>>> WANG Yizhen  writes:
> Dear maintainers of auctex,
> The current commit of auctex  seemed to have packed tex-site.el.in
> instead of tex-site.el, which makes auctex unusable. I look forward to
> a quick fix.

This isn't a bug; tex-site.el is generated from tex-site.el.in under
standard installation process, namely configure&make. Follow the
instruction included in the distribution or put at
https://www.gnu.org/software/auctex/manual/auctex/Installation.html

Maybe a simpler solution is to use ELPA release. That's described in the
above document, too.

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#71363: 14.0.5; AUCTeX 14.05 and LaTeX Mode

2024-07-01 Thread Ikumi Keita
Hi Arash,

>>>>> Arash Esbati  writes:
> Ah, Ok, thanks.  And IIUC having an entry like this

> (latex-mode . LaTeX-mode)

> in `major-mode-remap-alist' doesn't help either, right?

I think so. `major-mode-remap-alist' is rather new in emacs history, so
I suppose there is no code other than `set-auto-mode' (and its helper
functions) that takes `major-mode-remap-alist' into account when it
determines the major mode function to run.

> My only fear is that we change things outside AUCTeX from Lisp and
> people will than tell us they use AUCTeX for usual TeX-writing and the
> built-in mode for Org source blocks; and then the real fun begins.

You mean that they want to have AUCTeX for LaTeX documents (.tex files)
and built-in mode for Org source blocks? That's very unusual situation; :-) 
I'd say that people who have such strange preference should be prepared
for their difficulty and be able to deal with it by themselves.

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#71363: 14.0.5; AUCTeX 14.05 and LaTeX Mode

2024-07-01 Thread Ikumi Keita
Hi Arash,

>>>>> Arash Esbati  writes:
> Thanks.  I wonder why we can't leave this decision to the user?

> ,[ C-h v org-src-lang-modes RET ]
> | org-src-lang-modes is a variable defined in ‘org-src.el’.
...
> `

> So people only need to customize

>   ("beamer" . latex)

> to

>   ("beamer" . LaTeX)

> and it should work, IIUC.

I don't think that's enough. If I understand correctly, the major
problem is that LaTeX code block other than beamer code block is handled
by `latex-mode' by default. The doc string of `org-edit-special' says:
,
| The LaTeX environment is copied into a new buffer.  Major mode is
| set to the one associated to "latex" in ‘org-src-lang-modes’,
| or to ‘latex-mode’ if there is none.
`
So users have to add another entry
("latex" . LaTeX)
in ‘org-src-lang-modes’.

As I wrote in the separate message, I think AUCTeX can accept to add
such entry by default.

(But adding
   ("latex" . LaTeX)
and changing
   ("beamer" . latex)
to
   ("beamer" . LaTeX)
aren't much trouble, after all. So it's reasonable as well to leave this
decision to the user, of course.)

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#71363: 14.0.5; AUCTeX 14.05 and LaTeX Mode

2024-07-01 Thread Ikumi Keita
>>>>> Paul Nelson  writes:
> I checked that Ikumi's suggestion addresses the issue (more correctly
> than my own workaround), but feel that AUCTeX should do something like
> this by default, like it did (incidentally, via mode aliasing) until
> the recent update.  I'm not sure how best to do that.  I guess one
> could just stick Ikumi's with-eval-after-load block somewhere in
> tex.el, but that goes against the general advice of avoiding
> with-eval-after-load in package files?

I don't feel that it's bad to use `with-eval-after-load' in this
context. On the other hand, it wouldn't be nice for a package to alter
user customize option unconditionally in general.
But in my opinion, this case wouldn't cause a problem practically, and I
understand that users want compatibility with former AUCTeX version. So
I don't object strongly to adding such `with-eval-after-load' in, say,
tex-site.el.

Is there anyone who is against this idea?

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#71164: 14.0.5; Font lock annoyance

2024-06-29 Thread Ikumi Keita
Hi Derek and all,

>>>>> Derek Clegg  writes:
> Thanks for the email. This has fixed the original problem, so I think
> it’s good to go.

Thank you. I'll install the fix soon.

>> On Jun 29, 2024, at 1:19 PM, Arash Esbati  wrote:
>>> And while we're at it: Do you have a recipe to reproduce this,
>>> preferably starting with "emacs -Q"?

Actually, I couldn't recall how I reproduced the issue for a while🥴. At
last I succeeded in reproducing again😆.
1. emacs -Q
2. M-x global-font-lock-mode RET
3. M-x load-file RET /usr/local/share/emacs/site-lisp/auctex.el RET
4. Open circ.tex
5. C-c C-m verb RET somewhere appropriate.
Then I have
Error during redisplay: (internal--syntax-propertize 2) signaled (error 
"Font-lock trying to use keywords before setting them up")

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#71690: 14.0.5; preview-latex clips bold text with inline equations

2024-06-21 Thread Ikumi Keita
Thanks, I'll close this bug.

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW

>>>>> Matt Mitchell  writes:
> This works for me! Thank you so much!
> Matt Mitchell

> On Fri, Jun 21, 2024 at 10:46 AM Ikumi Keita  wrote:
>> 
>> >>>>> Arash Esbati  writes:
>> > Does this work in the preamble?
>> 
>> >   \AtBeginDocument{\PreviewMacro*\textbf}
>> 
>> Ah, yes. It does the trick.



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


bug#71690: 14.0.5; preview-latex clips bold text with inline equations

2024-06-21 Thread Ikumi Keita
>>>>> Arash Esbati  writes:
> Does this work in the preamble?

>   \AtBeginDocument{\PreviewMacro*\textbf}

Ah, yes. It does the trick.

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#71690: 14.0.5; preview-latex clips bold text with inline equations

2024-06-20 Thread Ikumi Keita
Hi Matt,

>>>>> Matt Mitchell  writes:
> I've noticed that, when previewing LaTeX documents with C-c C-p C-d,
> inline equations inside \textbf{} are pushed to the front of the bold
> section, while the bold text itself is cut off.

> A minimal example is included below, along with my a dump of my Emacs &
> AUCTeX version info. I hope this is enough to reproduce it.

Thanks for your report. I confirmed what you say. This is basically a
issue described in preview-latex manual[1]. However, the workaround
mentioned there, namely putting
\PreviewMacro*\textbf
in the preamble, doesn't work because it is ignored by LaTeX as
,
| l.7 \PreviewMacro
|  *\textbf
| 
| ./tst-prv3.tex:7: LaTeX Error: Missing \begin{document}.
`
. When I put \PreviewMacro*\emph after \begin{document}, document
preview (C-c C-p C-d) does work but region preview doesn't.

In the manual[1], there is also a sentence
,
| At least all of the above mentioned macros and a few more are already
| catered for by a configuration file ‘prauctex.cfg’ that gets loaded
`
. However, \textbf is actually missing from "prauctex.cfg". Thus I think
this is a bug of preview-latex.

I'll add \textbf in the default "prauctex.cfg". Until the fixed version
is released, you can work around the bug by the following prescription:
1. Find the default "prauctex.cfg" by "kpsewhich prauctex.cfg".
2. Copy it to the suitable place (current directory or
   ~/texmf/tex/latex/preview/).
3. Add
\PreviewMacro*\textbf
   in the copied "prauctex.cfg".

[1] 
https://www.gnu.org/software/auctex/manual/preview-latex/Misplaced-previews.html#Misplaced-previews

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#71436: Fwd: preview in LuaTeX with RTL as main language does not work

2024-06-12 Thread Ikumi Keita
Hi Udicoudco,

>>>>> Udicoudco  writes:
> Oh, there was another typo. I did not test that the documentation
> is typesetting properly, and there was a "\begn{macro}" instead
> of `\begin{macro}`. I also updated the checksum of preview.dtx.
> Tested now with the various engines and things seems to be working
> (but please test thoroughly :)

Thanks, it works well with my brief test.

>> By the way, I suppose we need copyright assignment if this contribution
>> is to be incorporated into AUCTeX. Have you signed FSF copyright
>> assignment form before? If not, please have a look at
>> https://git.savannah.gnu.org/cgit/gnulib.git/tree/doc/Copyright/request-assign.future

> Just sent an email, but in case it is suffice, when I'll get an answer
> I'll attach the assignment.

I see. After the paperwork is done, I'll install your proposal.

> BTW, it is not that important, but why is my postal address needed?

I'm not sure :-) Probably some US legal matter is concerned.

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#71467: Value of `LaTeX-math-menu-unicode' on macOS

2024-06-11 Thread Ikumi Keita
>>>>> Arash Esbati  writes:
> Thanks for your response.  Then the patch would look like this:
> diff --git a/latex.el b/latex.el
> index da202219..1fa7cc2f 100644
> --- a/latex.el
> +++ b/latex.el
> @@ -6426,8 +6426,10 @@ Each entry should be a list with upto four elements, 
> KEY, VALUE,
>  MENU and CHARACTER, see `LaTeX-math-list' for details.")

>  (defcustom LaTeX-math-menu-unicode
> -  (or (string-match "\\" (emacs-version))
> -  (eq window-system 'w32))
> +  (if (or (string-match "\\" (emacs-version))
> +  (memq system-type '(darwin windows-nt)))
> +  t
> +nil)
>"Whether the LaTeX menu should try using Unicode for effect."
>:type 'boolean
>:group 'LaTeX-math)
> Or is there another reliable way to check for GTK?  As an upside, the
> math menu looks like this in terminal:

Looks good 😘

Bye,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW



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


bug#71467: Value of `LaTeX-math-menu-unicode' on macOS

2024-06-11 Thread Ikumi Keita
Hi Arash,

>>>>> Arash Esbati  writes:
> So I'd like to install the following change:
> diff --git a/latex.el b/latex.el
> index da202219..cfd7ee5c 100644
> --- a/latex.el
> +++ b/latex.el
> @@ -6426,8 +6426,7 @@ Each entry should be a list with upto four elements, 
> KEY, VALUE,
>  MENU and CHARACTER, see `LaTeX-math-list' for details.")

>  (defcustom LaTeX-math-menu-unicode
> -  (or (string-match "\\" (emacs-version))
> -  (eq window-system 'w32))
> +  (if (memq window-system '(pgtk ns w32)) t nil)
>"Whether the LaTeX menu should try using Unicode for effect."
>:type 'boolean
>:group 'LaTeX-math)
> Any comments?

Maybe we should use `system-type' instead of `window-system', because
`window-system' is terminal-local variable. Users can launch an emacs
session with -nw option, do `server-start' and attach a graphical frame
to that session by "emacsclient -c" afterwards. If the `defcustom' was
evaluated in terminal frame, unicode characters wouldn't appear in the
menu in graphical frame due to `LaTeX-math-menu-unicode' being nil.

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#71436: Fwd: preview in LuaTeX with RTL as main language does not work

2024-06-11 Thread Ikumi Keita
Hi Udicoudco,

>>>>> Udicoudco  writes:
> On Sat, Jun 8, 2024 at 1:20 PM Udicoudco  wrote:
>> In LuaTeX, when \pagedirection is right to left then \pagerightoffset is
>> used instead of \hoffset to position the page. I attached a patch and an
>> example
>> that demonstrates the problem.
>> 
>> 
> There is a typo in the patch, so I attached a new one.

Thanks for your proposal, but "make" doesn't run with this patch:
,
| gmake[1]: *** [Makefile:91: preview.pdf] Error 1
| gmake[1]: Leaving directory '/usr/home/keita/repo/auctex/auctex/latex'
| gmake: *** [Makefile:247: texmf] Error 2
`

By the way, I suppose we need copyright assignment if this contribution
is to be incorporated into AUCTeX. Have you signed FSF copyright
assignment form before? If not, please have a look at
https://git.savannah.gnu.org/cgit/gnulib.git/tree/doc/Copyright/request-assign.future

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#71363: 14.0.5; AUCTeX 14.05 and LaTeX Mode

2024-06-04 Thread Ikumi Keita
Hi Robert and Paul,

>>>>> Paul Nelson  writes:
>> Functionally, version 14.0.5 has at least one shortcoming that makes it
>> unusable for me: invoking org-edit-special from an org-mode latex src block
>> opens a buffer in latex-mode (not LaTeX-mode). This is a change from
>> version 13.3.

> In case it's of any help, I've been using (add-hook 'latex-mode-hook
> #'LaTeX-mode) as a workaround for the source block issue that you
> mention

I'm afraid that isn't a suuposed way to call a major function in emacs.
The doc string of `org-edit-special' says:
,
| The LaTeX environment is copied into a new buffer.  Major mode is
| set to the one associated to "latex" in ‘org-src-lang-modes’,
| or to ‘latex-mode’ if there is none.
`
Thus I expect
(with-eval-after-load 'org-src
  (push '("latex" . LaTeX) org-src-lang-modes))
in your init file does the job. (Maybe you have also to put
  (setcdr (assoc "beamer" org-src-lang-modes) 'LaTeX)
in the `with-eval-after-load' form if you have beamer src block in your
org file.)

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#71240: Keeping track of class and packages, even w/o options

2024-06-02 Thread Ikumi Keita
Hi Arash,

>>>>> Arash Esbati  writes:
> This adds entries like ("package/class" "") to the variables when no
> options are given, and styles can check against them.

> WDYT?

I haven't tried it for myself, but I suppose it's a reasonable idea to
carry out.

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#71245: 2024-03-17; Populate `semantic-symref-filepattern-alist'

2024-06-02 Thread Ikumi Keita
Hi David,

>>>>> David Fussner  writes:
> Thanks very much Keita. In the meantime, if there's any related feedback on
> the Emacs thread I'll get back to you.

I've installed your proposal and pushed to the git repo. I'll close this
bug. Thank you.

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#71245: 2024-03-17; Populate `semantic-symref-filepattern-alist'

2024-05-29 Thread Ikumi Keita
Hi David,

>>>>> David Fussner  writes:
> 1. How false are these false positives? If it's a project with plain
> TeX and LaTeX files, there's always a certain amount of overlap
> anyway, and that includes amsTeX, too. ConTeXt is another problem, so
> it will depend somewhat on the nature of the project.

> 2. If you create a TAGS file in the project, then typically that will
> cover all the .tex files, too, so the other xref commands may find
> hits across the various TeX varieties, and therefore
> `xref-find-references' won't be an outlier in that respect.

> 3. I also feel -- quite strongly as it happens -- that false negatives
> are worse than false positives. If you've a .tex file open and do M-?
> in it then you won't even see the hit point is on, but only hits from
> whatever other file extensions happen to belong to the initial file's
> major mode. Currently, in the case of plain TeX or ams TeX, that means
> no hits, which is sort of weird and very frustrating when you're
> looking at one on your screen. In a LaTeX .tex file you'll also not
> get the hit you're actually looking at on your screen, but this might
> be disguised by hits from other file extensions. I think this is much
> more misleading than any false positives, but I concede that others
> may not feel as strongly about this as I do.

Thank you for your reply. I understand your concern about false
negatives and think that I'll apply your patch to AUCTeX repository if
there are no objections. There would be only small amount of false
positives under practical situations and we can add a new customize
option mentioned in my previous message if there are many complaints
about them anyway.

Let's wait for 3-4 days to see whether there are objections or not.

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#71245: 2024-03-17; Populate `semantic-symref-filepattern-alist'

2024-05-28 Thread Ikumi Keita
Hi David,

>>>>> David Fussner via bug-auctex via Bug reporting list for AUCTeX 
>>>>>  writes:
> The patchset for the new xref backend in tex-mode.el is still pending,
> but no matter what the eventual outcome of that I think we still need to
> have a complete set of AUCTeX modes included in
> `semantic-symref-filepattern-alist'. Without them we just get the
> cryptic message about customizing that variable when we try to use
> `xref-find-references'. Also, I don't know whether it was decided not to
> include the .tex extension where relevant, but this does mean that,
> without further intervention, `xref-find-references' won't search .tex
> files in any of the modes, even when you are actually searching from,
> say, a LaTeX-mode .tex file. This seems suboptimal to me. I attach a
> patch for your consideration.

Thanks for your proposal. Actually, I'm not sure what to do with this
issue.

As you say, .tex extension is shared among LaTeX, plain TeX and ConTeXt.
(I think we can ignore SliTeX and AmSTeX.) When AUCTeX adds .tex to
`semantic-symref-filepattern-alist', `xref-find-references' searches all
.tex files, if I understand correctly. Therefore, if LaTeX files and
plain TeX files are in the same directory, M-? typed in the LaTeX file
buffers would look into plain TeX files as well. In theory, this can
lead to false positive result. Is this legitimate behavior for xref.el?
If it is for sure, I think AUCTeX can accept your patch.
(Or, maybe AUCTeX should have a new customize option to control to have
.tex extension in `semantic-symref-filepattern-alist' so that users
can decide to allow such false positives or not?)

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#71164: 14.0.5; Font lock annoyance

2024-05-24 Thread Ikumi Keita
Hi Derek and Paul,

> If I don't turn on font locking when I use AUCTeX, I'm getting
> annoying messages almost every keystroke:

>   Error during redisplay: (internal--syntax-propertize 7526) signaled (error 
> "Font-lock trying to use keywords before setting them up”)

Thanks for your report. I admit AUCTeX isn't good at this point. It
depends on font lock facility to perform syntax propertizing. :-(

>>>>> Paul Nelson  writes:
> Another workaround might be M-: (font-lock-set-defaults).

It seems it does work while font lock itself is still disabled. I
speculate that the current syntax propertize function only needs that
font lock variables are set up. Then I hope the patch below does the
trick.

Derek, can you try it?

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW

diff --git a/font-latex.el b/font-latex.el
index ccddd8b1..7a02e3f4 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -1313,7 +1313,10 @@ triggers Font Lock to recognize the change."
   (let ((kws ;; (if (derived-mode-p 'docTeX-mode)
  ;; font-latex-doctex-syntactic-keywords
font-latex-syntactic-keywords)) ;; )
-(syntax-propertize-via-font-lock kws)))
+(let ((func (syntax-propertize-via-font-lock kws)))
+  (lambda (start end)
+(or font-lock-set-defaults (font-lock-set-defaults))
+(funcall func start end)
 
 ;;;###autoload
 (defun font-latex-setup ()



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


bug#70503: [PATCH] Add function "TeX-master-output-file"

2024-05-14 Thread Ikumi Keita
>>>>> Arash Esbati  writes:
> Ok, thanks.  I think we'll wait until the patch for bug#70811 is
> installed and then we can start the release process.  Unless I'm missing
> something?

Now bug#70811 is resolved. I think we can go now.

Bye,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW



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


bug#70811: ConTeXt-mode-cleanup clobbers my paragraph-start

2024-05-14 Thread Ikumi Keita
Hi Jim,

>>>>> Jim  writes:
> In the interest of getting you an answer quickly, I only tested it for
> about 5 minutes, but in all of those tests, I can happily say that it did
> what I wanted it to do.

Thanks for testing. I pushed the fix to the git repository.

>> You can use
>> (add-hook 'LaTeX-mode-hook
>> (lambda ()
>> (add-hook 'find-file-hook
>> (lambda ()
>> (setq paragraph-start "abc")) <-- Set whatever you like
>> nil t)))
>> in your init file if you really need, but I'd like you to try the patch
>> below first.

> Thanks for that emacs-fu.  (Although I wonder if I want 'ConTeXt-mode-hook'
> intead of 'LaTeX-mode-hook'.)

You are right. That's `ConTeXt-mode-hook'. 💦

> Regardless of what hook I should use, this version of your patch seems to
> work very nicely.  Thank you for all the time you have put into this.

You're welcome. I'll close this bug.

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#70817: 14.0.3.2024-03-17; max-lisp-eval-depth exceeded with XeTeX option

2024-05-13 Thread Ikumi Keita
Hi Landis,

>>>>> "Landis Florian (ladi)"  writes:
> Am 09.05.2024 um 15:01 schrieb Ikumi Keita:
>> I think this must be the issue bug#69373[1]. Landis, can you try the
>> patch given in [2]? If not, either
>> A. Update your emacs to 29.3 or

> I can confirm that the problem goes away if I use emacs 29.3.

> Thanks,

Thank you for confirmation. I'll close this bug.

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#70811: ConTeXt-mode-cleanup clobbers my paragraph-start

2024-05-13 Thread Ikumi Keita
Hi Jim,

>>>>> Jim  writes:
> Thank you very much for spending some time on this.  I tried it on this
> section of code

> \startitemize[yadda]
> \item sslkdslkd lskdlskdls slkd slkdslk
> sldk sldkl
> lkslks d sldsldk s sldksldk slkdsldksd sldsldk s sldksldk slkdsldksd
> sldsldk s sldksldk slkdsldksd
> \item sldsldk s sldksldk slkdsldksd
> \item fill this paragraph right here
> fill this paragraph right here fill this paragraph right here
> fill this paragraph right here
> \stopitemize

> and if I run fill-paragraph on the last item, I get

> ...
> \item fill this paragraph right here fill this paragraph right here fill
>   this paragraph right here fill this paragraph right here \stopitemize

> (i.e., the \stopitemize has become "part of" the "\item" paragraph).  I
> won't try to imagine what other ConTeXt users want, but I don't like this.

Thanks for your report. I'm sorry, I was wrong at altering regexp
generation code. Can you try the attached patch? (Undo the last patch
and apply the attached patch to the fresh source, please.)

> I wonder if the default definition should (could?) somehow capture all
> of them.

I expect the revised patch fills that bill.

> Given that the (interactive) customization doesn't want the leading
> '\',

Do you mean that `ConTeXt-paragraph-commands' doesn't include the
leading backslash? Then it isn't specific to interactive customization.
It is desgined after LaTeX counterpart, which also doesn't include the
leading backslash.

> is there any way to add that to paragraph-start with the code you
> recently added?

You can use
(add-hook 'LaTeX-mode-hook
  (lambda ()
 (add-hook 'find-file-hook
(lambda ()
   (setq paragraph-start "abc")) <-- Set whatever you like
nil t)))
in your init file if you really need, but I'd like you to try the patch
below first.

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW

>From edc178926f57eca69c1676715657486f2e6ac952 Mon Sep 17 00:00:00 2001
From: Ikumi Keita 
Date: Thu, 9 May 2024 14:47:06 +0900
Subject: [PATCH] Improve paragraph commands management for ConTeXt mode
 (bug#70811)

* context.el (ConTeXt-paragraph-commands): New customize option similar
to LaTeX counterpart.
(ConTeXt-extra-paragraph-commands): Provide proper defvar.
(ConTeXt-paragraph-commands-regexp-make): Rename from
`ConTeXt-paragraph-commands-regexp' for consistency with latex.el.
Include `ConTeXt-paragraph-commands' to generate the regexp.
(ConTeXt-paragraph-commands-regexp): Add alias for backward
compatibility.
(ConTeXt-set-paragraph-start): Factor out following latex.el.
(ConTeXt-paragraph-commands-add-locally): New convinience function
similar to LaTeX counterpart.
(ConTeXt-mode-cleanup): Use new functions.
---
 context.el | 63 +-
 1 file changed, 48 insertions(+), 15 deletions(-)

diff --git a/context.el b/context.el
index 0d5b9adb..8b0c88ee 100644
--- a/context.el
+++ b/context.el
@@ -53,9 +53,6 @@
 (require 'latex) ; for functions like `TeX-look-at' and `LaTeX-split-long-menu'
 (require 'plain-tex) ; for `plain-TeX-common-initialization'
 
-;; Silence the compiler:
-(defvar ConTeXt-extra-paragraph-commands)
-
 (defgroup ConTeXt-macro nil
   "Special support for ConTeXt macros in AUCTeX."
   :prefix "TeX-"
@@ -1121,18 +1118,59 @@ If OPTIONAL, only insert it if not empty, and then use square brackets."
 (defvar ConTeXt-item-list ()
   "List of macro's considered items.")
 
-(defun ConTeXt-paragraph-commands-regexp ()
-  "Return a regexp matching macros that should have their own line."
+(defvar ConTeXt-extra-paragraph-commands nil
+  "List of default ConTeXt macros that should begin their own line.
+Unlike `ConTeXt-paragraph-commands', each entry should be a regular
+expression without leading backslash.
+Updated in language-specific initialization.")
+
+(defcustom ConTeXt-paragraph-commands nil
+  "List of user ConTeXt macros that should begin their own line.
+The list should contain macro names without the leading backslash.
+
+If you change this variable, its value is reflected to only new buffers
+created afterwards; existing ConTeXt mode buffers aren't affected."
+  :group 'ConTeXt-macro
+  :type '(repeat (string)))
+
+(defun ConTeXt-paragraph-commands-regexp-make ()
+  "Return a regexp matching macros that should begin their own line."
   (concat
-   (regexp-quote TeX-esc) "\\("
+   (regexp-quote TeX-esc) "\\(?:"
"[][]\\|"  ; display math delimitors (is this applicable to ConTeXt??)
(ConTeXt-environment-start-name) "\\|"
(ConTeXt-environment-stop-nam

bug#70817: 14.0.3.2024-03-17; max-lisp-eval-depth exceeded with XeTeX option

2024-05-09 Thread Ikumi Keita
Hi Landis and all,

>>>>> "Landis Florian (ladi)"  writes:
>   latex-mode()

>   #(mode LaTeX)
>   apply(# (mode LaTeX))
>   hack-one-local-variable(mode LaTeX)

I think this must be the issue bug#69373[1]. Landis, can you try the
patch given in [2]? If not, either
A. Update your emacs to 29.3 or
B. Put the following code block into somewhere in your init file
(~/.emacs.d/init.el)

--
(defun hack-one-local-variable (var val)
  "Set local variable VAR with value VAL.
If VAR is `mode', call `VAL-mode' as a function unless it's
already the major mode."
  (pcase var
('mode
 (let ((mode (intern (concat (downcase (symbol-name val))
  "-mode"
   (set-auto-mode-0 mode t)))
('eval
 (pcase val
   (`(add-hook ',hook . ,_) (hack-one-local-variable--obsolete hook)))
 (save-excursion (eval val t)))
(_
 (hack-one-local-variable--obsolete var)
 ;; Make sure the string has no text properties.
 ;; Some text properties can get evaluated in various ways,
 ;; so it is risky to put them on with a local variable list.
 (if (stringp val)
 (set-text-properties 0 (length val) nil val))
 (set (make-local-variable var) val
--

Sorry for inconvenience.

[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=69373
[2] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=69373#14

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#70811: ConTeXt-mode-cleanup clobbers my paragraph-start

2024-05-08 Thread Ikumi Keita
Hi Jim,

>>>>> Jim  writes:
>> I think I can implement `ConTeXt-paragraph-commands' like LaTeX mode and
>> then you can set it instead of `paragraph-start'. What do you think
>> about this idea?

> I spent a few minutes looking at the code; I now have a glimmer of
> understanding, thanks.

> I still am unclear about why the setting of paragraph-start is done in
> the after-hook, rather than before the user's hook is called. However,
> it may well be that I don't need to understand this.

Suppose that there is a file local variable entry for
`LaTeX-paragraph-commands'. LaTeX mode uses after-hook so that its value
is reflected to `paragraph-start'. In addition, AUCTeX style files
casually overwrite `paragraph-start' to support various paragraph
commands; in that procedure, they never care what the user set to
`paragraph-start' in the mode hook and just overwrite. In other words,
AUCTeX doesn't consider `paragraph-start' as a variable which is to be
customized in the mode hook. The users are expected to use other
variables to control `paragraph-start'.

> I think your solution would work for me. My current paragraph-start
> does not have "[ \t]*" and yet does what I want, but perhaps having "[
> \t]*" won't hurt. Maybe it will make things better in some way I don't
> see now. Time will tell.

> In summary, thanks very much for the response, and if you are able to
> implement that for ConTeXt-mode I would very much appreciate it.

Thanks. Can you try the attached patch? If you customize the new option
`ConTeXt-paragraph-commands', its value will be reflected to
`paragraph-start' (for new buffers created after the customization).

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW

>From b6bbde5c5678f23fdf6031d7f5dd29e811a792cd Mon Sep 17 00:00:00 2001
From: Ikumi Keita 
Date: Thu, 9 May 2024 14:47:06 +0900
Subject: [PATCH] Improve paragraph commands management for ConTeXt mode
 (bug#70811)

* context.el (ConTeXt-paragraph-commands): New customize option similar
to LaTeX counterpart.
(ConTeXt-extra-paragraph-commands): Provide proper defvar.
(ConTeXt-paragraph-commands-regexp-make): Rename from
`ConTeXt-paragraph-commands-regexp' for consistency with latex.el.
Make efficient regexp using `regexp-opt'.
(ConTeXt-paragraph-commands-regexp): Add alias for backward
compatibility.
(ConTeXt-set-paragraph-start): Factor out following latex.el.
(ConTeXt-paragraph-commands-add-locally): New convinience function
similar to LaTeX counterpart.
(ConTeXt-mode-cleanup): Use `ConTeXt-set-paragraph-start' so that the
value of `ConTeXt-paragraph-commands' is refected to `paragraph-start'.
---
 context.el | 79 +++---
 1 file changed, 57 insertions(+), 22 deletions(-)

diff --git a/context.el b/context.el
index 0d5b9adb..3ccd0637 100644
--- a/context.el
+++ b/context.el
@@ -53,9 +53,6 @@
 (require 'latex) ; for functions like `TeX-look-at' and `LaTeX-split-long-menu'
 (require 'plain-tex) ; for `plain-TeX-common-initialization'
 
-;; Silence the compiler:
-(defvar ConTeXt-extra-paragraph-commands)
-
 (defgroup ConTeXt-macro nil
   "Special support for ConTeXt macros in AUCTeX."
   :prefix "TeX-"
@@ -1121,18 +1118,61 @@ If OPTIONAL, only insert it if not empty, and then use square brackets."
 (defvar ConTeXt-item-list ()
   "List of macro's considered items.")
 
-(defun ConTeXt-paragraph-commands-regexp ()
-  "Return a regexp matching macros that should have their own line."
+(defvar ConTeXt-extra-paragraph-commands nil
+  "List of default ConTeXt macros that should begin their own line.
+Updated in language-specific initialization.")
+
+(defcustom ConTeXt-paragraph-commands nil
+  "List of user ConTeXt macros that should begin their own line.
+The list should contain macro names without the leading backslash.
+
+If you change this variable, its value is reflected to only new buffers
+created afterwards; existing ConTeXt mode buffers aren't affected."
+  :group 'ConTeXt-macro
+  :type '(repeat (string)))
+
+(defun ConTeXt-paragraph-commands-regexp-make ()
+  "Return a regexp matching macros that should begin their own line."
   (concat
-   (regexp-quote TeX-esc) "\\("
+   (regexp-quote TeX-esc) "\\(?:"
"[][]\\|"  ; display math delimitors (is this applicable to ConTeXt??)
-   (ConTeXt-environment-start-name) "\\|"
-   (ConTeXt-environment-stop-name) "\\|"
-   (mapconcat #'car ConTeXt-numbered-section-list "\\b\\|") "\\b\\|"
-   (mapconcat #'car ConTeXt-unnumbered-section-list "\\b\\|") "\\b\\|"
-   (mapconcat #'identity Con

bug#70811: ConTeXt-mode-cleanup clobbers my paragraph-start

2024-05-06 Thread Ikumi Keita
Hi Jim,

>>>>> Jim  writes:
> ConTeXt mode has the defun ConTeXt-mode-cleanup which is the :after-hook
> of ConTeXt-mode.  In this cleanup defun, paragraph-start is re-set.
> Unfortunately, this over-writes my choice of paragraph-start which I set
> in my ConTeXt-mode hook.  Unless there is some ":after-after-hook" or
> ":really-after-hook" or ":my-after-hook" or some other (unknown to me)
> way of doing something after ConTeXt-mode-cleanup, I have to
> handraulically (re-)setq paragraph-start after loading my file.

> This is not a good thing.

> The comment in context.el mentions doing this for reasons similar to the
> same part of latex.el,
>   ;; Don't do locally-bound test for `LaTeX-paragraph-commands-regexp'
>   ;; and `paragraph-start'.  See comments in similar part in latex.el.
> but not being a latex user I don't understand why this is desired for latex
> users, and so I can't transmogrify that to why context users might want
> this.

> In any case,
> (a) do we really need the paragraph-start setting code in context.el, and
> (b) if so, could there be some user option which tells ConTeXt-mode-cleanup
> to *not* setq paragraph-start ?

> (Or perhaps there is already a way which I don't have enough emacs-fu to
> know.  I am happy to be enlightened.)

Thank you for the report. The reason for LaTeX mode is that this
treatment enables AUCTeX to add flexibly new commands afterwards as
paragraph starters through sub files supporting various LaTeX packages
("style files" in AUCTeX terminology). AUCTeX style files overwrites
`paragraph-start' casually in LaTeX mode, so users who want to customize
it in the LaTeX mode hook should actually set `LaTeX-paragraph-commands'
instead.

In principle, ConTeXt mode should have similar framework, although the
current AUCTeX style files have no support for ConTeXt modules except
TikZ.

I think I can implement `ConTeXt-paragraph-commands' like LaTeX mode and
then you can set it instead of `paragraph-start'. What do you think
about this idea?

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#70779: [PATCH] Emacs 30 and warning about missing lexical-binding declaration

2024-05-06 Thread Ikumi Keita
Hi Arash,

>>>>> Arash Esbati  writes:
> Thanks for your response; we don't really need them, it was driven by my
> habit of having prop-lines justified right.  A simple

>   ;; -*- lexical-binding: t;

> looked odd to me.

Hmm, it doesn't to me. :-)

> What do you think is appropriate?

I think these auto files are generally not intended for human eyes. So
we wouldn't have to care much about the justtification of the prop line.
I vote for simpler form.

Best,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW



___
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 Ikumi Keita
Hi Arash,

>>>>> Arash Esbati  writes:

> 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.

I'm not actually against your proposal, but why do we need 40 spaces here?

>> +  (insert ";;" (make-string 40 ?\s) "-*- lexical-binding: t; 
>> -*-\n\n")
       

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#58005: 13.1.4; Can't work with indirect buffers

2024-05-04 Thread Ikumi Keita
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#70503: [PATCH] Add function "TeX-master-output-file"

2024-04-27 Thread Ikumi Keita
>>>>> Arash Esbati  writes:
> Thanks Keita.  Can you in future also add/amend the bug number to the
> commit message, please?  It makes it easier to search for a bug inside
> Git.

Oh, sorry. I forgot to fix up the commit messages to include the bug
number for recent commits. :-(

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#70503: [PATCH] Add function "TeX-master-output-file"

2024-04-26 Thread Ikumi Keita
Hi Arash,

>>>>> Arash Esbati  writes:
> Thanks for looking at this.  The new workflow (for the time being) is
> actually the old one: Push all changes to the master branch, and we can
> merge that onto main when needed.  The only minor change is probably to
> add noteworthy changes to NEWS.org and not to changes.texi.

Thanks, I committed to the master branch and pushed. I'll close this
bug.

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#70503: [PATCH] Add function "TeX-master-output-file"

2024-04-26 Thread Ikumi Keita
Hi Paul,

>>>>> Paul Nelson  writes:
> I think that a function as in the attached patch, which wraps the
> function TeX--master-output-dir introduced along with TeX-output-dir,
> would be a useful addition to the public-facing API.  For example, I
> would use it in both of the packages that I recently shared on the
> devel list (these would otherwise refer to the internal function
> TeX--master-output-dir).  Any other suggestions are welcome, of
> course.

The proposed function seems reasonable enough and I think AUCTeX can
accept it.

To Tassilo & Arash: I'm not sure the new workflow after the inclusion of
the main branch. Should I commit new changeset to main branch instead of
master branch now? And should I add an entry for NEWS.org, in addition
to commit message?

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#58005: 13.1.4; Can't work with indirect buffers

2024-04-25 Thread Ikumi Keita
[ To phil...@haselwarter.org: I'm sorry, the thread began to fail to
include you in Cc:; It seems to reach a reasonable solution. ]

>>>>> Vangelis Evangelou  writes:
> OK. I attach the diff.
> On Wed, 24 Apr 2024 at 10:57, Ikumi Keita  wrote:

Thanks, I added small adaptaion and a paragraph explaining the
preview-document behavior, and pushed to the git repo. I'll close this
bug.

>> To AUCTeX admins: Do you think Vangelis'es patch needs copyright
>> assignment? In my opinion, it doesn't because definition of
>> `TeX-buffer-file-name' is straightforward and other changes are trivial
>> (replacements of `buffer-file-name' -> `TeX-buffer-file-name' or
>> additions of `(with-current-buffer (or (buffer-base-buffer)
>> (current-buffer))...')

I committed with "Copyright-paperwork-exempt: yes".
 
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#70501: [PATCH] Fix preview bug involving long common suffixes

2024-04-24 Thread Ikumi Keita
Hi Paul,

>>>>> Paul Nelson  writes:
> These positions are recovered by Emacs using calls to search-forward
> that always start at the beginning of line.  The strings that should
> identify the end of overlay2 also match the end of overlay1, hence the
> bug.  The fix is to bump the point forward, before searching, by just
> enough so that the search must go beyond any previous position
> identified on the same line.

Thanks, pushed to the git repo. I'll close this bug.

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#58005: 13.1.4; Can't work with indirect buffers

2024-04-24 Thread Ikumi Keita
Hi Vangelis,

>>>>> Vangelis Evangelou  writes:
> Hi all.
> I'm not sure what the ideal outcome is. It depends on each user's case. In
> principle, indirect buffers have identical text content as their base
> buffer, but different view properties, so the previews not showing in the
> indirect buffer agrees with this principle. I therefore, agree with Paul's
> comment.

Thank you. Then I think AUCTeX can incorporate your proposal. Can you
make an entry for doc/changes.texi and send the diff? 

To AUCTeX admins: Do you think Vangelis'es patch needs copyright
assignment? In my opinion, it doesn't because definition of
`TeX-buffer-file-name' is straightforward and other changes are trivial
(replacements of `buffer-file-name' -> `TeX-buffer-file-name' or
additions of `(with-current-buffer (or (buffer-base-buffer)
(current-buffer))...')

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#58005: 13.1.4; Can't work with indirect buffers

2024-04-23 Thread Ikumi Keita
Hi Paul and Vangelis,

>>>>> Paul Nelson  writes:
>> Ah, I see. Thanks for confirmation. I didn't try region preview. The
>> previews do appear in the indirect buffer if I type C-c C-p C-b etc.
>> 
>> I expect you see what I described if you type C-c C-p C-d in the
>> indirect buffer.

> OK, good -- we're on the same page then.

> For whatever it's worth, in my opinion, this is the correct behavior:
> preview-document should not be responsible for indirect buffers, a bit
> like how it is not responsible for buffers having the given TeX-master
> that do not appear \include'd in that TeX-master's source.

OK. Vangelis, what do you think about it? The same opinion?

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#58005: 13.1.4; Can't work with indirect buffers

2024-04-23 Thread Ikumi Keita
Hi Paul,

>>>>> Paul Nelson  writes:
> For me, previews work fine in indirect buffers with this patch (based
> on 20 mins of usage).  I don't see anything like what you described
> (previews appearing in the base buffer).

Ah, I see. Thanks for confirmation. I didn't try region preview. The
previews do appear in the indirect buffer if I type C-c C-p C-b etc.

I expect you see what I described if you type C-c C-p C-d in the
indirect buffer.

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#70455: [PATCH] Add new user option `preview-leave-open-previews-visible'

2024-04-23 Thread Ikumi Keita
Hi Paul,

>>>>> Paul Nelson  writes:
> Please see attached.  Thanks, best,  Paul

Thanks, but it is half of what I wanted :-)

I added a paragraph to your propsal as the attached patch. Can you
confirm it?

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW

>From 195bceed828c7a16bed9c63a2db08ec1667a8264 Mon Sep 17 00:00:00 2001
From: Ikumi Keita 
Date: Tue, 23 Apr 2024 23:45:42 +0900
Subject: [PATCH] Supplement documentation

* doc/preview-latex.texi (The Emacs interface):
* preview.el.in (preview-leave-open-previews-visible):
Adjust and enhance the explanation of the new customize option.
---
 doc/preview-latex.texi | 7 ++-
 preview.el.in  | 8 +++-
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/doc/preview-latex.texi b/doc/preview-latex.texi
index 0c1fb730..0bce9747 100644
--- a/doc/preview-latex.texi
+++ b/doc/preview-latex.texi
@@ -674,7 +674,12 @@ current point should be temporarily opened.  Default value is @code{nil}.
 
 @item preview-leave-open-previews-visible
 This boolean variable determines whether to leave preview images visible
-(above their generating TeX code) when they are opened.
+when they are opened.
+
+There is a side effect in enabling this option.  The preview image doesn't
+turn into construction sign temporarily when you edit the underlying
+@LaTeX{} code and regenerate the preview; it is just replaced by updated
+image when ready.  This behavior suppresses flicker in the appearance.
 
 @end vtable
 
diff --git a/preview.el.in b/preview.el.in
index 1f65f728..a2c0235d 100644
--- a/preview.el.in
+++ b/preview.el.in
@@ -1213,7 +1213,13 @@ is located."
 (defcustom preview-leave-open-previews-visible nil
   "Whether to leave previews visible when they are opened.
 If nil, then the TeX preview icon is used when the preview is opened.
-If non-nil, then the preview image is moved above the text."
+If non-nil, then the preview image remains visible.  In either case, the
+TeX code appears either below or to the right of the displayed graphic.
+
+If you enable this option, the preview image doesn't turn into
+construction sign temporarily when you edit the underlying LaTeX code
+and regenerate the preview; it is just replaced by updated image when
+ready.  This behavior suppresses flicker in the appearance."
   :group 'preview-appearance
   :type 'boolean)
 
-- 
2.44.0

___
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-04-23 Thread Ikumi Keita
Hi,

>>>>> Paul Nelson  writes:
>> Can you try the following command on terminal? Replace auctex-dir below with 
>> our auctex directory.
>> patch -ruN -d auctex-dir < indirect2.patch

> I'm trying this from the latest origin/master, but happy to try
> something else if you think that'd be a good idea.

> auctex % patch -ruN -d . < indirect2.patch

Vangelis'es patch doesn't apply straight to the current master. It
begins with
...
--- auctex-13.3/bib-cite.el  ...
+++ auctex-13.3-modified/bib-cite.el ...
...
, which means that he is playing with AUCTeX 13.3 source (probably,
installation from ELPA).

I used
patch -p1 < indirect2.patch
in the top directory of the local git repo and took care of the rejected
hunks manually.

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#58005: 13.1.4; Can't work with indirect buffers

2024-04-23 Thread Ikumi Keita
[ Please keep Cc: 58...@debbugs.gnu.org when you reply so that the record 
remains in the bug tracker. ]

>>>>> Vangelis Evangelou  writes:

> Regarding `TeX-master-file', I don't know what is the correct order that
> the various conditions need to be checked. There might be a situation where
> the file is shared between two master files. As far as I can tell, auctex
> allows for this by setting TeX-master to 'shared as a local variable. In
> that case you might want to have the main buffer set to one of the master
> files and the indirect buffer set to the other master file. Is that a
> desirable functionality? I personally don't use that options.

It isn't clear for me, too :-) In theory, base buffer and cloned buffer
can have different master file as you say and the user can make use of
that duality. However, the user must remember which buffer has which
master file in that case, between buffers with identical contents. That
doesn't seem a useful feature to me.

> I think there is a simpler way to approach this. We should have the
> function check at the beginning if the buffer is indirect, and switch
> temporarily to the base buffer before doing the rest of the operations.

This can be a solution, indeed.

> This is perhaps simpler, but does not allow for the situation I mentioned
> above with the two masters. The way to do that is with
>   (with-current-buffer
>  (or (buffer-base-buffer) (current-buffer)))
> at the beginning of the function. There is also another function that is
> affected: `TeX-normal-mode' which calls `normal-mode'. In the documentation
> is says:
> If invoked in a buffer that doesn’t visit a file, this function
> processes only the major mode specification in the -*- line and
> the local variables spec.
> I found that it doesn't correctly set the local variables if
> TeX-normal-mode is run on the indirect buffer.

OK.

> I attach the updated patch. I have tested this, and it works for me. Please
> let me know what you think.

A brief testing didn't show fatal behavior. Here are two notes I noticed:
1. In indirect buffer, preview-latex doesn't work. All preview images
   appear in the base buffer.
2. TeX Fold mode works independently in indirect and base buffers.

I suppose there will be dissatisfied users about item 1. Do you have any
good idea about it?
Item 2 can be a useful feature rather than a shortcoming, whereas some
users want to inherit the folded appearance when they clone a buffer.

Maybe we should regard these points as feature and announce them as
"known limitations".

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#70455: [PATCH] Add new user option `preview-leave-open-previews-visible'

2024-04-23 Thread Ikumi Keita
Hi Paul,

>>>>> Paul Nelson  writes:
> Yes, that's right.  This behavior could just as well be its own
> customization option, perhaps "preview-indicate-regeneration"
> (default: t), independent of the option
> "preview-leave-open-previews-visible" just added; let me know if you'd
> prefer that.  I'll also be happy to update the doc/texi if that's what
> you intend

I'd like to have updates in the documentation. New customize option is
probably overkilling.

>  (presumably by sending a patch on top of the current one, to this
> thread?)

Yes, please.

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#70455: [PATCH] Add new user option `preview-leave-open-previews-visible'

2024-04-22 Thread Ikumi Keita
Hi Paul,

>>>>> Paul Nelson  writes:
> I think there is no such debris, and have attempted to check this, but
> would be happy to learn that I missed something.  The EXCEPTION
> argument is used only in preview-place-preview, where it is the
> overlay being generated -- not something we want to clearout.  The
> changes to preview-place-preview have the effect of keeping the old
> overlays around long enough for the call to preview-gs-place (via
> preview-call-hook) to be able to use the image from the old overlay in
> place of the construction symbol, eliminating the flicker that would
> otherwise occur when regenerating a preview.  The subsequent call to
> preview-clearout should in fact delete that old image, but it stays in
> the cache long enough to serve its fleeting purpose.  Happy to discuss
> further if that'd clarify.

Thanks for clarification. If I understand correctly, "use the image from
the old overlay in place of the construction symbol" means that the user
can't tell whether a particular preview image is to be updated
afterwards or has already been updated, by its appearance only, during
the regeneration process is running. Right? Though I don't object to
that behavior, I think that difference should be mentioned somewhere in
the documentation as a feature (side effect) of non-nil value of the new
customize option.

>> The TeX code appears _to right of_ the preview for inline math
>> expression for me. Is this a misbehavior? Or does your above sentence
>> miss this case?

> You're right, for inlined math, it appears to the right (and for
> displayed math, it's like in my summary).  This is the intended
> behavior, the idea being that someone watching your screen (in person
> or remotely) can stay focused on the equation.

Thanks. Then I'd like to request to update the doc string and
preview-latex.texi accordingly.

To Arash:
It seems that the reason you saw the preview image above the TeX code is
that your inline math is at the beginning of line; in that situation, my
example indeed behaves as you described, too.

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#70455: [PATCH] Add new user option `preview-leave-open-previews-visible'

2024-04-22 Thread Ikumi Keita
Hi Arash and Paul,

>>>>> Arash Esbati  writes:
> I don't have a suggestion for a better name, but another comment.  Your
> patch uses `cl-find-if' which is a function.  Until now, we used only
> macros from the cl-lib inside AUCTeX in order to have no other runtime
> dependencies.  In general, I have no problem if we lift this limitation
> and use cl-lib functions as well -- the library is part of Emacs and why
> not use it.  But before we do this, I'd like to hear from Keita and
> Tassilo what they think about this.

I don't mind. It doesn't matter to use emacs built-in library to write
code simply.

I'd like to ask Paul some questions:

> Paul Nelson  writes:

>> With the new user option disabled, behavior is instead:
>> 
>> - When you enter a preview, it remains visible.  The tex code appears
>> below the preview.

The TeX code appears _to right of_ the preview for inline math
expression for me. Is this a misbehavior? Or does your above sentence
miss this case?

I don't understand the change as a whole, but it seems that this change
extends cases which doesn't touch the preview images through EXCEPTION
argument of `preview-clearout' function. Doesn't this lead to leave some
kind of "debris" which needs additional clean-up facility after usage of
preview-latex?

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#70399: ConTeXT options need updating

2024-04-21 Thread Ikumi Keita
Hi Jim,

>>>>> Jim  writes:
>> Do you think AUCTeX should do smart action to avoid "--nonstopmode" when
>> "--synctex" is requested by the user, so that
>> (setq ConTeXt-texexec-option-nonstop "")
>> isn't necessary on the user side?  It isn't difficult to have
>> "--nonstopmode" only when `TeX-source-correlate-mode' and
>> `TeX-interactive-mode' are nil.

> I think that would be an even nicer solution!  I will point out that the
> Head Honcho of ConTeXT said (on the ConTeXT users mailing list)
> - running context in nonstop mode makes little sense

> He did not elaborate on that comment.  However, I note that when context
> finds an error in an input file, even without -nonstopmode, the process
> terminates (in a few tests I did) , unlike (e.g.,) pdftex, which as you
> know waits for user input.

> I spent a few minutes trying various command line options and commands
> inside the source file, and I can't get context to stop on error and wait
> for input.  This doesn't mean that there is no way to do it, and poking
> through the code I see a lot of code related to 'nonstopmode' and
> 'errorstopmode', but I don't know how to make context stop on an error and
> wait for input.

Thanks, I pushed the fix including the change to omit --nonstop option
when --synctex option is present.

> I could ask for clarification about this on the context users' list if you
> would like to hear a more authoritative opinion before making changes.  Let
> me know.

Thanks, I don't think that's necessary. I'll close this bug.

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#70399: ConTeXT options need updating

2024-04-20 Thread Ikumi Keita
Hi Jim,

>>>>> Jim  writes:
>> It is easy to remove "--texutil", but I'd like to ask whether it is safe
>> for older (before 2023) TeX distribution to do so. What was this option
>> "--texutil" for? Unfortunately, "context --help" of TeX Live 2024
>> doesn't give me useful information.

> I am a relatively recent ConTeXt convert, so I have never used it.
> However, the documentation I can find indicates that texutil was used for
> ConTeXt Mk II, which has (long since) been deprecated (as I understand it).

> I guess since it doesn't hurt anything, it could stay, but I think that it
> has no use in ConTeXt Mk IV.

I see, thanks. I guess this option is necessary for only rather old
context binaries and expect it can be removed safely for now.

>>> (b) but if context is called with "--nonstopmode" (or "--nonstop")
>>> the "--synctex=..." request to create a synctex file is over-ridden.
>>> It is easy for a user who knows what is going on to use
>>> (setq ConTeXt-texexec-option-nonstop "")

Do you think AUCTeX should do smart action to avoid "--nonstopmode" when
"--synctex" is requested by the user, so that
(setq ConTeXt-texexec-option-nonstop "")
isn't necessary on the user side? It isn't difficult to have
"--nonstopmode" only when `TeX-source-correlate-mode' and
`TeX-interactive-mode' are nil.

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#70399: ConTeXT options need updating

2024-04-17 Thread Ikumi Keita
Hi Jim,

Thank you for your report. None of the AUCTeX maintainer uses ConTeXt,
so inputs from ConTeXt user are valuable.

>>>>> Jim  writes:
> (1) TeX-command-list contains the following
> ("ConTeXt" "%(cntxcom) --once --texutil %(extraopts) %(execopts)%t"
> and --texutil isn't in texlive 2023's context, texlive 2024's context,
> or the context in the ConTeXt distribution.

It is easy to remove "--texutil", but I'd like to ask whether it is safe
for older (before 2023) TeX distribution to do so. What was this option
"--texutil" for? Unfortunately, "context --help" of TeX Live 2024
doesn't give me useful information.

> (2) A recent change (early April 2024?) to context has changed how
> synctex is done.
> On the good side, with the right option context will produce a
> synctex file that epdfinfo knows how to parse.
> On the bad side,
> (a) rather than calling with "--synctex=1" (as done in
> ConTeXt-expand-options in context.el) the correct option is now
> "--synctex=repeat";
> (b) but if context is called with "--nonstopmode" (or "--nonstop")
> the "--synctex=..." request to create a synctex file is over-ridden.
> It is easy for a user who knows what is going on to use
> (setq ConTeXt-texexec-option-nonstop "")
> but changing --synctex=1 to --synctex=repeat seems to require
> a redefinition of the function.

> The --synctex=repeat version may not have reached texlive 2024 yet, but
> using --synctex=repeat with the version of context in TL2024 creates the
> same synctex file as --synctex=1, so there seems to be no harm in
> changing this.

OK, then I'll change "--synctex=1" to "--synctex=repeat", expecting that
the situation about compatibility is the same for older ConTeXt.

> Bonus "bug": TeX-submit-bug-report suggests upgrading to the version from
> https://www.gnu.org/software/auctex, but as of today that would be a
> downgrade, since it says the current auctex version is 13.3.

The message is followed by "if your installation is older than the one
available from the web site.", isn't it? 🙂

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#58005: 13.1.4; Can't work with indirect buffers

2024-04-17 Thread Ikumi Keita
Are all these your intention? If so, it is reasonable to have fixed nil
as the first argument in the above (1) because it is indeed irrelevant.
On the other hand, I'm not sure the necessity of the above (1) itself;
It seems to me that both (1a) and (1b) are to have been established when
emacs opens the base buffer first time and ready by the time
`TeX-master-file' is called in indirect buffer under usual
circumstances.

> I don't get the error that you mentioned. Can you please send me a
> traceback?

Sorry, my bad. It turned out that I was examining with code without your
patch. I confirmed that it actually runs without error. I apologize you.

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#58005: 13.1.4; Can't work with indirect buffers

2024-04-14 Thread Ikumi Keita
>>>>> Ikumi Keita  writes:
> . Why is the first argument always nil? The original function receives
> the second argument as `extension'. Aren't there cases that we should
  ^^
> provide the same argument `extension' here?

Sorry, I meant "first" here actually, rather than "second".

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#58005: 13.1.4; Can't work with indirect buffers

2024-04-14 Thread Ikumi Keita
Hi Vangelis,

>>>>> Vangelis Evangelou  writes:
> I am using indirect buffers with auctex and I am affected by this. My use
> is to have an indirect buffer narrowed to the preamble of my file.
> Typically, if I want to define a new command, I switch to the narrowed
> buffer instead of jumping at the top of the buffer to type the command and
> then go back to where I was later. I implemented a patch (attached) where,
> essentially, I replace instances of `buffer-file-name' with a new function
> `TeX-buffer-file-name' defined as

> (defun TeX-buffer-file-name (&optional BUFFER)
>   (buffer-file-name (or (buffer-base-buffer BUFFER) BUFFER)))

Thank you for your proposal. I'd like to comment on it. Please bear with
me if I'm saying something stupid since I don't know indirect buffer well.

Current AUCTeX source has some references to the variable
`buffer-file-name', as well as call to the function of the same name. It
seems that the variable is nil in indirect buffers. Is it safe to leave
those references unchanged?

> I also added a condition in TeX-master-file to check for indirect
> buffer.

The major portion of the addition is
(cond
[...]
 ;; Indirect buffer
 (my-buffer
  (with-current-buffer my-buffer
(TeX-master-file nil nondirectory ask)))
 ^^^
. Why is the first argument always nil? The original function receives
the second argument as `extension'. Aren't there cases that we should
provide the same argument `extension' here?

There are still some calls to the function `buffer-file-name' which
weren't replaced by `TeX-buffer-file-name' in the source. You can see
them with
git grep -E "[^-]buffer-file-name"
on the repo directory. (This lists references to the variable
`buffer-file-name' as well.)

It seems that the proposed change doesn't work in indirect buffer if
`TeX-output-dir' is specified. To try:
1. Open the following file.
2. Type C-x 4 c
3. Type C-c C-c RET
4. Then AUCTeX signals error with "LaTeX errors in ‘*~/test-tex/ 
output*’. Use C-c ` to display."
Can you resolve this problem?
--
\documentclass{article}
\begin{document}

dummy

\end{document}

%%% Local Variables:
%%% mode: LaTeX
%%% TeX-master: t
%%% TeX-output-dir: "build"
%%% End:
--

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#70307: [PATCH] Allow preview to work in non-file buffers

2024-04-11 Thread Ikumi Keita
Hi Arash,

>>>>> Arash Esbati  writes:
> @David and Keita: WDYT, any comments?

This makes difference only when the file name is "", so it
wouldn't affect almost all regular usage. Thus I'm fine with applying
this change.

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#70251: 14.0.4 install from gnu/elpa hangs

2024-04-07 Thread Ikumi Keita
Hi Peter,

>>>>> Peter Mao  writes:
> I'm running emacs 29.3 on GNU/Linux and OSX.  When I updated auctex from v
> 13.2.1 to v. 14.0.4, I see "Checking /elpa/auctex-14.0.4..."
> seemingly forever (until I give up and C-g it).

> Any guidance on what's going on here?  Auctex seems to be ok still (I just
> opened a .tex file and looked at it, but didn't push it any further), but
> my package-selected-packages list is all screwed up now.

Sorry for inconvenience. It is known that upgrading to AUCTeX 14 from 13
in running emacs session can lead to unsuccessful installation,
including infinite loop as you experienced.

The first thing which is worth trying is:
  1. Terminate the current running Emacs session and restart Emacs.
  2. Type ‘M-x package-recompile  auctex ’.
  3. Restart your Emacs again.

If you are lucky enough, this will basically resolve the issue. There is
still old ‘auctex-X.Y.Z’ directory left behind under
‘~/.emacs.d/elpa/’, so delete it manually to avoid future trouble.

If the above prescription doesn't work, then try:
  1. Uninstall AUCTeX once.
  2. Restart your Emacs and (before doing anything else) reinstall
 AUCTeX.

In theory, this recipe will circumvent all caveats in ELPA upgrade of
AUCTeX. Find and delete old ‘auctex-X.Y.Z’ directory remaining under
‘~/.emacs.d/elpa/’.

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#70128: Issue after upgrading ELPA-auctex 14.0.4

2024-04-03 Thread Ikumi Keita
Hi Angelo,

>>>>> Angelo Graziosi  writes:
>> ,
>> | − If your Emacs is 29 or newer and you use ‘desktop.el’ to save
>> |   and restore Emacs sessions, be careful before you update
>> |   AUCTeX; You should attempt to update only after
>> | 1. you kill all buffer under former AUCTeX modes which have
>> |overlapped name with Emacs built-in TeX modes, and
>> | 2. you terminate the current Emacs session.
>> |   The modes with such overlapped name are ‘plain-tex-mode’,
>> |   ‘latex-mode’, ‘doctex-mode’ and ‘texinfo-mode’.  (The above
>> |   prescription ensures no buffer of such modes is recorded in
>> |   the desktop file.  Otherwise those buffers would be restored
>> |   in the built-in modes, not AUCTeX modes, after the update of
>> |   AUCTeX.)
>> `

> It is the first time I hear this. I used my builds of AUCTeX for a
> long time when Emacs was 22 or 23 and never saw this kind of issues..

AUCTeX changed its major mode names at version 14. The above entry warns
about incompatibility caused by that change.

> If things are so, maybe it is better do not use AUCTeX at all... or not?

I think you don't have to worry about that. In general, the major mode
names are unlikely to change easily. This update to version 14 is very
exceptional.

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#70128: Issue after upgrading ELPA-auctex 14.0.4

2024-04-02 Thread Ikumi Keita
Hi Angelo,

>>>>> Angelo Graziosi via bug-auctex via Bug reporting list for AUCTeX 
>>>>>  writes:
> The following happens on Windows 10 64 and Emacs 29.3-1 installed from
> MSYS2/UCRT64 (mingw-w64-ucrt-x86_64-emacs 29.3-1, released/built with
> native compilation )

> When one starts Emacs it prints in Messages and minibuffer:

> imenu-default-create-index-function: Invalid (or missing) doc string
> ("c:/Users/utente/AppData/Roaming/.emacs.d/elpa/auctex-14.0.4/tex.elc"
> . 301409)

I don't understand why this error occurred, but this entry in CHANGES
entry may be related:
,
| − If your Emacs is 29 or newer and you use ‘desktop.el’ to save
|   and restore Emacs sessions, be careful before you update
|   AUCTeX; You should attempt to update only after
| 1. you kill all buffer under former AUCTeX modes which have
|overlapped name with Emacs built-in TeX modes, and
| 2. you terminate the current Emacs session.
|   The modes with such overlapped name are ‘plain-tex-mode’,
|   ‘latex-mode’, ‘doctex-mode’ and ‘texinfo-mode’.  (The above
|   prescription ensures no buffer of such modes is recorded in
|   the desktop file.  Otherwise those buffers would be restored
|   in the built-in modes, not AUCTeX modes, after the update of
|   AUCTeX.)
`
If emacs tried to restore the buffer in the built-in latex-mode,
something inconsistent which led to the reported error could happen...?

> After this the desktop file is "emptied": restarting Emacs all buffers
> of the desktop file are lost (I have lost about 50 of them :-( )

Sorry for that. 😣

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#69954: 13.3; allow TeX-fold auto-reveal customization

2024-03-25 Thread Ikumi Keita
Hi, Arash

>>>>> Arash Esbati  writes:
> Arrgh, my bad; I was looking at the other commit c290376d5d provided by
> Paul and installed by you -- sorry for the noise :-(

Don't worry, I don't mind. :-)

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#69954: 13.3; allow TeX-fold auto-reveal customization

2024-03-25 Thread Ikumi Keita
Hi Arash,

>>>>> Arash Esbati  writes:
> @Keita: We loosely try to follow the guidelines of Emacs which says[1]:

>   - Commit messages should not contain the "Signed-off-by:" lines that
> are used in some other projects.

Yes, I comitted without "Signed-off-by:" line, with me being the author.
Did you actually mean to mention another paragraph in CONTRIBUTE?
(By the way, I should have included the bug number in the commit
message. 😞)

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#69954: 13.3; allow TeX-fold auto-reveal customization

2024-03-24 Thread Ikumi Keita
>>>>> Paul Nelson  writes:
> Hi Ikumi,
> Looks good to me!

Thank you, pushed to the git repo. I'll close this bug.

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#69954: 13.3; allow TeX-fold auto-reveal customization

2024-03-24 Thread Ikumi Keita
Hi Paul,

>>>>> Paul Nelson  writes:
> It would be useful to be able to customize when TeX-fold-mode
> auto-reveals.  I attach a patch with my best attempt at this,
> imitating what is done in preview.el.

Thanks for your proposal. I'm considering to apply slightly modified
patch as attached. I intend to have all `defcustom's in the early
block of the file and to improve similarity with preview.el.

What do you think about this idea?

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW

diff --git a/tex-fold.el b/tex-fold.el
index 92304fb2..d786ff62 100644
--- a/tex-fold.el
+++ b/tex-fold.el
@@ -254,6 +254,34 @@ After that, changing the prefix key requires manipulating keymaps."
 (define-key map "i"#'TeX-fold-clearout-item)
 map))
 
+(defcustom TeX-fold-auto-reveal
+  '(eval (TeX-fold-arrived-via (key-binding [left]) (key-binding [right])
+   #'backward-char #'forward-char
+   #'mouse-set-point))
+  "Predicate to open a fold when entered.
+Possibilities are:
+t autoopens,
+nil doesn't,
+a symbol will have its value consulted if it exists,
+defaulting to nil if it doesn't.
+A CONS-cell means to call a function for determining the value.
+The CAR of the cell is the function to call which receives
+the CDR of the CONS-cell in the rest of the arguments, while
+point and current buffer point to the position in question.
+All of the options show reasonable defaults."
+  :group 'TeX-fold
+  :type '(choice (const :tag "Off" nil)
+ (const :tag "On" t)
+ (symbol :tag "Indirect variable" :value reveal-mode)
+ (cons :tag "Function call"
+   :value (eval (TeX-fold-arrived-via
+ (key-binding [left])
+ (key-binding [right])
+ #'backward-char #'forward-char
+ #'mouse-set-point))
+   function (list :tag "Argument list"
+  (repeat :inline t sexp)
+
 
 ;;; Folding
 
@@ -833,6 +861,22 @@ Remove the respective properties from the overlay OV."
   (when font-lock-mode
 (overlay-put ov 'face TeX-fold-unfolded-face)))
 
+(defun TeX-fold-auto-reveal-p (mode)
+  "Decide whether to auto-reveal.
+Return non-nil if folded region should be auto-opened.
+See `TeX-fold-auto-reveal' for definitions of MODE."
+  (cond ((symbolp mode)
+ (and (boundp mode)
+  (symbol-value mode)))
+((consp mode)
+ (apply (car mode) (cdr mode)))
+(t mode)))
+
+(defun TeX-fold-arrived-via (&rest list)
+  "Indicate auto-opening.
+Return non-nil if called by one of the commands in LIST."
+  (memq this-command list))
+
 ;; Copy and adaption of `reveal-post-command' from reveal.el in GNU
 ;; Emacs on 2004-07-04.
 (defun TeX-fold-post-command ()
@@ -855,11 +899,7 @@ Remove the respective properties from the overlay OV."
   (setq TeX-fold-open-spots (cdr spots))
   (when (or disable-point-adjustment
 global-disable-point-adjustment
-;; See preview.el on how to make this configurable.
-(memq this-command
-  (list (key-binding [left]) (key-binding [right])
-#'backward-char #'forward-char
-#'mouse-set-point)))
+(TeX-fold-auto-reveal-p TeX-fold-auto-reveal))
 ;; Open new overlays.
 (dolist (ol (nconc (when (and TeX-fold-unfold-around-mark
   mark-active)
___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


bug#54200: 13.0.14; Preview incorrectly folds math environments with TeX-engine LuaTeX

2024-03-06 Thread Ikumi Keita
>>>>> Arash Esbati  writes:
> Ikumi Keita  writes:
>> Hi David and Liam,
>> 
>>>>>>> Ikumi Keita  writes:
>>>> Error context is produced by the TeX engine itself, so in this case it
>>>> would be the fault of LuaTeX and should likely be reported to its
>>>> developer list at dev-lua...@ntg.nl .
>> 
>> I reported the issue in LuaTeX developer list[1], but it doesn't seem
>> promissing.
>> 
>> The core developers don't regard it as a bug basically, thus working
>> with low priority on it. This issue, if it is ever resolved, will be a
>> long way off unfortunately.
>> 
>> [1] Thread beginning with
>> https://mailman.ntg.nl/pipermail/dev-luatex/2022-March/006601.html

> Hi Keita,

> can we assume that this is a "wontfix"?  The way I see it we rely on
> LuaTeX here.

Yes, I think so. Thank you for enthusiatic work on unresolved bugs these
days!

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#69398: `LaTeX-fill-paragraph` behavior within indented environments

2024-03-06 Thread Ikumi Keita
Hi Ruiyang,

>>>>> Ruiyang Wu  writes:
> Hi Ikumi,
> Thanks for the reply and please take your time.

I figured out the reason but haven't come up with a satisfactory
solution.

[Basis]
The elisp function `save-excursion' uses marker internally to keep track
of the original position.

[Analysis]
,
| \documentclass{article}
| 
| \begin{document}
| \begin{itemize}
| \item In indented environments, when the point is at the first letter
| of a line, running ``LaTeX-fill-paragraph'' will move the point to
|   the beginning of the line. Ideally, it should stay with the letter.
| \end{itemize}
| \end{document}
`

During the course of the filling, in `LaTeX-indent-outer-do', the line
in question once loses its indent:
,
| \item In indented environments, when the point is at the first letter
| of a line, running ``LaTeX-fill-paragraph'' will move the point to the 
beginning of the line. Ideally, it should stay with the letter.
| \end{itemize}
`
At this time, the marker locates at the "correct" position, namely at
the first "o" in the line immediately after "item". In other words, it
is at the beginning of the line immediately after "item".

Then `LaTeX-indent-outer-do' calls `indent-to', which inserts
whitespaces, to give the correct indentation. However, this insertion is
done at the position of the marker that the `save-excursion' uses. This
means that emacs doesn't send the marker after the inserted whitespaces
because that's the default behavior of emacs. Therefore, the marker
stays at the beginning of the line and the point is moved to that
marker position after M-q finishes, rather than the position after the
indentation.

[Solution?]
We can work around this particular example by replacing
  (save-excursion
...)
in `LaTeX-fill-paragraph' with
  (let ((m (point-marker)))
(set-marker-insertion-type m t) ; Send marker after the inserted text.
...
(goto-char m)
(set-marker m nil))
, but I'm not sure this is the right thing to do:
1. This wouldn't match with behavior with other filling functions.
2. Even if we tweak all such occurences of `save-excursion', it isn't
   clear whether it is right that the position always "sticks" to the
   letter where before M-q is typed.

Does anyone find a good solution?

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#69398: `LaTeX-fill-paragraph` behavior within indented environments

2024-03-03 Thread Ikumi Keita
Hi Ruiyang,

>>>>> Ruiyang Wu  writes:
> Hi there,
> When the point is on the first letter of a line inside an indented 
> environment (e.g., itemize, proof, etc.), running `LaTeX-fill-paragraph` will 
> move the point to the beginning of the line. Here is a MWE:

> \documentclass{article}

> \begin{document}
> \begin{itemize}
> \item In indented environments, when the point is at the first letter
> of a line, running ``LaTeX-fill-paragraph'' will move the point to
>   the beginning of the line. Ideally, it should stay with the letter.
> \end{itemize}
> \end{document}

> 1. If the point is on the first “o” in the line immediately after “\item”, 
> running `LaTeX-fill-paragraph` moves the point to column 0, while “o” is 
> moved to column 2 because of the filling operation.
> 2. If the point is on the first “f” in the same line as above, the point 
> stays on “f” after running `LaTeX-fill-paragraph` (both moved to column 3).

> I think it is better to have consistent point behavior as in scenario 2, 
> because users probably want to continue editing after running `M-q’, and it 
> is much more efficient if the point stays on the same letter before and after 
> filling.

Sorry for late response. I confirmed what you reported (with fill-column
being 70) and had brief look at the relevant code. Unfortunately, the
code uses `save-excursion' to preserve the point, so it seems that
something very exceptional is happening. I'll try to figure out the
origin and fix it, but it can take a non trivial span of time. :-(

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#65750: 12.2; LaTeX-mark-section and LaTeX-section-list

2024-02-23 Thread Ikumi Keita
Hi Janet,

>>>>> Janet Chen  writes:
> Dear Ikumi,
> Thanks very much!

>> I installed a fix in the git repo, so you won't need the workaround
>> under the next AUCTeX release.
>> 
>> I'll close this bug.

I'm sorry to deliver you a bad news. In response to bug#69254[1], we
decided to revert the fix of bug#65750. This is in favor of being able
to turn on outline minor mode in `LaTeX-mode-hook'. See the thread of
[1] for detail.

Therefore, you again need the code block
(add-hook 'LaTeX-mode-hook
  (lambda ()
(add-hook 'hack-local-variables-hook
  (lambda ()
(setq-local outline-regexp (LaTeX-outline-regexp t))
(setq outline-heading-alist
  (mapcar (lambda (x)
(cons (concat "\\" (nth 0 x)) (nth 1 
x)))
  LaTeX-section-list)))
  nil t)))
in your init file to make `LaTeX-mark-section' recognize your customize
to `LaTeX-section-list' as the file local variable after the next AUCTeX
release.

Sorry for inconvenience.

[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=69254

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#69254: 14.0.2; outline-hide-body doesn't work when called in LaTeX-mode-hook

2024-02-23 Thread Ikumi Keita
Hi Arash,

>>>>> Arash Esbati  writes:
> Ikumi Keita  writes:
>> Do you think that we should also revert the similar changes for
>> paragraph related variables?

> I'm not sure if that part is really relevant for users.  I suggest we
> keep that as is and touch it if we get feedback from the users.  Does it
> make sense?

OK, then I'll install the current patch.

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#69254: 14.0.2; outline-hide-body doesn't work when called in LaTeX-mode-hook

2024-02-22 Thread Ikumi Keita
Hi Arash,

>>>>> Arash Esbati  writes:
> I think that "customized section commands defined in file local
> variables" is more a corner case than enabling `outline-minor-mode' via
> `LaTeX-mode-hook'; and we a have recipe for former if needed.  So it's
> up to us to make a decision here: there will be unhappy customers, but
> how many?  ;-)

I see, here is a tentative patch. Do you think that we should also
revert the similar changes for paragraph related variables?

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW

diff --git a/context.el b/context.el
index 5ee0217d..86991ccf 100644
--- a/context.el
+++ b/context.el
@@ -1875,9 +1875,8 @@ that is, you do _not_ have to cater for this yourself by adding \\=' or $."
   ;; Outline support
   (require 'outline)
   (set (make-local-variable 'outline-level) #'ConTeXt-outline-level)
-  ;; Moved after `run-mode-hooks'. (bug#65750)
-  ;; (set (make-local-variable 'outline-regexp) (ConTeXt-outline-regexp t))
-  ;;(make-local-variable 'outline-heading-end-regexp)
+  (set (make-local-variable 'outline-regexp) (ConTeXt-outline-regexp t))
+  (make-local-variable 'outline-heading-end-regexp)
   (setq TeX-header-end (ConTeXt-header-end)
 TeX-trailer-start (ConTeXt-trailer-start))
 
@@ -1913,10 +1912,7 @@ Run after mode hooks and file local variables application."
  "[ \t]*\\("
  (ConTeXt-paragraph-commands-regexp) "\\|"
  "\\$\\$\\|" ; Plain TeX display math
- "$\\)"))
-
-  (or (local-variable-p 'outline-regexp)
-  (setq-local outline-regexp (ConTeXt-outline-regexp t
+ "$\\)")))
 
 (defun context-guess-current-interface ()
   "Guess what ConTeXt interface the current buffer is using."
diff --git a/latex.el b/latex.el
index 83de0e84..de70c7f5 100644
--- a/latex.el
+++ b/latex.el
@@ -8268,16 +8268,6 @@ Run after mode hooks and file local variables application."
   (if (bound-and-true-p filladapt-mode)
   (turn-off-filladapt-mode))
 
-  ;; Don't overwrite the value the user set by hooks or file
-  ;; (directory) local variables.
-  (or (local-variable-p 'outline-regexp)
-  (setq-local outline-regexp (LaTeX-outline-regexp t)))
-  (or (local-variable-p 'outline-heading-alist)
-  (setq outline-heading-alist
-(mapcar (lambda (x)
-  (cons (concat "\\" (nth 0 x)) (nth 1 x)))
-LaTeX-section-list)))
-
   ;; Keep `LaTeX-paragraph-commands-regexp' in sync with
   ;; `LaTeX-paragraph-commands' in case the latter is updated by
   ;; hooks or file (directory) local variables.
@@ -8441,13 +8431,12 @@ function would return non-nil and `(match-string 1)' would return
 
   (require 'outline)
   (set (make-local-variable 'outline-level) #'LaTeX-outline-level)
-  ;; Moved after `run-mode-hooks'. (bug#65750)
-  ;; (set (make-local-variable 'outline-regexp) (LaTeX-outline-regexp t))
-  ;; (when (boundp 'outline-heading-alist)
-  ;;   (setq outline-heading-alist
-  ;; (mapcar (lambda (x)
-  ;;   (cons (concat "\\" (nth 0 x)) (nth 1 x)))
-  ;; LaTeX-section-list)))
+  (set (make-local-variable 'outline-regexp) (LaTeX-outline-regexp t))
+  (when (boundp 'outline-heading-alist)
+(setq outline-heading-alist
+  (mapcar (lambda (x)
+(cons (concat "\\" (nth 0 x)) (nth 1 x)))
+  LaTeX-section-list)))
 
   (setq-local TeX-auto-full-regexp-list
   (delete-dups (append LaTeX-auto-regexp-list
diff --git a/tex-info.el b/tex-info.el
index fc10f018..9f919ee3 100644
--- a/tex-info.el
+++ b/tex-info.el
@@ -31,9 +31,6 @@
 
 (require 'texinfo)
 
-;; Silence the compiler for variables:
-(defvar outline-heading-alist)
-
 ;;; Environments:
 (defvar Texinfo-environment-list
   '(("cartouche") ("command") ("copying") ("defcv") ("deffn") ("defivar")
@@ -672,13 +669,12 @@ value of `Texinfo-mode-hook'."
   (set (make-local-variable 'syntax-propertize-function)
texinfo-syntax-propertize-function)
 
-  ;; Moved after `run-mode-hooks'. (bug#65750)
-  ;; (setq-local outline-heading-alist
-  ;; (mapcar (lambda (x) (cons (concat "@" (car x)) (cadr x)))
-  ;;   	  texinfo-section-list))
-  ;; (setq-local outline-regexp
-  ;; (concat (regexp-opt (mapcar #'car outline-heading-alist) t)
-  ;;   	  "\\>"))
+  (setq-local outline-heading-alist
+  (mapcar (lambda (x) (cons (concat "@" (car x)) (cadr x)))
+	  texinfo-section-list))
+  (setq-local outline-regexp
+  (concat (regexp-opt (ma

bug#69254: 14.0.2; outline-hide-body doesn't work when called in LaTeX-mode-hook

2024-02-22 Thread Ikumi Keita
Hi Arash,

>>>>> Arash Esbati  writes:
> Maybe we revert the change for bug #65750 and declare that one as "won't
> fix".

Yes, it's a possible option, I think.

> If we have to find a compromise, I vote for supporting

>   (add-hook 'LaTeX-mode-hook (lambda()
>(outline-minor-mode 1)
>(outline-hide-body)))

> which is something that other modes support as well.

I feel a bit reluctant about that idea since it doesn't recognize the
customized section commands defined in file local variables. In that
case, the user has to do by oneself either of the following
alternatives:
1. Defer the call to `outline-hide-body' after parsing file local vars.
2. Add parsing file local vars (at least for `LaTeX-section-list')
   explicitly before calling `outline-minor-mode'. 

But maybe we can ignore such corner case.

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#69254: 14.0.2; outline-hide-body doesn't work when called in LaTeX-mode-hook

2024-02-21 Thread Ikumi Keita
Hi Richard,

>>>>> Richard Stanton  writes:
> That works. Thanks! 
> The explanation makes perfect sense. But it also means that putting

> %%% eval: (outline-hide-body)

> in the file’s local variables doesn’t work. Is there a similar
> work-around here, so I can make the settings file-specific if I want?

Hmm, that's a tough question. :-) I couldn't find a good answer for this
request, either. You can do it in only a awkward way, i.e.:

%%% eval: (add-hook 'find-file-hook (lambda () (outline-hide-body)) nil t)

In general, I suppose that emacs doesn't offer a neat framework to deal
with this type of competition between the order of setting variable and
running subsidiary functionality. Particularly, (La)TeX is (IMHO)
exceptional in that the users can define arbitrary sectioning commands.
which makes it difficult to prepare for outline mode.

Maybe I close this bug as "won'tfix" type :-(

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#69069: 14.0.2; table alignment by align-current gives wrong result

2024-02-20 Thread Ikumi Keita
Hi Uwe,

>>>>> "Uwe Siart"  writes:
> As a quick fix I've added plain-TeX-mode and LaTeX-mode to 
> align-tex-modes, like Keita suggested.

> Should I remove these customizations for testing the next ELPA release?

That depends on your objective. Those additions won't break with the next
ELPA release. In that sense, you don't have to remove them. On the other
hand, if you want to know whether it works or not without the addition
to `align-tex-modes', you should remove them.

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#69069: 14.0.2; table alignment by align-current gives wrong result

2024-02-20 Thread Ikumi Keita
Hi Tassilo,

>>>>> Tassilo Horn  writes:
> Thanks, Keita.  Just tell me when you think it's time for a new ELPA
> release.  I've just merged from master without bumping the version
> header, so your changes will be tested by users who use auctex from the
> ELPA-devel archive (like Uwe), soon.

Thank you, Tassilo. Then I think it's appropriate to make a new ELPA
release now.

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#69254: 14.0.2; outline-hide-body doesn't work when called in LaTeX-mode-hook

2024-02-19 Thread Ikumi Keita
Hi Richard,

>>>>> Richard Stanton via bug-auctex via Bug reporting list for AUCTeX 
>>>>>  writes:
> Using Emacs 29.2 under MacOS 12.7.3, I want LaTeX files to open with
> section bodies hidden, and just headers showing. I can get this to work
> manually when I'm editing the file by running the command
> "outline-hide-body". But when I run the same command as part of
> LaTeX-mode-hook, the file opens with nothing hidden.

> Here's the relevant portion of my init.el file. The rest of it just
> deals with setting up straight.el:

> (use-package tex :straight auctex)

> (add-hook 'LaTeX-mode-hook (lambda()
>  (outline-minor-mode 1)
>  (outline-hide-body)
>  ))

> Note that:

> 1) If I add other commands to this LaTeX-mode-hook, they get executed just
> fine. it seems to be only the outline-hide-body command that isn't doing
> what I expect.

> 2) Everything works as I hope if I don't load AUCTeX but use the
> built-in LaTeX mode instead (with the appropriately renamed hook).

> Is this a bug, or am i missing something?

Sorry for bothering you. I think this is an outcome of the fix of
bug#65750[1] last September.

In the fix, settings for outline mode were deferred after the parsing
file local variables so that user's customize to section commands are
reflected to outline related functionalities. This however means that
`LaTeX-mode-hook' runs before outline mode settings are ready.

I haven't come up with a clean solutions yet. For a tentative
workaround, you can use
(add-hook 'LaTeX-mode-hook
  (lambda ()
(add-hook 'find-file-hook
  (lambda()
(outline-minor-mode 1)
(outline-hide-body))
  nil t)))

instead of
(add-hook 'LaTeX-mode-hook (lambda()
 (outline-minor-mode 1)
     (outline-hide-body)
 ))
.

[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=65750

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#69069: 14.0.2; table alignment by align-current gives wrong result

2024-02-16 Thread Ikumi Keita
> 4. The attached patch improves the pseudo-parent mode facility to cover
>   `provided-mode-derived-p' as well, and fix this bug.

I pushed a slightly enhanced fix to the git repo. I'm closing this bug.

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#69069: 14.0.2; table alignment by align-current gives wrong result

2024-02-14 Thread Ikumi Keita
>>>>> Ikumi Keita  writes:
> The point is that AUCTeX should extend this follow-up on
> `derived-mode-p' to `provided-mode-derived-p'. I'll explain the detail
> in a few days.

Here we go.
1. In my feature branch and current AUCTeX, I added pseudo-parent mode
   facility[1][2] like emacs 30 in order to have compatibility with
   directory local variable entry prepared for former mode names like
   `latex-mode'.

2. That facility only concerns for `derived-mode-p' and doesn't tweak
   `provided-mode-derived-p'. However, the `run-if' property of
   `text-colum' entry in `align-rules-list'[3] uses
   `provided-mode-derived-p'. This discrepancy calls for a spurious
   alignment is in `LaTeX-mode' because it isn't considered as derived
   from modes listed in `align-tex-modes'

3. This spurious alignment doen't occur in emacs 30 since it overhauls
   `provided-mode-derived-p' in depth.

4. The attached patch improves the pseudo-parent mode facility to cover
   `provided-mode-derived-p' as well, and fix this bug.

5. The entry `tex-tabbing-separator' in `align-rules-list'[4] has to be
   fixed because its `run-if' property contains conditional with repect
   to the major mode without `derived-mode-p' nor
   `provided-mode-derived-p'. I'll file a bug report for this.

[1] `TeX-derived-mode-add-parents'
[2] advice for `derived-mode-p' by `TeX--compat-derived-mode-p'
[3]---
;; Align space delimited text as columns.
(text-column
 (regexp   . "\\(^\\|\\S-\\)\\([ \t]+\\)\\(\\S-\\|$\\)")
 (group. 2)
 (modes. align-text-modes)
 (repeat   . t)
 (run-if   . ,(lambda ()
(and (not (eq '- current-prefix-arg))
 (not (apply #'provided-mode-derived-p
 major-mode align-tex-modes))
--
[4]---
(tex-tabbing-separator
 (regexp   . ,(lambda (end reverse)
(align-match-tex-pattern "[=>]" end reverse)))
 (group. (1 2))
 (modes. align-tex-modes)
 (repeat   . t)
 (run-if   . ,(lambda ()
(eq major-mode 'latex-mode
--

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW

diff --git a/tests/tex/utility.el b/tests/tex/utility.el
index ac0a8aab..68c9a2cb 100644
--- a/tests/tex/utility.el
+++ b/tests/tex/utility.el
@@ -1,6 +1,6 @@
 ;;; utility.el --- tests for AUCTeX utility functions -*- lexical-binding: t; -*-
 
-;; Copyright (C) 2017, 2021 Free Software Foundation, Inc.
+;; Copyright (C) 2017, 2021, 2024 Free Software Foundation, Inc.
 
 ;; This file is part of AUCTeX.
 
@@ -55,4 +55,16 @@
   (TeX-add-to-alist 'TeX-dummy-alist '((a a)))
   (should (equal TeX-dummy-alist '((b 2 3) (a 1 4 a)
 
+(ert-deftest TeX-pseudo-parent-mode ()
+  "Check pseudo parent modes are recognized.
+For example, `LaTeX-mode' should be regarded as derived from
+`latex-mode' for compatibility with the former mode names."
+  (require 'plain-tex)
+  (require 'latex)
+  (require 'tex-info)
+  (require 'context)
+  (require 'tex-jp)
+  (dolist (mode-pair TeX-mode-comparison-alist)
+(should (provided-mode-derived-p (cdr mode-pair) (car mode-pair)
+
 ;;; utility.el ends here
diff --git a/tex-info.el b/tex-info.el
index 63242e0d..fc10f018 100644
--- a/tex-info.el
+++ b/tex-info.el
@@ -1,6 +1,6 @@
 ;;; tex-info.el --- Support for editing Texinfo source.  -*- lexical-binding: t; -*-
 
-;; Copyright (C) 1993-2023  Free Software Foundation, Inc.
+;; Copyright (C) 1993-2024  Free Software Foundation, Inc.
 
 ;; Maintainer: auctex-de...@gnu.org
 ;; Keywords: tex
@@ -890,6 +890,11 @@ Run after mode hooks and file local variables application."
 
   (TeX-set-mode-name))
 
+;; Compatibility for former mode name.  Directory local variables
+;; prepared for `texinfo-mode' continue to be valid for
+;; `Texinfo-mode'.
+(TeX-derived-mode-add-parents 'Texinfo-mode '(texinfo-mode))
+
 (defcustom Texinfo-clean-intermediate-suffixes
   '("\\.cps?" "\\.vrs?" "\\.fns?" "\\.tps?" "\\.pgs?" "\\.kys?")
   "List of regexps matching suffixes of files to be deleted.
diff --git a/tex.el b/tex.el
index 17cb1aa9..072fb108 100644
--- a/tex.el
+++ b/tex.el
@@ -3886,15 +3886,14 @@ Run after mode hooks and file local variables application."
 
 ;; COMPATIBILITY for Emacs<30
 (unless (fboundp 'derived-mode-add-parents)
-  (advice-add &#x

bug#69069: 14.0.2; table alignment by align-current gives wrong result

2024-02-13 Thread Ikumi Keita
Hi Tassilo,

>>>>> Tassilo Horn  writes:
> Shouldn't we do that change in Emacs itself, too?  If so, I'd bring up
> the topic on emacs-devel in order to ask in which branch to do it (28,
> 29, master).

After my further survey, I came to think that AUCTeX should (and can)
fix this issue without change to emacs core. If my thought is correct,
emacs 30 works without any problem currently.

The point is that AUCTeX should extend this follow-up on
`derived-mode-p' to `provided-mode-derived-p'. I'll explain the detail
in a few days.
--- tex.el ---
;; COMPATIBILITY for Emacs<30
(unless (fboundp 'derived-mode-add-parents)
  (advice-add 'derived-mode-p :after-until
  ;; Don't quote by #'-style to avoid compiler warning.
  'TeX--compat-derived-mode-p)
  (defun TeX--compat-derived-mode-p (&rest modes)
"Add pseudo-parents facility to `derived-mode-p' like Emacs 30.
Modes registered in `derived-mode-extra-parents' property of the
current major mode name symbol are regarded as parent modes as
long as `derived-mode-p' is concerned."
(let ((extra-parents (get major-mode 'derived-mode-extra-parents)))
  (and extra-parents
   (cl-loop for parent in extra-parents
thereis (memq parent modes))
--

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#69057: AUCTeX 14.0.2 and TexLab 5.12.3

2024-02-13 Thread Ikumi Keita
>>>>> Arash Esbati  writes:
> Ikumi Keita  writes:

>> Thanks for your report. It seems that we should ask lsp-mode to support
>> AUCTeX new mode names. I posted a request to lsp-mode issue tracker:
>> https://github.com/emacs-lsp/lsp-mode/issues/4332

> FYI, I briefly tried Texlab with eglot bundled with Emacs 30 and it
> worked OOTB.  It seems it doesn't have an issue with the new mode names.
> In case my test isn't accurate -- we have to tweak
> `eglot-server-programs'.

Thanks, it's a good news.  On emacs 29, eglot says and asks:
[eglot] Couldn't guess LSP server for `LaTeX-mode'
Enter program to execute (or :): 

After I answered "latex", it seems to work successfully.

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#69069: 14.0.2; table alignment by align-current gives wrong result

2024-02-12 Thread Ikumi Keita
Hi Uwe,

>>>>> "Uwe Siart"  writes:
> Thanks, Keita. I've added TeX-mode and LaTeX-mode to the variable 
> align-tex-modes and that helped.

Thanks for reporting back. I'll close this bug.

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#69065: Upgrade to 14.0.2: pdf-tools problem

2024-02-12 Thread Ikumi Keita
Hi Sandy,

>>>>> Sandy Berkovski  writes:
> The problem was resolved after a new installation of AUCTeX, so not really
> a bug. This issue can be closed (I think).

Thank you for reporting back. I'll close this bug.

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#69069: 14.0.2; table alignment by align-current gives wrong result

2024-02-12 Thread Ikumi Keita
Hi Uwe,

>>>>> Uwe Siart  writes:
> When I do 'M-x align-current' on

> ,
> | Mat.-Nr. & Nachname & Vorname & Unterschrift \\
> | Mat. No. & Surname  & Name& Signature\\
> `

> (which would be the expected result, so align-current should do nothing
> here) I get

> ,
> | Mat.-Nr. & Nachname & Vorname & Unterschrift \\
> | Mat. No.& Surname & Name & Signature \\
> `

> instead. It seems like align-current gets confused by whitespace inside
> cell content.

Looking at align.el, there are several reference on lower case mode
names:
--
(defcustom align-tex-modes
  '(tex-mode plain-tex-mode latex-mode slitex-mode)
  "A list of modes whose syntax resembles TeX (and family)."
  :type '(repeat symbol)
  :group 'align)
[...]
(defcustom align-rules-list
[...]
(tex-tabbing-separator
 (regexp   . ,(lambda (end reverse)
(align-match-tex-pattern "[=>]" end reverse)))
 (group. (1 2))
 (modes. align-tex-modes)
 (repeat   . t)
 (run-if   . ,(lambda ()
(eq major-mode 'latex-mode
[...]
------
For the time being, please change the value of these customize options.

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#69065: Upgrade to 14.0.2: pdf-tools problem

2024-02-11 Thread Ikumi Keita
Hi Sandy,

>>>>> Sandy Berkovski  writes:
> Having upgraded to 14.0.2, I'm now unable to launch pdf-tools as the
> default viewer. The error is:
> "TeX-command-expand: Wrong type argument: stringp, nil"

The first thing which is worth trying is:
1. Type M-x package-recompile RET auctex RET
2. Restart your emacs

If it doesn't work, then try:
a. Uninstall AUCTeX once.
b. Restart your emacs and (before doing anything else) reinstall AUCTeX.

If your issue still persists, we need more detail to study it. Send
minimal example file and describe a precise procedure to reproduce the
issue. In addition, the output of M-x TeX-submit-bug-report would be
helpful.

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#69057: AUCTeX 14.0.2 and TexLab 5.12.3

2024-02-11 Thread Ikumi Keita
Hi CĂŠdric,

>>>>> CĂŠdric MartĂ­nez Campos  writes:
> I am experiencing the following issue with TexLab 5.12.3 after
> updating to AUCTeX 14.0.2 from 13.3.0:

> There are no language servers supporting current mode `LaTeX-mode'
> registered with `lsp-mode'.

Thanks for your report. It seems that we should ask lsp-mode to support
AUCTeX new mode names. I posted a request to lsp-mode issue tracker:
https://github.com/emacs-lsp/lsp-mode/issues/4332

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#68998: Failure to install AUCTeX 14.0.0

2024-02-11 Thread Ikumi Keita
Hi Sandy,

>>>>> Sandy Berkovski  writes:
> I confirm that running a new session with "emacs -Q" and upgrading to
> 14.0.2 from there now works. However, as others have said, the usual
> upgrade route (after loading my init file even before opening any TeX
> files), is stuck.

> All in all, there is a reasonable workaround, thank you guys for wonderful
> work!

Thank you for feedback! I'll close this bug.

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#69014: 13.3.0; Cannot install v14.0.2

2024-02-10 Thread Ikumi Keita
Hi Fran,

>>>>> Fran Burstall  writes:
> Everything proceeds OK until emacs hangs while
> byte-compiling context-en.el.

> If I hit C-g after a minute or so, I get a backtrace, the
> top of which is below:

I confirmed what you reported on windows 11 with emacs 29.2.

Please follow the following step:
1. Quit the emacs session which you get that backtrace.
2. Start a new emacs session as usual. This time neither "-Q" nor "-q"
   would be necessary.
3. Type M-x package-recompile RET auctex RET

This recipe worked for me. I expect you can use AUCTeX now.

There is still auctex-13.3.0 directory left behind under
~/.emacs.d/elpa/ . Please delete it manually so that it wouldn't cause
trouble in future.

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#68998: Failure to install AUCTeX 14.0.0

2024-02-10 Thread Ikumi Keita
Hi Sandy,

>> However, I realized that ELPA installation of AUCTeX 14.0.0 IS broken in
>> another aspect even for fresh installation as I wrote in the reply to
>> Juergen :-( . I'll discuss that topic on another message which I'm going
>> to write afterwards.

> Ok, let's proceed with this discussion over there; I also have an
> observation we should discuss.

AUCTeX 14.0.2 is released on ELPA. We expect that it works as expected.
Please try it, preferably on emacs session which you haven't used AUCTeX
yet. (On emacs session which you already used AUCTeX, it can fail as you
reported in your first post of this thread.)

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#69000: Error while upgrading

2024-02-09 Thread Ikumi Keita
Hi Michael,

>>>>> Michael Heerdegen via bug-auctex via Bug reporting list for AUCTeX 
>>>>>  writes:
> Hello,
> dunno if this observation is related to one of the other reports today
> (my tex files open in fundamental-mode after today's upgrade), but I
> noticed these two errors emitted while upgrading:

> | ...
> | Compiling file /home/micha/.emacs.d/elpa/auctex-14.0.0/context-en.el at Fri 
> Feb  9 11:44:38 2024
> | context-en.el:33:11: Error: Symbol's chain of function indirections 
> contains a loop: context-mode
> | ^L
> | Compiling file /home/micha/.emacs.d/elpa/auctex-14.0.0/context-nl.el at Fri 
> Feb  9 11:44:38 2024
> | context-nl.el:33:11: Error: Symbol's chain of function indirections 
> contains a loop: context-mode
> | ...

Thanks for the report. Currently it is known that updating of ELPA
AUCTeX doesn't work. Until a fixed version is released, please stay with
the former version of AUCTeX.

Sorry for inconvenience.

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#68998: Failure to install AUCTeX 14.0.0

2024-02-09 Thread Ikumi Keita
Hi Arash,

>>>>> Arash Esbati  writes:
> Thanks for the report.  I tried the following:

>  • Downloaded and unpacked auctex-13.3.0.tar.lz form this page:
>https://elpa.gnu.org/packages/auctex.html
>  • Started a fresh Emacs with 'emacs -Q'
>  • M-x package-install-file auctex-13.3.0.tar RET
>  • Opened a .tex file and it works
>  • M-x toggle-debug-on-error RET
>  • M-x list-packages RET and updated AUCTeX to 14.0.0.

> This is the result:

>   Debugger entered--Lisp error: (cyclic-function-indirection context-mode)
> defalias(context-mode ConTeXt-mode)
> load-with-code-conversion("/path/.emacs.d/elpa/auctex-14.0.0/context.el"
> "/path/.emacs.d/elpa/auctex-14.0.0/context.el" nil t)

> @Keita: Can you reproduce this with the recipe above?  This is with
> Emacs 30.0.50 (05e3183e) on macOS.

I haven't tried it for myself, but that would break for sure. It
shouldn't be attempted to upgrade AUCTeX, especially when major version
increases, in a emacs session where AUCTeX is already used; in other
words,
>  • Opened a .tex file and it works
is the origin of the failure. (See the discussion between Tassilo and me
in the thread in auctex-devel in these few days.) In general, upgrade
installation of ELPA packages (not restrected to AUCTeX) should be done
with fresh emacs session.

However, I realized that ELPA installation of AUCTeX 14.0.0 IS broken in
another aspect even for fresh installation as I wrote in the reply to
Juergen :-( . I'll discuss that topic on another message which I'm going
to write afterwards.

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#68992: 13.3.0; not displaying \newcommand defintions

2024-02-09 Thread Ikumi Keita
Hi Sabarish,

>>>>> Sabarish V M  writes:
> The preview latex package does not render the "\newcommand" macros
> properly.

> Example,

> \documentclass{template}
> \title{Some title}
> \author{XXX}
> \begin{document}
> \maketitle

> \include{symbols} % The file contains all the macros defined
> % It contains,
> % \newcommand{\kb}{k_{\mathrm{B}}}
> % \renewcommand{\d}{\mathrm{d}}

> From classical Boltzmann statistics we know that the probability for finding 
> any
> particle in a given state $i$ is,
> \[ \frac{N_i}{N} = \frac{\exp \left( - E_i / \kb T \right)}{Z\kb \d } \]
> \include{chapters/01.introduction}
> \include{chapters/appendix}

> \end{document}

This document doesn't typeset for me because my TeX Live 2023 doesn't
have "template" class. After I replaced
\documentclass{template}
with
\documentclass{article}
, I can both typeset and use preview-latex for the files quoted below.
Hence I suppose that the issue isn't related directly to \newcommand and
suspect there is something incompatible with preview-latex in
the non-standard class file template.cls.

--- foo.tex --
\documentclass{article}
\title{Some title}
\author{XXX}
\begin{document}
\maketitle

\include{symbols}

From classical Boltzmann statistics we know that the probability for finding any
particle in a given state $i$ is,
\[ \frac{N_i}{N} = \frac{\exp \left( - E_i / \kb T \right)}{Z\kb \d } \]

\end{document}
--

--- symbols.tex --
\newcommand{\kb}{k_{\mathrm{B}}}
\renewcommand{\d}{\mathrm{d}}

%%% Local Variables:
%%% mode: LaTeX
%%% TeX-master: "foo"
%%% End:
--

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#68090: 13.2.3; TeX-LaTeX-Sentinel: a way to stop requiring version line?

2024-01-24 Thread Ikumi Keita
>>>>> Arash Esbati  writes:
> Ikumi Keita  writes:
>> OK, here is such a proposal. I think this change is quite safe, so
>> I'll commit it soon.

> Thanks Keita.  LGTM, please go ahead and install it.

Done. I'll close this bug, Michael.

Bye,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW



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


bug#68090: 13.2.3; TeX-LaTeX-Sentinel: a way to stop requiring version line?

2024-01-24 Thread Ikumi Keita
Hi Arash,

> sorry for my late response.  If it fixes the issue reported by Michael,
> we can install it.  Is it possible to add this new variable to the
> manual as well?

OK, here is such a proposal. I think this change is quite safe, so I'll
commit it soon.

Bye,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW

>From d66534c950606fa635e9f898c2a7a808c5d2003a Mon Sep 17 00:00:00 2001
From: Ikumi Keita 
Date: Wed, 24 Jan 2024 17:49:03 +0900
Subject: [PATCH] Make banner regexp customizable

* tex.el (TeX-LaTeX-sentinel-banner-regexp): Turn the regexp to
identify the banner line in the LaTeX output into customize option.
(TeX-LaTeX-sentinel): Use it.
* doc/auctex.texi (Processor Options): Mention the new option.
---
 doc/auctex.texi | 14 ++
 tex.el  | 10 --
 2 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/doc/auctex.texi b/doc/auctex.texi
index c4cd0257..05fb754e 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -3521,6 +3521,20 @@ a command not found error.  The error code returned by the shell in this
 case can be set in @code{TeX-check-TeX-command-not-found} option.
 @end defopt
 
+In addtion, @AUCTeX{} searches for a line similar to
+@example
+LaTeX2e <2022-11-01> patch level 1
+@end example
+in the console log to check whether @command{latex} command runs
+successfully.  If there isn't such a line when running @LaTeX{}, @AUCTeX{}
+warns the problem and resets the next default command to ``LaTeX''.  If
+this check doesn't suit for your use case, you can customize the
+@code{TeX-LaTeX-sentinel-banner-regexp} option:
+@defopt TeX-LaTeX-sentinel-banner-regexp
+When a @LaTeX{} run outputs a banner line matching this regexp, @AUCTeX{}
+considers that it was successfull.
+@end defopt
+
 Some @LaTeX{} packages requires the document to be compiled with a
 specific engine.  Notable examples are @samp{fontspec} and @samp{polyglossia}
 packages, which require Lua@TeX{} and Xe@TeX{} engines.  If you try to
diff --git a/tex.el b/tex.el
index 47686518..3132472e 100644
--- a/tex.el
+++ b/tex.el
@@ -709,6 +709,13 @@ commands."
   :group 'TeX-command
   :type 'boolean)
 
+(defcustom TeX-LaTeX-sentinel-banner-regexp
+  "^\\(\\*\\* \\)?J?I?p?\\(La\\|Sli\\)TeX\\(2e\\)? \
+\\(Version\\|ver\\.\\|<[0-9/-]*\\(?:u[^>]*\\)?>\\)"
+  "Regexp to identify the banner line in the LaTeX output."
+  :group 'TeX-output
+  :type 'regexp)
+
 ;;; Portability.
 
 (defmacro TeX--if-macro-fboundp (name then &rest else)
@@ -8531,8 +8538,7 @@ Changebar info has changed." nil t)
   "%s" "You should run LaTeX again to synchronize exercise properties")
  (setq TeX-command-next TeX-command-default))
 ((re-search-forward
-  "^\\(\\*\\* \\)?J?I?p?\\(La\\|Sli\\)TeX\\(2e\\)? \
-\\(Version\\|ver\\.\\|<[0-9/-]*\\(?:u[^>]*\\)?>\\)" nil t)
+  TeX-LaTeX-sentinel-banner-regexp nil t)
  (let* ((warnings (and TeX-debug-warnings
(TeX-LaTeX-sentinel-has-warnings)))
 (bad-boxes (and TeX-debug-bad-boxes
-- 
2.43.0

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


bug#68529: 13.2.4; Fraction line color not adjusted

2024-01-17 Thread Ikumi Keita
Hi Zhou,

>>>>> Zhou Renfei  writes:
> When using auctex to preview latex inline math formulas, the foreground
> color of fraction line is not adjusted. I am using a dark theme, and for
> normal math formulas, the foreground color will be correctly adjusted to
> white; however, this does not work for fraction lines. E.g., in
> $\frac{a}{b}$, the letters a and b will be in white (correct), but the
> line between them will be still in black.

> There are other objects that auctex fails to adjust colors from black to
> white, e.g., the caption in a float environment, and the pseudocode in
> algorithm2e environment, and the horizontal line part of a sqrt symbol
> (in $\sqrt n$, the horizontal line above $n$ will be still black).

It seems that this is the same as bug#56889[1]. I suppose it originates
from the nature of pdflatex and ghostscript, and preview-latex can do
little with respect to this phenomenon.

As I wrote in the thread of bug#56889, one of the following workarounds
works, but only in very awkward way... :-(
(1) Turn off PDF mode by C-c C-t C-p and set `preview-image-type' to
`dvipng'.
(2) Set `preview-pdf-color-adjust-method' to nil.

[1] https://debbugs.gnu.org/56889

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#68090: 13.2.3; TeX-LaTeX-Sentinel: a way to stop requiring version line?

2024-01-14 Thread Ikumi Keita
Hi Arash and Michael,

>>>>> Arash Esbati  writes:
>> To developers: How about removing this check by the attached patch
>> (which may be a bit radaical change)?

> My suggestion is not to do it now.  Can you think of a sort of advice
> around the `TeX-LaTeX-sentinel' function?

OK. As Michael suggested to have customizable regexp, my next proposal
is the attached patch. What do you think about it?

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW

diff --git a/tex.el b/tex.el
index 357dbb58..8865d011 100644
--- a/tex.el
+++ b/tex.el
@@ -709,6 +709,13 @@ commands."
   :group 'TeX-command
   :type 'boolean)
 
+(defcustom TeX-LaTeX-sentinel-banner-regexp
+  "^\\(\\*\\* \\)?J?I?p?\\(La\\|Sli\\)TeX\\(2e\\)? \
+\\(Version\\|ver\\.\\|<[0-9/-]*\\(?:u[^>]*\\)?>\\)"
+  "Regexp to identify the banner line in the LaTeX output."
+  :group 'TeX-output
+  :type 'regexp)
+
 ;;; Portability.
 
 (defmacro TeX--if-macro-fboundp (name then &rest else)
@@ -8463,8 +8470,7 @@ Rerun to get mark in right position\\." nil t)
   "%s" "You should run LaTeX again to synchronize exercise properties")
  (setq TeX-command-next TeX-command-default))
 ((re-search-forward
-  "^\\(\\*\\* \\)?J?I?p?\\(La\\|Sli\\)TeX\\(2e\\)? \
-\\(Version\\|ver\\.\\|<[0-9/-]*\\(?:u[^>]*\\)?>\\)" nil t)
+  TeX-LaTeX-sentinel-banner-regexp nil t)
  (let* ((warnings (and TeX-debug-warnings
(TeX-LaTeX-sentinel-has-warnings)))
 (bad-boxes (and TeX-debug-bad-boxes
___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


bug#68090: 13.2.3; TeX-LaTeX-Sentinel: a way to stop requiring version line?

2024-01-06 Thread Ikumi Keita
Hi Michael, sorry for late response.

>>>>> "Michael Hoffman"  writes:
> Unfortunately, if `TeX-LaTeX-Sentinel' doesn't find any other errors, it
> looks for a version line, and if it doesn't find that, it reports
> "problems after {(TeX-current-pages)}", and skips reporting warnings or
> bad boxes.

> My workaround is to insert the text "LaTeX Version" into the script
> output to make `TeX-LaTeX-Sentinel' happy. But this is clunky.

> It would be best if there were a way to customize the regular expression
> that is searched for on successful run of a command. It might be
> possible to get rid of this check altogether--it's might be that
> checking for a version banner that occurs at the top protects doesn't
> protect against many unexpected error conditions--but I assume it's
> there for a reason.

I think that the reason why `TeX-LaTeX-sentinel' searches for the
version banner is to check whether there is a working TeX distribution
at all.

The importance of this check is low since `TeX-command' introduced
similar check by `TeX-check-TeX'.

To developers: How about removing this check by the attached patch
(which may be a bit radaical change)?

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW

diff --git a/tex.el b/tex.el
index 357dbb58..e390ac56 100644
--- a/tex.el
+++ b/tex.el
@@ -8462,9 +8462,7 @@ Rerun to get mark in right position\\." nil t)
  (message
   "%s" "You should run LaTeX again to synchronize exercise properties")
  (setq TeX-command-next TeX-command-default))
-((re-search-forward
-  "^\\(\\*\\* \\)?J?I?p?\\(La\\|Sli\\)TeX\\(2e\\)? \
-\\(Version\\|ver\\.\\|<[0-9/-]*\\(?:u[^>]*\\)?>\\)" nil t)
+(t
  (let* ((warnings (and TeX-debug-warnings
(TeX-LaTeX-sentinel-has-warnings)))
 (bad-boxes (and TeX-debug-bad-boxes
@@ -8481,10 +8479,7 @@ Rerun to get mark in right position\\." nil t)
(if (with-current-buffer TeX-command-buffer
  (and TeX-PDF-mode (setq dvi2pdf (TeX-PDF-from-DVI
(setq TeX-command-next dvi2pdf)
- (setq TeX-command-next TeX-command-Show
-(t
- (message "%s%s%s" name ": problems after " (TeX-current-pages))
- (setq TeX-command-next TeX-command-default)))
+ (setq TeX-command-next TeX-command-Show)
 
   ;; Check whether the idx file changed.
   (let (idx-file)
___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


bug#66771: [PATCH] Throw out fold spec after a single failure

2023-12-18 Thread Ikumi Keita
>>>>> Arash Esbati  writes:
> Tony Zorman  writes:
>> Oh, how embarrassing! Sorry about that, it seems like rebasing was too
>> smart in how it handled the conflicts. Attached is a patch that should
>> fix this.

> Thanks for your swift reply.  I slightly modified the log and installed
> your change.

Sorry for my overlooking the warning 😿 Thank you both!

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#66771: [PATCH] Throw out fold spec after a single failure

2023-12-15 Thread Ikumi Keita
Hi Tony,

>>>>> Tony Zorman  writes:
> I've heard back from the FSF: everything is signed now, and we should
> be good to go! Attached you can find the patch again, rebased to
> include commit 2a959a1d43b3f38cf4845b071679a7978e36d95a.

> Thank you for your patience!
> Tony

Thanks! I've installed your proposal in the git repository. I'll close
this bug.

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW



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


  1   2   3   4   5   >