emacs/test/lisp
Paul Nelson 03fc0e0fd5 Add RefTeX support for non-file buffers
* lisp/textmodes/reftex.el (reftex--get-buffer-identifier)
(reftex--get-directory, reftex--abbreviate-name)
(reftex--get-basename, reftex--get-truename): New helper
functions that handle both files and buffer objects.
(reftex--remove-buffer-from-master-index): New helper function.
(reftex-tie-multifile-symbols): Support non-file buffers, using
the above.
(reftex-TeX-master-file): Return current buffer when no file.
(reftex-access-scan-info): Remove check requiring file buffers.
(reftex-access-parse-file, reftex-check-parse-consistency): Skip
for non-file buffers.
(reftex-select-external-document): Use new helper function.
(reftex-locate-file): Return buffer objects directly.
(reftex-get-file-buffer-force): Handle buffer objects and
special 'buffer:' strings.
* lisp/textmodes/reftex-global.el (reftex-create-tags-file): Add
error handling for non-file buffers.  Leave TAGS unsupported in
non-file buffers.
(reftex-find-duplicate-labels)
(reftex-isearch-switch-to-next-file): Use new helper functions
that handle both files and buffer objects.
(reftex-isearch-switch-to-next-file): Use equal rather than
string= to compare strings/buffers.
* lisp/textmodes/reftex-index.el (reftex-display-index)
(reftex-index-change-entry): Use new helper functions.
(reftex-index-visit-phrases-buffer): Add error handling for
non-file buffers.  Leave phrases unsupported in non-file
buffers.
* lisp/textmodes/reftex-parse.el (reftex-do-parse)
(reftex-parse-from-file): Add support for non-file buffers.
(reftex-all-document-files, reftex-where-am-I)
(reftex-notice-new): Use new helper functions.
* lisp/textmodes/reftex-ref.el (reftex-label-info-update):
Support non-file buffers.
(reftex-label-info, reftex-replace-prefix-escapes, reftex-label)
(reftex-replace-prefix-escapes, reftex-offer-label-menu): Use
new helper functions.
* lisp/textmodes/reftex-sel.el (reftex-insert-docstruct): Use
new helper function.
* lisp/textmodes/reftex-toc.el (reftex-toc)
(reftex-recenter-toc-when-idle): Support non-file buffers.
* lisp/textmodes/reftex-cite.el (reftex-bib-or-thebib)
(reftex-get-bibfile-list): Use new helper functions.
* lisp/textmodes/reftex-global.el
(reftex-save-all-document-buffers, reftex-ensure-write-access):
Ignore non-file buffers.
* lisp/textmodes/reftex-parse.el (reftex-all-document-files):
For non-file objects, do not apply relative path transformation.
* test/lisp/textmodes/reftex-tests.el
(reftex-all-used-citation-keys-buffer)
(reftex-renumber-simple-labels-buffer): New tests for operations
on non-file buffers.

RefTeX historically assumed that the buffers it operates on
visit files.  To handle non-file buffers:

Modify reftex-TeX-master-file so that it returns the buffer
object itself (as suggested by Stefan Monnier).  Modify each
caller to handle buffer objects, aided by some helper functions
added to reftex.el.  Replace 'string=' by 'equal' in places.

Use buffer-base-buffer, where appropriate, to handle indirect
buffers (file and non-file).

