Re: :bibtex dialect defect?

2022-04-11 Thread Ikumi Keita
Hi all,

This is a continuation of a topic in last June :-)

> Ikumi Keita  writes:
> I think that AUCTeX built-in bibliography management has fundamental
> flaw.

[...]

> The problem is, that the contents of "auto/jr.el" is not used at all
> afterwards.

[...]

> This means that the `LaTeX-add-bibitems' call added as "jr" style hook
> with ":bibtex" dialect hasn't been called. You can confirm it by
> evaluating `(LaTeX-bibitem-list)', which returns nil.

> The LaTeX mode does load "auto/jr.el". However, it doesn't run the
> associated style hook because the hook is registred as ":bibtex"
> dialect, not ":latex".

> Even when you open "jr.bib", the hook isn't run because bibtex-mode
> doesn't run AUCTeX style hooks.

> In these ways, AUCTeX never runs style hooks with ":bibtex" dialect.

> This defect didn't cause major problem. I think practically all AUCTeX
> users who need bibtex facility use RefTeX (or bib-cite.el?) so defect in
> AUCTeX built-in bibliography management has been overlooked so far.

I came up to a tentative fix as the attached patch. Comments and
suggestions are welcome.

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine

>From cc5c549131db75a3b1bbbc9fa587f1f6df0a70f8 Mon Sep 17 00:00:00 2001
From: Ikumi Keita 
Date: Wed, 10 Nov 2021 01:03:42 +0900
Subject: [PATCH] Fix bibtex dialect

* tex.el (TeX-auto-store): Use `(or :bibtex :latex)' instead of
`:bibtex' as dialect argument for `TeX-add-style-hook' when saving auto
file for BibTeX file.
---
 tex.el | 19 +--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/tex.el b/tex.el
