[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [a new patch]
From: |
Uwe Brauer |
Subject: |
Re: [a new patch] |
Date: |
Tue, 30 Aug 2022 08:46:17 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
>>> "AE" == Arash Esbati <arash@gnu.org> writes:
> Hi Uwe,
> Uwe Brauer <oub@mat.ucm.es> writes:
>> I hope it is now ok.
> Thanks, we're almost there, I think. Some comments below.
>> * Makefile.in (STYLEELC): Add style/catchfilebetweentags.el.
>>
>> * tex-style.el (LaTeX-catchfilebetweentags-use-numeric-label): Add a
>> new variable, that controls whether a numeric label gets inserted
>> automatically. Default is t.
>>
>> * style/catchfilebetweentags.el: Almost complete rewrite of all
>> functions.
> Just 'New file.' is enough I think. No need to describe what happened
> until the file was completed.
ok
>> +diff --git a/Makefile.in b/Makefile.in
>> +--- a/Makefile.in
>> ++++ b/Makefile.in
>> +@@ -183,7 +183,7 @@
>> + style/ifpdf.el style/iftex.el style/ifvtex.el \
>> + style/ifxetex.el style/multibib.el style/ltcaption.el \
>> + style/keyval.el style/kvoptions.el style/kvsetkeys.el \
>> +- style/proc.el style/microtype.el
>> ++ style/proc.el style/microtype.el style/catchfilebetweentags.el
> This part doesn't apply cleanly. Can you please update your local repo
> and add this part on top of it?
Ok, I just pulled and noticed that someone, I think you, added
style/tcolorboxlib-theorems.el
so this is a conflicting merge I have to resolve manually.
>> +(TeX-add-style-hook
>> + "catchfilebetweentags"
>> + (lambda ()
>> + (TeX-add-symbols
>> + '("CatchFileBetweenTags"
>> + "cs-name" (TeX-arg-input-file "File-name" t) "Tag")
>> + '("CatchFileBetweenTags*"
>> + "cs-name" (TeX-arg-input-file "File-name" t) "Tag")
> Not tested, but you can use the function `TeX-arg-define-macro' for
> cs-name, i.e.:
> '("CatchFileBetweenTags"
> TeX-arg-define-macro (TeX-arg-input-file "File-name" t) "Tag")
> '("CatchFileBetweenTags*"
> TeX-arg-define-macro (TeX-arg-input-file "File-name" t) "Tag")
>> + '("CatchFileBetweenDelims"
>> + "cs-name" (TeX-arg-input-file "File-name" t) "start-delimiter"
>> "stop-delimiter" ["setup"]))
I will check but that is the advantage over my solution?
> Same here, also start the prompt text uppercased, so something like this:
> '("CatchFileBetweenDelims"
> TeX-arg-define-macro (TeX-arg-input-file "File-name" t)
> "Start delimiter" "Stop delimiter" ["Setup"]))
>> + (LaTeX-add-environments
>> + '("catchfilebetweenfiletags" LaTeX-env-catchfilebetweentags))
>> +
>> + ;; Add `LaTeX-catchfilebetweentags-counter' to
>> + ;; `TeX-normal-mode-reset-list' in case the variable gets out of
>> + ;; sync:
>> + (add-to-list 'TeX-normal-mode-reset-list
>> + 'LaTeX-catchfilebetweentags-counter)
>> + ;; Fontification
>> + (when (and (featurep 'font-latex)
>> + (eq TeX-install-font-lock 'font-latex-setup))
>> + (font-latex-add-keywords '(("ExecuteMetaData" "*[{"))
> Fontification for the new macros is missing:
> ("CatchFileBetweenTags" "*|{\\{{"))
> ("CatchFileBetweenDelims" "|{\\{{{["))
>> + 'function)))
>> + TeX-dialect)
>> +
>> +;;; catchfilebetweentags.el ends here
>> diff --git a/tex-style.el b/tex-style.el
>> --- a/tex-style.el
>> +++ b/tex-style.el
>> @@ -408,6 +408,12 @@
>> ;; example in the docstring of `LaTeX-shortvrb-chars' isn't picked up.
>>
>>
>> +(defcustom LaTeX-catchfilebetweentags-use-numeric-label t
>> + "Insert automatic numerical labels if non-nil, otherwise the
>> +prompts asks you for a label name."
>> + :type 'boolean)
> tex-style.el is sorted alphabetically; can you please add this before
> ;; style/comment.el
ok, I will do later
> Best, Arash
--
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military.
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine.
smime.p7s
Description: S/MIME cryptographic signature
- catchfilebetweentags the final version., Uwe Brauer, 2022/08/24
- Re: catchfilebetweentags the final version., Arash Esbati, 2022/08/24
- Re: catchfilebetweentags the final version., Arash Esbati, 2022/08/24
- Re: catchfilebetweentags the final version., Uwe Brauer, 2022/08/25
- Re: catchfilebetweentags the final version., Uwe Brauer, 2022/08/25
- Re: catchfilebetweentags the final version., Arash Esbati, 2022/08/25
- Re: catchfilebetweentags the final version., Uwe Brauer, 2022/08/26
- [a new patch] (was: catchfilebetweentags the final version.), Uwe Brauer, 2022/08/26
- Re: [a new patch], Arash Esbati, 2022/08/29
- Re: [a new patch],
Uwe Brauer <=
- Re: [a new patch], Uwe Brauer, 2022/08/30
- Re: [a new patch], Uwe Brauer, 2022/08/30
- Re: [a new patch], Arash Esbati, 2022/08/31
- Re: [a new patch], Uwe Brauer, 2022/08/31