GNU bug report logs -
#73938
[PATCH] Add folding support for TeX quotes
Previous Next
Reported by: Paul Nelson <ultrono <at> gmail.com>
Date: Mon, 21 Oct 2024 20:45:02 UTC
Severity: normal
Tags: patch
Fixed in version 14.0.8
Done: Arash Esbati <arash <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 73938 in the body.
You can then email your comments to 73938 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-auctex <at> gnu.org
:
bug#73938
; Package
auctex
.
(Mon, 21 Oct 2024 20:45:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Paul Nelson <ultrono <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-auctex <at> gnu.org
.
(Mon, 21 Oct 2024 20:45:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi again,
This patch adds support for folding TeX quotes, together with a user
option for automatically folding quotes upon insertion.
Besides the new feature, I took the liberty of improving the
organization of tex-fold.el by grouping together related functions
that have been added in some of my recent patches.
Any feedback welcome.
Thanks, best,
Paul
[0001-Add-folding-support-for-TeX-quotes.patch (application/octet-stream, attachment)]
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#73938
; Package
auctex
.
(Thu, 24 Oct 2024 09:45:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 73938 <at> debbugs.gnu.org (full text, mbox):
Hi Paul,
>>>>> Paul Nelson <ultrono <at> gmail.com> writes:
> This patch adds support for folding TeX quotes, together with a user
> option for automatically folding quotes upon insertion.
> Besides the new feature, I took the liberty of improving the
> organization of tex-fold.el by grouping together related functions
> that have been added in some of my recent patches.
> Any feedback welcome.
Thanks for intensive contributions. I haven't tested the code yet, but
I'd suggest to move `declare-function' to the initial block of
tex-fold.el, because `declare-function' is just a declaration to the
byte compiler and does nothing at run time.
Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#73938
; Package
auctex
.
(Tue, 29 Oct 2024 15:49:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 73938 <at> debbugs.gnu.org (full text, mbox):
>>>>> Paul Nelson <ultrono <at> gmail.com> writes:
> Thanks Ikumi, I've adjusted accordingly (I'll send the final patch
> pre-merge, assuming that there will be other comments in the mean
> time)
I think it is basically OK. Please send us your latest patch. Some of
nitpicking matters:
1.
----------------------------------------------------------------------
(defun TeX-fold-quotes (start end)
"Fold LaTeX quotes between START and END.
Replaces opening and closing quotes with `TeX-fold-open-quote' and
`TeX-fold-close-quote', respectively, except in math environments,
verbatim contexts and comments."
(pcase-let ((`(,open-quote ,close-quote _) (TeX-get-quote-characters)))
(save-excursion
(goto-char start)
(while (re-search-forward (regexp-opt (list open-quote close-quote)) end t)
----------------------------------------------------------------------
In the course of this `while' loop, the regexp is always regenerated by
`regexp-opt'. However, it is actually constant during the loop. Thus I'd
prefer something like
(let ((regexp (regexp-opt ...)))
(while (re-search-forward regexp ...)
2.
----------------------------------------------------------------------
(defun TeX-fold-quotes (start end)
[...]
(let ((str (if (string= (match-string 0) open-quote)
----------------------------------------------------------------------
If I understand correctly, `match-string-no-properties' would be enough
here.
3.
----------------------------------------------------------------------
(defun TeX-insert-quote (force)
[...]
(save-excursion
(let* ((end (point))
(start (- end
(length
(if (string-match-p (regexp-quote open-quote)
(buffer-substring-no-properties (- end (length open-quote)) end))
----------------------------------------------------------------------
We can just use `string=' instead of regexp+regexp-quote here.
Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#73938
; Package
auctex
.
(Tue, 29 Oct 2024 20:03:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 73938 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi Ikumi, thanks for your feedback, which I've implemented. Please
see attached. Paul
[0001-Add-folding-support-for-TeX-quotes.patch (application/octet-stream, attachment)]
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#73938
; Package
auctex
.
(Wed, 30 Oct 2024 05:49:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 73938 <at> debbugs.gnu.org (full text, mbox):
Hi Paul,
>>>>> Paul Nelson <ultrono <at> gmail.com> writes:
> Hi Ikumi, thanks for your feedback, which I've implemented. Please
> see attached. Paul
Thank you, I installed your change, with slight modifications to Texinfo
documentation. (LaTeX -> @LaTeX{}, two spaces after end of sentences,
etc.)
To David, Mosé, Tassilo and Arash: How about recruiting Paul as an
AUCTeX developer? I'm the latest person that was given the write
permission to AUCTeX repogitory and it was 7 years ago. It would be
prospective to have a new active developer.
Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#73938
; Package
auctex
.
(Fri, 01 Nov 2024 08:34:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 73938 <at> debbugs.gnu.org (full text, mbox):
Hi Keita,
Ikumi Keita <ikumi <at> ikumi.que.jp> writes:
> To David, Mosé, Tassilo and Arash: How about recruiting Paul as an
> AUCTeX developer? I'm the latest person that was given the write
> permission to AUCTeX repogitory and it was 7 years ago. It would be
> prospective to have a new active developer.
I agree, as I already said elsewhere, it would be great to have AUCTeX
developers who actually use it on a daily basis. I'm not sure about
you, but I'm actually not using LaTeX anymore.
@Paul: Do you want to step in and look after some parts of AUCTeX?
tex-fold.el and preview.el seem to be a good start :-)
Best, Arash
bug marked as fixed in version 14.0.8, send any further explanations to
73938 <at> debbugs.gnu.org and Paul Nelson <ultrono <at> gmail.com>
Request was from
Arash Esbati <arash <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Wed, 06 Nov 2024 22:03:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#73938
; Package
auctex
.
(Sun, 17 Nov 2024 18:34:01 GMT)
Full text and
rfc822 format available.
Message #25 received at 73938 <at> debbugs.gnu.org (full text, mbox):
Hi Arash and Ikumi,
>> To David, Mosé, Tassilo and Arash: How about recruiting Paul as an
>> AUCTeX developer? I'm the latest person that was given the write
>> permission to AUCTeX repogitory and it was 7 years ago. It would be
>> prospective to have a new active developer.
>
> I agree, as I already said elsewhere, it would be great to have AUCTeX
> developers who actually use it on a daily basis. I'm not sure about
> you, but I'm actually not using LaTeX anymore.
>
> @Paul: Do you want to step in and look after some parts of AUCTeX?
> tex-fold.el and preview.el seem to be a good start :-)
Many thanks for the invitation. Could you say more about what being a
"developer" involves? I want to be upfront that I can be a bit
irregular with communication, despite best efforts, though I'm happy to
help as I can. I certainly have a vested interest, having used AUCTeX
for nearly a couple decades, onboarded a dozen colleagues in the past
couple years, etc.
Thanks again and best,
Paul
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 16 Dec 2024 12:24:11 GMT)
Full text and
rfc822 format available.
This bug report was last modified 184 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.