TAGS files and phrases buffers remain unsupported for non-file
buffers.
2025-04-04 14:37:33 -04:00
..
align-resources Support lua-ts-mode in align.el 2023-10-21 12:25:25 +02:00
auth-source-resources Move netrc tests to auth-source-tests.el 2022-08-04 17:33:34 +02:00
bookmark-resources
calc Update copyright year to 2025 2025-01-02 18:39:42 +01:00
calendar Fix handling of delta values with negative month field 2025-03-01 04:38:06 +01:00
cedet Update copyright year to 2025 2025-01-02 18:39:42 +01:00
custom-resources
dabbrev-resources ; Add missing lexical-binding cookies 2025-03-02 19:46:15 +01:00
dired-resources/insert-directory Change how Dired displays available space 2021-12-01 23:27:19 +01:00
emacs-lisp Fix typo in test of read-only cl-defstruct slot. 2025-03-31 14:34:28 -04:00
emulation Update copyright year to 2025 2025-01-02 18:39:42 +01:00
epg-resources Replace aging OpenPGP artifacts in the epg tests. 2022-10-06 14:53:39 +02:00
erc Suppress log module when inserting date stamps in ERC 2025-03-11 18:28:38 -07:00
eshell Port Eshell tests to Android 2025-02-26 20:58:01 +08:00
faces-resources Update copyright year to 2025 2025-01-02 18:39:42 +01:00
files-resources Ensure .dir-locals-2.el behavior as documented (bug#75890) 2025-03-22 16:47:27 -04:00
gnus * test/lisp/gnus/message-tests.el (message-default-buffer-type): New test. 2025-03-25 19:48:06 +01:00
hfy-cmap-resources
image Update copyright year to 2025 2025-01-02 18:39:42 +01:00
international Update copyright year to 2025 2025-01-02 18:39:42 +01:00
loadhist-resources Correctly unload variable aliases. 2025-03-16 12:52:40 -04:00
mail Update copyright year to 2025 2025-01-02 18:39:42 +01:00
mh-e Update copyright year to 2025 2025-01-02 18:39:42 +01:00
minibuffer-resources
net tramp-tests cleanup 2025-03-28 19:26:23 +01:00
nxml Update copyright year to 2025 2025-01-02 18:39:42 +01:00
obsolete Update copyright year to 2025 2025-01-02 18:39:42 +01:00
org Update copyright year to 2025 2025-01-02 18:39:42 +01:00
pcmpl-linux-resources
play Update copyright year to 2025 2025-01-02 18:39:42 +01:00
progmodes ; Fix 'lua-ts-mode' tests (Bug#77102) 2025-03-20 15:35:09 +02:00
saveplace-resources
so-long-tests Update copyright year to 2025 2025-01-02 18:39:42 +01:00
term Update copyright year to 2025 2025-01-02 18:39:42 +01:00
textmodes Add RefTeX support for non-file buffers 2025-04-04 14:37:33 -04:00
time-resources
url Update copyright year to 2025 2025-01-02 18:39:42 +01:00
use-package Update copyright year to 2025 2025-01-02 18:39:42 +01:00
vc Teach diff-apply-hunk to handle hunks with empty context 2025-03-15 04:54:11 +02:00
xdg-resources
abbrev-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
align-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
allout-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
allout-widgets-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
ansi-color-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
ansi-osc-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
apropos-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
arc-mode-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
auth-source-pass-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
auth-source-tests.el Prefer oddp/evenp to cl-oddp/cl-evenp 2025-02-17 05:37:10 +01:00
autoinsert-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
autorevert-tests.el Enable auto-revert-tests to pass on Android 2025-02-26 10:39:46 +08:00
battery-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
bookmark-tests.el Eliminate bookmark-maybe-historicize-string duplicates 2025-02-11 08:47:44 +01:00
buff-menu-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
button-tests.el Prevent button.el from clearing help-echo strings 2025-03-08 17:29:34 +01:00
calculator-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
char-fold-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
color-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
comint-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
completion-preview-tests.el Merge from savannah/emacs-30 2025-03-04 14:32:48 +08:00
completion-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
cus-edit-tests.el Fix comparison of current values for the key-sequence :type 2025-02-23 01:15:24 +01:00
custom-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
dabbrev-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
delim-col-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
descr-text-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
desktop-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
dired-aux-tests.el Prefer ert-with-temp-directory in tests 2025-02-23 03:46:57 +01:00
dired-tests.el Correct (debug body) edebug specs 2025-03-08 18:35:07 +01:00
dired-x-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
dnd-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
dom-tests.el Fix DOM printing 2025-02-15 13:49:17 +02:00
edmacro-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
electric-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
elide-head-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
env-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
epg-config-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
epg-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
faces-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
ffap-tests.el Add a portable test for ffap parsing path-style directory lists 2025-03-01 10:12:21 +02:00
filenotify-tests.el Prefer oddp/evenp to free-coding them in tests 2025-02-17 05:37:10 +01:00
files-tests.el Ensure .dir-locals-2.el behavior as documented (bug#75890) 2025-03-22 16:47:27 -04:00
files-x-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
find-cmd-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
follow-tests.el Fix loading follow.el 2025-03-13 08:14:36 +01:00
font-lock-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
format-spec-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
help-fns-tests.el ; Quote function symbols in help-fns-tests.el 2025-02-11 01:14:32 +01:00
help-mode-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
help-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
hfy-cmap-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
hi-lock-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
hl-line-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
htmlfontify-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
ibuffer-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
ido-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
image-file-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
image-tests.el ; Don't fail image tests if jpeg is supported via imagemagick 2025-02-21 13:02:58 +01:00
imenu-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
info-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
info-xref-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
isearch-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
jit-lock-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
json-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
jsonrpc-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
kmacro-tests.el Use cl-with-gensyms in a few more cases 2025-02-25 01:23:33 +01:00
loadhist-tests.el Correctly unload variable aliases. 2025-03-16 12:52:40 -04:00
lpr-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
ls-lisp-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
man-tests.el New test for finding C header files 2025-01-06 20:04:20 +01:00
md4-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
minibuffer-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
misc-tests.el Fix `string-pixel-width' with alternate text properties 2025-03-20 14:55:23 +02:00
mouse-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
mwheel-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
newcomment-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
obarray-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
paren-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
password-cache-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
pcmpl-linux-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
pcomplete-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
proced-tests.el ; Temporarily disable proced tests on macOS (Bug#76898) 2025-03-11 01:03:50 +01:00
ps-print-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
register-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
repeat-tests.el Add :continue-only directive to bind-keys and use-package 2025-02-27 09:33:09 +02:00
replace-tests.el Use cl-with-gensyms in a few more cases 2025-02-25 01:23:33 +01:00
rot13-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
savehist-tests.el ; Silence byte-compiler 2025-02-09 16:16:01 +01:00
saveplace-tests.el ; Fix saveplace-tests for MS-Windows 2025-02-22 11:49:25 +02:00
scroll-lock-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
server-tests.el Fix a number of ERT tests for execution on Android 2025-02-25 19:13:24 +08:00
ses-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
shadowfile-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
shell-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
simple-tests.el Move buffer related functions from ert-x.el to ert.el 2025-02-24 20:45:41 +01:00
sort-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
soundex-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
speedbar-tests.el Update copyright year to 2025 2025-01-01 07:39:17 +00:00
sqlite-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
startup-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
subr-tests.el function-put: signal error with non-symbol 2025-04-01 21:25:33 +02:00
tab-bar-tests.el Improve logic of tab handling when quitting windows (bug#71386) 2025-03-31 20:40:17 +03:00
tabify-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
tar-mode-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
tempo-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
term-tests.el Add auto-margin enable/disable to term 2025-03-02 16:01:13 -05:00
thingatpt-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
thread-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
time-stamp-tests.el time-stamp: Better handling of some edge cases 2025-02-07 09:18:04 -08:00
time-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
timezone-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
uniquify-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
version-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
wdired-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
which-key-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
whitespace-tests.el Move buffer related functions from ert-x.el to ert.el 2025-02-24 20:45:41 +01:00
wid-edit-tests.el Strengthen widget-get/put tests 2025-03-03 10:49:09 +01:00
winner-tests.el Add :set attribute to winner-dont-bind-my-keys 2025-03-15 04:06:31 +01:00
x-dnd-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
xdg-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
xml-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
xt-mouse-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
yank-media-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00