index 9188ccd7..6b80b4e8 100644
--- a/tex.el
+++ b/tex.el
@@ -4101,7 +4101,8 @@ If TEX is a directory, generate style files for all files in the directory."
   LaTeX-verbatim-macros-with-delims-local))
 (verb-macros-braces (when (boundp 'LaTeX-verbatim-macros-with-braces-local)
   LaTeX-verbatim-macros-with-braces-local))
-(dialect TeX-style-hook-dialect))
+(dialect TeX-style-hook-dialect)
+(bibtex-p (eq major-mode 'bibtex-mode)))
 (TeX-unload-style style)
 (with-current-buffer (generate-new-buffer file)
   (erase-buffer)
@@ -4131,7 +4132,21 @@ If TEX is a directory, generate style files for all files in the directory."
   (mapc (lambda (el) (TeX-auto-insert el style))
 TeX-auto-parser)
   (insert ")")
-  (if dialect (insert (concat "\n " (prin1-to-string dialect
+  (if dialect (insert (concat
+   "\n "
+   (prin1-to-string
+(if bibtex-p
+;; Add :latex since functions such
+;; as `LaTeX-add-bibitems' are
+;; only meaningful in LaTeX
+;; document buffer.
+;; FIXME: BibTeX is available to
+;; plain TeX through eplain
+;; (https://tug.org/eplain/doc/eplain.html#Citations>).
+;; It would be nice if AUCTeX
+;; supports such usage.
+`'(or ,dialect :latex)
+  dialect)
   (insert ")\n\n")
   (write-region (point-min) (point-max) file nil 'silent)
   (kill-buffer (current-buffer
-- 
2.35.1



[AUCTeX-commit] GNU AUCTeX branch, master, updated. df8d6fe7726e79b4748eecbd6d6614a1b4a56279

2022-04-11 Thread Arash Esbati
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".

The branch, master has been updated
   via  df8d6fe7726e79b4748eecbd6d6614a1b4a56279 (commit)
  from  62f8341717e71679072d6dd4f53b58302c25e104 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
commit df8d6fe7726e79b4748eecbd6d6614a1b4a56279
Author: Arash Esbati 
Date:   Mon Apr 11 12:10:21 2022 +0200

Document how to bump the required Emacs version

* admin/release-process.org (Bumping required Emacs version):
Document the required steps.

---

Summary of changes:
 admin/release-process.org | 24 
 1 file changed, 24 insertions(+)


hooks/post-receive
-- 
GNU AUCTeX

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


[AUCTeX-diffs] GNU AUCTeX branch, master, updated. df8d6fe7726e79b4748eecbd6d6614a1b4a56279

2022-04-11 Thread Arash Esbati
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".

The branch, master has been updated
   via  df8d6fe7726e79b4748eecbd6d6614a1b4a56279 (commit)
  from  62f8341717e71679072d6dd4f53b58302c25e104 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
commit df8d6fe7726e79b4748eecbd6d6614a1b4a56279
Author: Arash Esbati 
Date:   Mon Apr 11 12:10:21 2022 +0200

Document how to bump the required Emacs version

* admin/release-process.org (Bumping required Emacs version):
Document the required steps.

diff --git a/admin/release-process.org b/admin/release-process.org
index ea87618d..26ff0280 100644
--- a/admin/release-process.org
+++ b/admin/release-process.org
@@ -227,3 +227,27 @@ looks for all files without FSF-copyright line which are 
not listed in a
 special copyright_exceptions file.  As result, it spits out a diff between the
 actual and expected copyright exceptions.  If the diff is empty (or at least
 doesn't mention an AUCTeX file), everything is fine.
+
+** Bumping required Emacs version
+
+It happens from time to time that AUCTeX requires a newer Emacs
+version.  For this, the following files in the main directory has to
+be adjusted.
+
+- [ ] =auctex.el.in= :: Change the ~;; Package-Requires:~ cookie in
+  the header.
+- [ ] =configure.ac= :: Change the argument of ~EMACS_CHECK_VERSION~
+- [ ] =tex-site.el.in= :: Change the number after ~emacs-major-version~
+- [ ] =tex.el= :: Change the number after ~emacs-major-version~
+
+In the =doc= directory, these files are affected.
+
+- [ ] =doc/changes.texi= :: Add an entry under *News* about the
+  required version.
+- [ ] =doc/faq.texi= :: Adjust the number in this sentence:
+  =@AUCTeX{} was tested with @w{GNU Emacs XX.X}=.
+- [ ] =doc/install.texi= :: Adjust the number in ~@node Prerequisites~:
+  =@item GNU Emacs XX.X or higher=.
+- [ ] =doc/preview-faq.texi= :: Adjust the number in ~@section Requirements~
+  =@previewlatex{} nominally requires @w{GNU Emacs} with a version of
+  at least XX.X.=.

---

Summary of changes:
 admin/release-process.org | 24 
 1 file changed, 24 insertions(+)


hooks/post-receive
-- 
GNU AUCTeX

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


Re: Uncertain prettification

2022-04-11 Thread Arash Esbati
Ikumi Keita  writes:

>> Tassilo Horn  writes:
>>> I like the second option, considering that Arash proposed to raise the
>>> minimum supported Emacs version to 25.1. How about the attached patch?
>
>> Looks good to me.
>
> Thanks, pushed.

The assumption for your patch is now fulfilled :)

Best, Arash



[AUCTeX-commit] GNU AUCTeX branch, master, updated. 62f8341717e71679072d6dd4f53b58302c25e104

2022-04-11 Thread Arash Esbati
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".

The branch, master has been updated
   via  62f8341717e71679072d6dd4f53b58302c25e104 (commit)
  from  86de20d0b285803ead0f242be5216916bab2abc0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
commit 62f8341717e71679072d6dd4f53b58302c25e104
Author: Arash Esbati 
Date:   Mon Apr 11 11:58:53 2022 +0200

Lift required GNU Emacs version to 25.1

* auctex.el.in:
* configure.ac (EMACS_CHECK_VERSION):
* doc/changes.texi:
* doc/faq.texi:
* doc/install.texi (Prerequisites):
* doc/preview-faq.texi (Requirements):
* tex-site.el.in:
* tex.el: Bump minimum required Emacs version to 25.1.

---

Summary of changes:
 auctex.el.in | 4 ++--
 configure.ac | 4 ++--
 doc/changes.texi | 3 +++
 doc/faq.texi | 2 +-
 doc/install.texi | 2 +-
 doc/preview-faq.texi | 2 +-
 tex-site.el.in   | 6 ++
 tex.el   | 6 ++
 8 files changed, 14 insertions(+), 15 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX

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


[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 62f8341717e71679072d6dd4f53b58302c25e104

2022-04-11 Thread Arash Esbati
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".

The branch, master has been updated
   via  62f8341717e71679072d6dd4f53b58302c25e104 (commit)
  from  86de20d0b285803ead0f242be5216916bab2abc0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
commit 62f8341717e71679072d6dd4f53b58302c25e104
Author: Arash Esbati 
Date:   Mon Apr 11 11:58:53 2022 +0200

Lift required GNU Emacs version to 25.1

* auctex.el.in:
* configure.ac (EMACS_CHECK_VERSION):
* doc/changes.texi:
* doc/faq.texi:
* doc/install.texi (Prerequisites):
* doc/preview-faq.texi (Requirements):
* tex-site.el.in:
* tex.el: Bump minimum required Emacs version to 25.1.

diff --git a/auctex.el.in b/auctex.el.in
index 014c0a2b..61527e23 100644
--- a/auctex.el.in
+++ b/auctex.el.in
@@ -1,11 +1,11 @@
 ;;; auctex.el --- Integrated environment for *TeX*  -*- lexical-binding: t; -*-
 
-;; Copyright (C) 2014-2020 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2022 Free Software Foundation, Inc.
 
 ;; URL: https://www.gnu.org/software/auctex/
 ;; Maintainer: auctex-devel@gnu.org
 ;; Notifications-To: auctex-di...@gnu.org
-;; Package-Requires: ((emacs "24.3") (nadvice "0.3"))
+;; Package-Requires: ((emacs "25.1"))
 ;; Keywords: TeX LaTeX Texinfo ConTeXt docTeX preview-latex
 
 ;; This file is part of AUCTeX.
diff --git a/configure.ac b/configure.ac
index a435cb8e..fe7616d5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ dnl Autoconf script for AUCTeX
 
 dnl Maintainer: auctex-devel@gnu.org
 
-dnl Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2022Free Software Foundation, Inc.
 
 dnl This file is part of AUCTeX.
 
@@ -37,7 +37,7 @@ AC_SUBST(PREVIEWVERSION)
 
 EMACS_PROG_EMACS
 
-EMACS_CHECK_VERSION(24,3)
+EMACS_CHECK_VERSION(25,1)
 
 # The Debian package uses `--disable-build-dir-test'; normal users should
 # never need to modify the default behavior.
diff --git a/doc/changes.texi b/doc/changes.texi
index 12acd0c2..b8c70ba3 100644
--- a/doc/changes.texi
+++ b/doc/changes.texi
@@ -11,6 +11,9 @@
 @heading News since last release
 
 @itemize @bullet
+@item
+@AUCTeX{} now requires GNU Emacs 25.1 or higher.
+
 @item
 @AUCTeX{} tracks the change in Emacs where initial inputs in the
 minibuffer during queries are getting phased out.  Queries for the
diff --git a/doc/faq.texi b/doc/faq.texi
index da5576b1..a6122ec0 100644
--- a/doc/faq.texi
+++ b/doc/faq.texi
@@ -71,7 +71,7 @@ statements related to the problem.
 @item
 What versions of Emacs are supported?
 
-@AUCTeX{} was tested with @w{GNU Emacs 24.3}.  Older versions may work but
+@AUCTeX{} was tested with @w{GNU Emacs 25.1}.  Older versions may work but
 are unsupported.
 
 @item
diff --git a/doc/install.texi b/doc/install.texi
index f7af60ff..19034cb9 100644
--- a/doc/install.texi
+++ b/doc/install.texi
@@ -96,7 +96,7 @@ the file @file{INSTALL.windows}.
 @end ifclear
 
 @itemize @bullet
-@item GNU Emacs 24.3 or higher
+@item GNU Emacs 25.1 or higher
 
 Using @previewlatex{} requires a version of Emacs compiled with image
 support.
diff --git a/doc/preview-faq.texi b/doc/preview-faq.texi
index 569ef003..bf16c7f6 100644
--- a/doc/preview-faq.texi
+++ b/doc/preview-faq.texi
@@ -48,7 +48,7 @@ to @email{auctex-devel@@gnu.org}.
 @subsection Which version of Emacs is needed?
 
 @previewlatex{} nominally requires @w{GNU Emacs} with a version of at
-least 24.3.
+least 25.1.
 
 @subsection Which versions of Ghostscript and @AUCTeX{} are needed?
 
diff --git a/tex-site.el.in b/tex-site.el.in
index 8757fefa..e088251e 100644
--- a/tex-site.el.in
+++ b/tex-site.el.in
@@ -38,10 +38,8 @@
 
 ;;; Code:
 
-(when (or (< emacs-major-version 24)
-  (and (= emacs-major-version 24)
-   (< emacs-minor-version 3)))
-  (error "AUCTeX requires Emacs 24.3 or later"))
+(when (< emacs-major-version 25)
+  (error "AUCTeX requires Emacs 25.1 or later"))
 
 (unless (or (fboundp 'TeX-modes-set) ;Avoid inf-looping.
 (fboundp 'TeX-tex-mode)) ;auctex-autoloads is not loaded.
diff --git a/tex.el b/tex.el
index 0187459b..9188ccd7 100644
--- a/tex.el
+++ b/tex.el
@@ -28,10 +28,8 @@
 
 ;;; Code:
 
-(when (or (< emacs-major-version 24)
-  (and (= emacs-major-version 24)
-   (< emacs-minor-version 3)))
-  (error "AUCTeX requires Emacs 24.3 or later"))
+(when (< emacs-major-version 25)
+  (error "AUCTeX requires Emacs 25.1 or later"))
 
 (require 'custom)
 (require 'tex-site)

---

Summary of changes:
 auctex.el.in | 4 ++--
 configure.ac | 4 ++--
 doc/changes.texi | 3 +++
 doc/faq.texi | 2