>>> "UB" == Uwe Brauer <[email protected]> writes: >>> "AE" == Arash Esbati <[email protected]> writes: >> Uwe Brauer <[email protected]> writes: >>> We discussed this some time ago I am using this patch for some time >>> now. >>> >>> Any objections to apply it?
>> Thanks for the change. I have some comments. First, you have some
>> trailing spaces in your file; applying your change, Git says:
-> git apply ../catchfilebetweentag-file-name.patch
I checked: the command should be
git apply --patch-format=hg ../catchfilebetweentag-file-name.patch
>> ../catchfilebetweentag-file-name.patch:27: trailing whitespace.
>> (setq LaTeX-catchfilebetweentags-counter
>> ../catchfilebetweentag-file-name.patch:35: trailing whitespace.
>> ;; similar way reftex does this.
>> warning: 2 lines add whitespace errors.
>> Doesn't HG warns you about these? You can run
>> M-x whitespace-cleanup RET
Nevertheless I did this
I took into account all your remarks.
See the attached patch below
BTW what's about xcatchfilebetweentag.el
Adding some reftex label/reference support.
It relies on a «non-existing» tex style
\newcommand{\ExecuteExternalMetaData}[2]{%
\ExecuteMetaData[#1]{#2}%
}
I am so far the only one using one.
Uwe
In any case here is the improved patch
Uwe
# HG changeset patch # User Uwe Brauer <[email protected]> # Date 1671031517 -3600 # Wed Dec 14 16:25:17 2022 +0100 # Branch catch # Node ID 7fa71fe45e0f01dcf4dd2e3159d75eb2444ac8b9 # Parent 5217720ec9214b53579a563751c6b421cff4fed2 Add filename as a prefix to the counter for catchfilebetweentags * style/catchfilebetweentags.el (LaTeX-env-catchfilebetweentags): Add filename as a prefix to the counter. diff --git a/style/catchfilebetweentags.el b/style/catchfilebetweentags.el --- a/style/catchfilebetweentags.el +++ b/style/catchfilebetweentags.el @@ -65,15 +65,16 @@ ;; The following code, adds the file name as a prefix to the tag, in ;; a similar way reftex does this, which is useful for combining ;; several external files to a singular one. - (let* ((myfile (file-name-sans-extension (file-name-nondirectory (buffer-file-name (current-buffer))))) + (let* ((file (file-name-sans-extension + (file-name-nondirectory + (buffer-file-name (current-buffer))))) (fn (when LaTeX-catchfilebetweentags-use-numeric-label (LaTeX-catchfilebetweentags-counter-inc))) (tag - (concat myfile ":" + (concat file ":" (TeX-read-string (if fn (format "Tag (default %s): " fn) "Tag: ") - nil nil (when fn (number-to-string fn))))) - (number-to-string fn)) + nil nil (when fn (number-to-string fn)))))) (unless (bolp) (newline) (delete-horizontal-space))
smime.p7s
Description: S/MIME cryptographic signature
