Re: [AUCTeX-devel] [PATCH] Various patches
Hi Arash, 2016-01-24 10:42 GMT+01:00 Arash Esbati: > Hi all, > > please find attached 4 patches improving some styles I touched recently. > My apologies for not getting it right last time. > > * style/enumitem.el (LaTeX-enumitem-newlist-list) > (LaTeX-enumitem-newlist-list-item-arg) > (LaTeX-auto-enumitem-newlist): Remove variables. > (LaTeX-enumitem-newlist-list-local): Fix docstring. > (LaTeX-enumitem-auto-cleanup): Plug \newlist into AUCTeX parser. > ("enumitem"): Offer only enumerated environments as completion for > \restartlist. > > * style/theorem.el (LaTeX-theorem-fontdecl): Do not prefix the > elements with `TeX-esc'. > (LaTeX-arg-theorem-fontdecl): New function. > ("theorem"): Use `LaTeX-arg-theorem-fontdecl' for font related > queries. > > * style/ntheorem.el (LaTeX-ntheorem-fontdecl): Do not prefix the > elements with `TeX-esc'. > (LaTeX-arg-ntheorem-fontdecl): New function. > ("ntheorem"): Use `LaTeX-arg-ntheorem-fontdecl' for font related > queries. > > * style/amsthm.el (LaTeX-amsthm-fontdecl): Do not prefix the > elements with `TeX-esc'. > (LaTeX-arg-amsthm-fontdecl): New function. > ("amsthm"): Use `LaTeX-arg-amsthm-fontdecl' for font related > queries. > > Best, Arash Patches installed, thanks! Bye, Mosè ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel
Re: [AUCTeX-devel] [PATCH] Various patches
Hi Arash, 2015-11-28 18:38 GMT+01:00 Arash Esbati: > Hi Tassilo, > > Tassilo Horn writes: > >> Arash Esbati writes: >> >>> please find attached 4 patch sets containing: >>> >>> * Makefile.in (STYLESRC): Add new style. >>> >>> * style/ntheorem.el: New file. >>> >>> * Makefile.in (STYLESRC): Add new style. >>> >>> * style/theorem.el: New file. >>> >>> * style/amsthm.el (LaTeX-amsthm-fontdecl): Cover all font changing >>> declarations. >>> ("amsthm"): Overrule the defintion for \newtheorem in `latex.el'. >>> ("amsthm"): Use `TeX-completing-read-multiple' for font related >>> queries. >>> >>> * style/hologo.el: Fix the file name in header. >> >> Great, thanks a lot. I've applied and pushed them. > > Thanks for installing them. I found a small bug in 2 files, could you > please apply the attached patch as well? It would be great if all bugs were simply wrongly named prompts ;-) Patch installed, thank you. Bye, Mosè ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel
Re: [AUCTeX-devel] [PATCH] Various patches
Hi Tassilo, Tassilo Hornwrites: > Arash Esbati writes: > >> please find attached 4 patch sets containing: >> >> * Makefile.in (STYLESRC): Add new style. >> >> * style/ntheorem.el: New file. >> >> * Makefile.in (STYLESRC): Add new style. >> >> * style/theorem.el: New file. >> >> * style/amsthm.el (LaTeX-amsthm-fontdecl): Cover all font changing >> declarations. >> ("amsthm"): Overrule the defintion for \newtheorem in `latex.el'. >> ("amsthm"): Use `TeX-completing-read-multiple' for font related >> queries. >> >> * style/hologo.el: Fix the file name in header. > > Great, thanks a lot. I've applied and pushed them. Thanks for installing them. I found a small bug in 2 files, could you please apply the attached patch as well? TIA, Arash >From 3ce4fafca9e5011cf4efb94ecea1d1d11180facb Mon Sep 17 00:00:00 2001 From: Arash Esbati Date: Sat, 28 Nov 2015 18:32:43 +0100 Subject: [PATCH] Fix query prompt * style/ntheorem.el ("ntheorem"): * style/theorem.el ("theorem"): Fix wrong query prompt. --- style/ntheorem.el | 2 +- style/theorem.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/style/ntheorem.el b/style/ntheorem.el index 6be49b7..cedc5a8 100644 --- a/style/ntheorem.el +++ b/style/ntheorem.el @@ -198,7 +198,7 @@ make them available as new environments. Update '("theoremheaderfont" (TeX-arg-eval mapconcat 'identity (TeX-completing-read-multiple - "Body font: " + "Header font: " LaTeX-ntheorem-fontdecl) "")) '("theoremnumbering" diff --git a/style/theorem.el b/style/theorem.el index e422122..7d8bffd 100644 --- a/style/theorem.el +++ b/style/theorem.el @@ -141,7 +141,7 @@ make them available as new environments." '("theoremheaderfont" (TeX-arg-eval mapconcat 'identity (TeX-completing-read-multiple - "Body font: " + "Header font: " LaTeX-theorem-fontdecl) "")) '("theorempreskipamount" -- 2.6.3 ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel
Re: [AUCTeX-devel] [PATCH] Various patches
Arash Esbatiwrites: Hi Arash, > please find attached 4 patch sets containing: > > * Makefile.in (STYLESRC): Add new style. > > * style/ntheorem.el: New file. > > * Makefile.in (STYLESRC): Add new style. > > * style/theorem.el: New file. > > * style/amsthm.el (LaTeX-amsthm-fontdecl): Cover all font changing > declarations. > ("amsthm"): Overrule the defintion for \newtheorem in `latex.el'. > ("amsthm"): Use `TeX-completing-read-multiple' for font related > queries. > > * style/hologo.el: Fix the file name in header. Great, thanks a lot. I've applied and pushed them. Bye, Tassilo ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel
Re: [AUCTeX-devel] [PATCH] Various patches
Hi Arash, 2015-10-08 22:41 GMT+02:00 Arash Esbati: > Hi all, > > please find attached 4 patches covering: > > * style/longtable.el ("longtable"): Use `LaTeX-add-counters' on > "LTchunksize" and not `TeX-add-symbols'. > > * style/enumitem.el (LaTeX-arg-SetEnumitemKey): Remove unused > `prompt' from arguments list. > (LaTeX-arg-SetEnumitemValue): ditto. > > * style/listings.el (LaTeX-listings-key-val-options-local): New > variable used for all key-val queries. > ("listings-lstdefinestyle"): Add parsing support for > "\lstdefinestyle". > (LaTeX-listings-lstnewenvironment-regexp): Add missing "s" to > "listing". > (LaTeX-listings-update-style-key): New function adding newly > defined values to "style" key in > `LaTeX-listings-key-val-options-local'. > ("listings"): Extend "lstdefinestyle". > > * style/wrapfig.el ("wrapfig"): Check for new floating > environments definded through "newfloat.el" and offer them as > completion to "wrapfloat" environment. > > As always any comments welcome and my apologies for missing the change > in `longtable' last time. Patches installed, thanks! Bye, Mosè ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel
Re: [AUCTeX-devel] [PATCH] Various patches
Arash Esbatiwrites: Hi Arash, > please find attaches some patches. Thanks a lot, I've applied and pushed your changes. Bye, Tassilo ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel
Re: [AUCTeX-devel] [PATCH] Various patches
Hi Arash, 2015-08-30 15:22 GMT+02:00 Arash Esbati esb...@gmx.de: Mosč Giordano m...@gnu.org writes: Hi Mosč, 2015-08-24 22:49 GMT+02:00 Arash Esbati esb...@gmx.de: Regarding `TeX-arg-{opening,closing}-brace' values, we have `TeX-gr{op,cl}' variables, avoid using hardcoded { and }. In addition, since there is an `optional' argument you may want to bind `TeX-arg-{opening,closing}-brace' to `LaTeX-opt{op,cl}' when `optional' is non-nil, but that argument is actually always mandatory in real cases so this could be an overkill. Thanks for your comments. I went the non overkill route and used `TeX-gr{op,cl}' straight away. I will clean up the code and make a new patch this weekend. Reg. the other patches, I could also re-submit them as well. Just give me a hint how you want to proceed. It would be great if you manage to resend a full changeset, but working with ChangeLog conflicts is a bit tedious. I know now ;-) Please find them all attached and thanks for your patience. Patches installed, thank you! Bye, Mosè ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel
Re: [AUCTeX-devel] [PATCH] Various patches
Hi Arash, 2015-08-24 22:49 GMT+02:00 Arash Esbati esb...@gmx.de: Mosè Giordano m...@gnu.org writes: Hi Mosè, 2015-08-22 12:13 GMT+02:00 Arash Esbati esb...@gmx.de: As always, any comments welcome. I reviewed your patches, they're overall fine, as usual, I have only a minor concern about captionbox: for the label you could simply call (TeX-insert-macro label) which will do the-right-thing. Many thanks again for looking at this. Indeed, `TeX-insert-macro' does the trick. Now I have: --8---cut here---start-8--- (defun LaTeX-arg-caption-captionbox (optional optional star prompt) Query for the arguments of `\\captionbox' incl. a label and insert them. If STAR is t, then do not query for a `\\label' and insert only a caption. (let ((caption (TeX-read-string (TeX-argument-prompt optional prompt Caption))) (TeX-arg-opening-brace {) (TeX-arg-closing-brace })) (LaTeX-indent-line) (insert TeX-arg-opening-brace caption) (unless star (TeX-insert-macro label)) (insert TeX-arg-closing-brace)) (let ((width (completing-read (TeX-argument-prompt t prompt Width) (mapcar (lambda(elt) (concat TeX-esc (car elt))) (LaTeX-length-list (inpos (completing-read (TeX-argument-prompt t prompt Inner position) '(c l r s (cond (;; 2 optional args (and width (not (string-equal width )) inpos (not (string-equal inpos ))) (insert (format [%s][%s] width inpos))) (;; 1st empty opt. arg, 2nd opt. arg (and (string-equal width ) inpos (not (string-equal inpos ))) (insert (format [][%s] inpos))) (;; 1st opt. arg, 2nd empty opt. arg (and width (not (string-equal width )) (string-equal inpos )) (insert (format [%s] width))) (t ; Do nothing if both empty (ignore (LaTeX-fill-paragraph)) --8---cut here---end---8--- Regarding `TeX-arg-{opening,closing}-brace' values, we have `TeX-gr{op,cl}' variables, avoid using hardcoded { and }. In addition, since there is an `optional' argument you may want to bind `TeX-arg-{opening,closing}-brace' to `LaTeX-opt{op,cl}' when `optional' is non-nil, but that argument is actually always mandatory in real cases so this could be an overkill. I will clean up the code and make a new patch this weekend. Reg. the other patches, I could also re-submit them as well. Just give me a hint how you want to proceed. It would be great if you manage to resend a full changeset, but working with ChangeLog conflicts is a bit tedious. You could create a branch from current AUCTeX master HEAD and cherry-pick one by one your commits and fix one by one ChangeLog conflicts. This should work. Bye, Mosè ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel
Re: [AUCTeX-devel] [PATCH] Various patches
Mosè Giordano m...@gnu.org writes: Hi Mosè, 2015-08-22 12:13 GMT+02:00 Arash Esbati esb...@gmx.de: As always, any comments welcome. I reviewed your patches, they're overall fine, as usual, I have only a minor concern about captionbox: for the label you could simply call (TeX-insert-macro label) which will do the-right-thing. Many thanks again for looking at this. Indeed, `TeX-insert-macro' does the trick. Now I have: --8---cut here---start-8--- (defun LaTeX-arg-caption-captionbox (optional optional star prompt) Query for the arguments of `\\captionbox' incl. a label and insert them. If STAR is t, then do not query for a `\\label' and insert only a caption. (let ((caption (TeX-read-string (TeX-argument-prompt optional prompt Caption))) (TeX-arg-opening-brace {) (TeX-arg-closing-brace })) (LaTeX-indent-line) (insert TeX-arg-opening-brace caption) (unless star (TeX-insert-macro label)) (insert TeX-arg-closing-brace)) (let ((width (completing-read (TeX-argument-prompt t prompt Width) (mapcar (lambda(elt) (concat TeX-esc (car elt))) (LaTeX-length-list (inpos (completing-read (TeX-argument-prompt t prompt Inner position) '(c l r s (cond (;; 2 optional args (and width (not (string-equal width )) inpos (not (string-equal inpos ))) (insert (format [%s][%s] width inpos))) (;; 1st empty opt. arg, 2nd opt. arg (and (string-equal width ) inpos (not (string-equal inpos ))) (insert (format [][%s] inpos))) (;; 1st opt. arg, 2nd empty opt. arg (and width (not (string-equal width )) (string-equal inpos )) (insert (format [%s] width))) (t ; Do nothing if both empty (ignore (LaTeX-fill-paragraph)) --8---cut here---end---8--- I will clean up the code and make a new patch this weekend. Reg. the other patches, I could also re-submit them as well. Just give me a hint how you want to proceed. Best, Arash ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel
Re: [AUCTeX-devel] [PATCH] Various patches
Hi Arash, 2015-08-22 12:13 GMT+02:00 Arash Esbati esb...@gmx.de: As always, any comments welcome. I reviewed your patches, they're overall fine, as usual, I have only a minor concern about captionbox: for the label you could simply call (TeX-insert-macro label) which will do the-right-thing. In this way `TeX-read-label' isn't needed anymore.! So, (TeX-argument-insert heading optional) can be replaced by (didn't actually tested, but this or something close to this should do the trick) (insert TeX-arg-opening-brace caption) (if star (TeX-insert-macro label)) (insert TeX-arg-closing-brace) Just remember to let-bind the opening/closing brace depending on the value of `optional'. Sorry, I didn't look closely to the patch in your previous email. Bye, Mosè ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel