[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#73840: [PATCH] Improved folding for citations
From: |
Ikumi Keita |
Subject: |
bug#73840: [PATCH] Improved folding for citations |
Date: |
Tue, 22 Oct 2024 00:25:54 +0900 |
Hi Paul,
>>>>> Arash Esbati <arash@gnu.org> writes:
> Paul Nelson <ultrono@gmail.com> writes:
>> OK, I did this with RefTeX (checking if it's bound and enabled). For
>> bibtex.el, I just require'd it inside the internal function where it's
>> used. I also implemented your correction to the docs. Please find
>> attached the updated patch. Any further feedback welcome.
Looking at your proposal again, a minor concern arose in my mind. The
new function `TeX-fold--bib-abbrev' can return nil, especially when
RefTeX isn't active. Then, let's look at this piece of code:
----------------------------------------------------------------------
(defun TeX-fold-cite-display (keys &rest _args)
[...]
(let* (...
[...]
(key-list (split-string keys "[ \f\t\n\r\v,]+"))
(references
(mapcar #'TeX-fold--bib-abbrev key-list))
(joined-references (string-join references ", ")))
----------------------------------------------------------------------
This calls `TeX-fold--bib-abbrev' repeatedly on each element of
`key-list', so the result `references' can be a list of multiple `nil's.
In that case, `joined-references' seems to have unexpected form:
(let ((r (list nil nil nil)))
(string-join r ", ")) --> ", , "
(However, maybe we should always turn on RefTeX in LaTeX mode buffers
and forget about usages without RefTeX. It wouldn't hurt after all,
since RefTeX is part of Emacs for quite a long period; I suppose there
are practically no users who don't activate RefTeX in AUCTeX LaTeX
mode.)
Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW
- bug#73840: [PATCH] Improved folding for citations, Paul Nelson, 2024/10/16
- bug#73840: [PATCH] Improved folding for citations, Arash Esbati, 2024/10/16
- bug#73840: [PATCH] Improved folding for citations, Paul Nelson, 2024/10/17
- bug#73840: [PATCH] Improved folding for citations, Arash Esbati, 2024/10/21
- bug#73840: [PATCH] Improved folding for citations,
Ikumi Keita <=
- bug#73840: [PATCH] Improved folding for citations, Paul Nelson, 2024/10/21
- bug#73840: [PATCH] Improved folding for citations, Paul Nelson, 2024/10/21
- bug#73840: [PATCH] Improved folding for citations, Arash Esbati, 2024/10/21
- bug#73840: [PATCH] Improved folding for citations, Paul Nelson, 2024/10/21
- bug#73840: [PATCH] Improved folding for citations, Arash Esbati, 2024/10/21
- bug#73840: [PATCH] Improved folding for citations, Arash Esbati, 2024/10/21