all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Arash Esbati <arash@gnu.org>
To: Paul Nelson <ultrono@gmail.com>
Cc: Philip Kaludercic <philipk@posteo.net>,  emacs-devel@gnu.org
Subject: Re: [ELPA] some tex-related packages
Date: Mon, 27 May 2024 18:13:48 +0200	[thread overview]
Message-ID: <m2o78r2pxf.fsf@macmutant.fritz.box> (raw)
In-Reply-To: <CAOA-32PACkxWb9JmYyoVVpxH5VNtWvUN5qbZFkDmrcO+0o-=Vw@mail.gmail.com> (Paul Nelson's message of "Wed, 22 May 2024 18:10:30 +0200")

Paul Nelson <ultrono@gmail.com> writes:

> Copy.  So maybe "auctex-numbering" (or "auctex-latex-numbering"?) and
> "auctex-latexmk-continuous"?

"auctex-label-numbers" or "auctex-cont-latexmk" come to my mind. 

> (unless these are considered suitable for upstreaming, in which case
> the point is moot)

I'd like to see the functionality of

• tex-item.el
• tex-parens.el and
• tex-numbers.el

in AUCTeX.  But I'd suggest you make all your packages available via
ELPA now in order to get some feedback.  You can
remove/obsolete/whatever them once the code is merged.  I think it will
take some time to review/polish the code, e.g.:

--8<---------------cut here---------------start------------->8---
(defun tex-parens--beginning-of-defun ()
  "Move to the beginning of the current defun.
Here `defun' means top-level environment."
  (interactive)
  (re-search-backward "^\\\\begin{[^}]+}" nil t))
--8<---------------cut here---------------end--------------->8---

Why do you use an internal name for a command, or:

--8<---------------cut here---------------start------------->8---
(defun tex-numbers-update-cache (aux-file)
  "Update the cache for AUX-FILE.
Return the updated cache, or nil if the aux file does not exist."
  (when (file-exists-p aux-file)
    (with-temp-buffer
      (insert-file-contents aux-file)
      (let ((cache (make-hash-table :test 'equal))
            (pattern "\\newlabel{\\([^}]+\\)}{{\\([^}]+\\)}"))
        (save-excursion
          (goto-char (point-min))
          (while (re-search-forward pattern nil t)
            (let ((label (match-string 1))
                  (number (match-string 2)))
              (puthash label number cache))))
        (puthash 'timestamp (current-time) cache)
        (puthash aux-file cache tex-numbers-cache)
        cache))))
--8<---------------cut here---------------end--------------->8---

I think pattern should be "\\\\newlabel{\\([^}]+\\)}{{\\([^}]+\\)}"
if you want to pass it to `re-search-forward'.

But I suggest we move the discussion about "which part to upstream" to
auctex-devel.

> I qualify as a long-time daily user of latex/auctex (and until fairly
> recently, reftex), but am ignorant of tex more broadly.  Happy to help
> how I can.

I think you qualify to start hacking on AUCTeX and push it in any
direction you (and other users) think it should go :-)

> (Thanks again!)

My pleasure.

Best, Arash



  reply	other threads:[~2024-05-27 16:13 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-19 17:06 [ELPA] some tex-related packages Paul Nelson
2024-05-20  6:33 ` Philip Kaludercic
2024-05-20  9:01   ` Paul Nelson
2024-05-20  9:18     ` Philip Kaludercic
2024-05-20 17:37       ` Arash Esbati
2024-05-22 16:10         ` Paul Nelson
2024-05-27 16:13           ` Arash Esbati [this message]
2024-05-27 19:07             ` Paul Nelson
2024-06-02 12:51               ` Arash Esbati
2024-06-02 18:44                 ` Philip Kaludercic
2024-06-02 19:11                   ` Paul Nelson
2024-06-02 19:53                     ` Philip Kaludercic
2024-06-02 20:03                       ` Paul Nelson
2024-06-16 16:20                         ` Paul Nelson
2024-06-17 10:45                           ` Philip Kaludercic
2024-06-17 10:52                             ` Philip Kaludercic
2024-06-18  0:53                               ` Paul Nelson
2024-06-18  6:38                                 ` Philip Kaludercic
2024-06-26  5:59                                   ` Paul Nelson
2024-10-12 15:30                                   ` Paul Nelson
2024-10-18 11:00                                     ` Philip Kaludercic
2024-10-18 17:23                                       ` Paul Nelson
2024-10-18 17:46                                         ` Philip Kaludercic
2024-10-18 19:04                                           ` Paul Nelson
2024-10-19 14:54                                             ` Philip Kaludercic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2o78r2pxf.fsf@macmutant.fritz.box \
    --to=arash@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=philipk@posteo.net \
    --cc=ultrono@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.