Re: Indenting the code written in square brackets as optional parameters

2022-03-20 Thread Ikumi Keita
Hi Arash, > Arash Esbati writes: > Thanks, LGTM. I have one question though: > What is [0,10[[ for an interval? I was aware of () and [] combinations > but the double [[ is new to me (and my daily math business doesn't > involve intervals ;-) Shame on me, I didn't look at the example Tass

Re: Indenting the code written in square brackets as optional parameters

2022-03-19 Thread Arash Esbati
Hi Keita, Ikumi Keita writes: > Thanks a lot! Based on your work, I added two examples as well as > supplementary explanations. Thanks, LGTM. I have one question though: > +@noindent > +Note that this is an opt-in feature, both variables are initially set to > +an empty string. That is becau

Re: Indenting the code written in square brackets as optional parameters

2022-03-19 Thread Ikumi Keita
Hi Arash, > Arash Esbati writes: > While waiting for that someone to come up with that proposal (😉) what > do think about this: Thanks a lot! Based on your work, I added two examples as well as supplementary explanations. Regards, Ikumi Keita #StandWithUkraine #StopWarInUkraine diff --git

Re: Indenting the code written in square brackets as optional parameters

2022-03-18 Thread Arash Esbati
Hi Keita, Ikumi Keita writes: > If this proposal is acceptable, I can commit it the git repo and I'd > appreciate if someone could write suitable paragraphs to include in > .texi documentation ;-) . While waiting for that someone to come up with that proposal (😉) what do think about this: --8<

Re: Indenting the code written in square brackets as optional parameters

2022-03-16 Thread Sašo Živanović
Looks good to me as well, and looking forward to test it. Thanks! Sašo Arash Esbati je 16. 03. 22 ob 11:37 napisal: Hi Keita, Ikumi Keita writes: I think the attached patch works as expected. My approach is to include only additional delimiters in new user options, since braces "{" and "}" s

Re: Indenting the code written in square brackets as optional parameters

2022-03-16 Thread निरंजन
Thanks a lot for developing this feature. Cheers, निरंजन

Re: Indenting the code written in square brackets as optional parameters

2022-03-16 Thread Ikumi Keita
Hi Arash, > Arash Esbati writes: >> If this proposal is acceptable, I can commit it the git repo > Thanks for working on this. Your patch LGTM, please go ahead and > install it. I will then install my change for indentation of > conditionals on top of it. Done. I'll check your conditional

Re: Indenting the code written in square brackets as optional parameters

2022-03-16 Thread Arash Esbati
Hi Keita, Ikumi Keita writes: > I think the attached patch works as expected. My approach is to include > only additional delimiters in new user options, since braces "{" and "}" > should always be considered to pull in indentation. > > To try indent inside square brackets, include > (setq TeX-i

Re: Indenting the code written in square brackets as optional parameters

2022-03-16 Thread Ikumi Keita
Hi all, > Ikumi Keita writes: > Sašo Živanović writes: >> Summing up: while I find []-indenting indispensable for Forest trees, >> and TikZ in general, I would definitely want to have an way to >> override it for specific cases, and counting stuff in comments seems >> the simplest way to

Re: Indenting the code written in square brackets as optional parameters

2022-03-10 Thread Ikumi Keita
Hi all, > Arash Esbati writes: > Sašo Živanović writes: >> However, as a long-time user of the []-based indentation, I can >> confidently say that counting *brackets []* (not braces {}) in >> comments is quite crucial for user's happiness. And not only in math >> mode, as noted by others in

Re: Indenting the code written in square brackets as optional parameters

2022-03-09 Thread Arash Esbati
Sašo Živanović writes: > However, as a long-time user of the []-based indentation, I can > confidently say that counting *brackets []* (not braces {}) in > comments is quite crucial for user's happiness. And not only in math > mode, as noted by others in this thread, also in text (well, > program

Re: Indenting the code written in square brackets as optional parameters

2022-03-09 Thread Sašo Živanović
Hi! Hello Arash, Ikumi and Sašo, Thanks for probing this issue so deeply and sorry for a delayed response. That can be an option. I think there are 3 (or more?) candidates: 1. New minor mode. 2. New user option. 3. Leave it as is. What do others think? I would definitely insist for a

Re: Indenting the code written in square brackets as optional parameters

2022-03-09 Thread निरंजन
Hello Arash, Ikumi and Sašo, Thanks for probing this issue so deeply and sorry for a delayed response. > That can be an option. I think there are 3 (or more?) > candidates: > 1. New minor mode. > 2. New user option. > 3. Leave it as is. > What do others think? I would definitely insist for

Re: Indenting the code written in square brackets as optional parameters

2022-03-09 Thread Sašo Živanović
Hi! Ikumi Keita je 8. 03. 22 ob 17:59 napisal: [ Including Sašo in To:, not to diverge discussion in two mail lists. ] Thanks! I have subscribed to auctex-devel now, to make everybody's life a bit easier. ;-) Sašo Živanović writes: Especially, how does your patch work in the presence of va

Re: Indenting the code written in square brackets as optional parameters

2022-03-08 Thread Arash Esbati
Hi Keita, Ikumi Keita writes: > (Or are you thinking to disable indents for only square brackets > inside math mode?) Sorry if my last message was cryptic. This is exactly what I meant: the brackets. We have a working setup for the braces which we don't want to touch. > Do you mean that user

Re: Indenting the code written in square brackets as optional parameters

2022-03-08 Thread Ikumi Keita
[ Including Sašo in To:, not to diverge discussion in two mail lists. ] Hi Arash and Sašo, > Arash Esbati writes: > When in doubt, 3. is always a good choice. But would it make sense to > have a user option and the actual code ignores that in math-mode and > only kicks in within regular tex

Re: Indenting the code written in square brackets as optional parameters

2022-03-08 Thread Arash Esbati
Hi Keita, Ikumi Keita writes: >> Arash Esbati writes: >> Can we use the same trick we use for the fontification of $, i.e., put a >> closing ] as a comment in the same line? > > That didn't work as expected. :-( It seems that indentation command is > smart enough to ignore "]" in comments.

Re: Indenting the code written in square brackets as optional parameters

2022-03-06 Thread Ikumi Keita
Hi all, > Arash Esbati writes: > Can we use the same trick we use for the fontification of $, i.e., put a > closing ] as a comment in the same line? That didn't work as expected. :-( It seems that indentation command is smart enough to ignore "]" in comments. > Tassilo Horn writes: > I

Re: Indenting the code written in square brackets as optional parameters

2022-03-05 Thread निरंजन
Hello everyone, > Try M-x byte-recompile-directory RET and specify > ~/.emacs.d/elpa/auctex-13.0.14/ as the target > directory. It will byte-compile latex.el and generates new > latex.elc there. After that, restart emacs. Then you can > taste updated behavior. Thanks for this Ikumi, but this prod

Re: Indenting the code written in square brackets as optional parameters

2022-03-05 Thread Tassilo Horn
Ikumi Keita writes: >> Text [% >> Do we have the same level of confidence for [? >> \end{document} > > Well, isn't it almost impossible? AUCTeX cannot know whether the > author intends to insert closing "]" later but hasn't done that yet, > or "]" is to be really missing when the document is comp

Re: Indenting the code written in square brackets as optional parameters

2022-03-05 Thread Arash Esbati
Hi Keita, Ikumi Keita writes: >> Arash Esbati writes: >> Does your proposal deal with cases where you only have an opening >> bracket? > > Hmm, it doesn't seem to do so according to experiment. I thought so :-) > I feel that it isn't worth discriminating whether a leading "[" is > a delim

Re: Indenting the code written in square brackets as optional parameters

2022-03-04 Thread Ikumi Keita
Hi निरंजन, > निरंजन writes: > I tried merging the patch you have attached. For that I > followed the following steps on my bash terminal. I think I > have missed something because I am not able to see any > change in the behavior so far. [...] > So I am unfortunately not able to test whethe

Re: Indenting the code written in square brackets as optional parameters

2022-03-04 Thread Ikumi Keita
Hi Arash, > Arash Esbati writes: > Does your proposal deal with cases where you only have an opening > bracket? Hmm, it doesn't seem to do so according to experiment. > I mean something like this which is valid LaTeX code: > \documentclass[a4paper]{article} > \begin{document} > Text {% >

Re: Indenting the code written in square brackets as optional parameters

2022-03-04 Thread निरंजन
Hello hackers, >>> Hi, may I call you निरंजन? Yes, that's my name. [niɾənʤən] it is in IPA. >>> Thanks for your suggestion, I think it is useful. > So am I... I am glad that you liked my suggestion :) >>> It seems that the attached patch achieves what you >>> want. I tried merging the patch y

Re: Indenting the code written in square brackets as optional parameters

2022-03-04 Thread Denis Bitouzé
Le 04/03/22 à 17h47, Ikumi Keita a écrit : > Thanks for your suggestion, I think it is useful. So am I... -- Denis

Re: Indenting the code written in square brackets as optional parameters

2022-03-04 Thread Arash Esbati
Hi Keita, Ikumi Keita writes: > Thanks for your suggestion, I think it is useful. It seems that the > attached patch achieves what you want. Unless someone finds difficulties > with it, I can polish it and commit into the git repo. Does your proposal deal with cases where you only have an openi

Re: Indenting the code written in square brackets as optional parameters

2022-03-04 Thread Ikumi Keita
Hi, may I call you निरंजन? > निरंजन writes: > I am having a code like the following in my mind: > --- > \documentclass{article} > \usepackage[% > Scale=1.5,% > Renderer=Harfbuzz% > ]{fontspec} > --- > Why not to support indentation of the code ins

Indenting the code written in square brackets as optional parameters

2022-03-02 Thread निरंजन
Hello, Disclaimer: I am very new to Emacs hacking, so probably I won't be able to submit patches regarding this. I am having a code like the following in my mind: