Re: \frametitle macro is not automatically indented in frame environment in beamer

2021-08-26 Thread Kourosh Kalayeh



On 26 Aug 2021, at 9:09, Tassilo Horn wrote:

> Arash Esbati  writes:
>
>>> I installed it through ELPA and emacs package manager
>>> (`package-install auctex`).
>>
>> Ok, the next release might be soon if you kindly ask the release
>> manager (CC'ed) :-).
>
> I've just released GNU AUCTeX 13.0.14 which should appear anytime soon
> on GNU ELPA. ;-)
>

Perfect, thank you Arash and Tassilo for your great works.  I updated AUCTeX to 
13.0.14.

Best,
Kourosh



Re: \frametitle macro is not automatically indented in frame environment in beamer

2021-08-26 Thread Tassilo Horn
Arash Esbati  writes:

>> I installed it through ELPA and emacs package manager
>> (`package-install auctex`).
>
> Ok, the next release might be soon if you kindly ask the release
> manager (CC'ed) :-).

I've just released GNU AUCTeX 13.0.14 which should appear anytime soon
on GNU ELPA. ;-)

Bye,
Tassilo



Re: \frametitle macro is not automatically indented in frame environment in beamer

2021-08-26 Thread Arash Esbati
Kourosh Kalayeh  writes:

> On 26 Aug 2021, at 8:35, Arash Esbati wrote:
>
>> Yes, it will.  The question is when will be next release since we have
>> ELPA and tarball releases.  How did you install AUCTeX?
>
> I installed it through ELPA and emacs package manager
> (`package-install auctex`).

Ok, the next release might be soon if you kindly ask the release manager
(CC'ed) :-).

Best, Arash



Re: \frametitle macro is not automatically indented in frame environment in beamer

2021-08-26 Thread Kourosh Kalayeh

On 26 Aug 2021, at 8:35, Arash Esbati wrote:


Kourosh Kalayeh  writes:


I added `(add-hook 'LaTeX-mode-hook #'turn-on-auto-fill)` in my init
file, and as suggested it does the automatic indenting but it messes
up my formatting which might be fine, I am giving it a shot.  Thanks.


"Messes up" is a matter of taste :-)  Some people like/use 
auto-filling,

others not.  Personally, I don't like reading a paragraph as a single
long line.


I completely agree.  That is why I am giving it a shot.




I agree, this option is ``somewhat more hazardous''.  I think I've
fixed
this issue by adding (indent-according-to-mode) before inserting
\frametitle in beamer.el[1].


Awesome, will it be in the next version?


Yes, it will.  The question is when will be next release since we have
ELPA and tarball releases.  How did you install AUCTeX?


I installed it through ELPA and emacs package manager (`package-install 
auctex`).


Thanks,
Kourosh


Re: \frametitle macro is not automatically indented in frame environment in beamer

2021-08-26 Thread Arash Esbati
Kourosh Kalayeh  writes:

> I added `(add-hook 'LaTeX-mode-hook #'turn-on-auto-fill)` in my init
> file, and as suggested it does the automatic indenting but it messes
> up my formatting which might be fine, I am giving it a shot.  Thanks.

"Messes up" is a matter of taste :-)  Some people like/use auto-filling,
others not.  Personally, I don't like reading a paragraph as a single
long line.

>> I agree, this option is ``somewhat more hazardous''.  I think I've
>> fixed
>> this issue by adding (indent-according-to-mode) before inserting
>> \frametitle in beamer.el[1].
>
> Awesome, will it be in the next version?

Yes, it will.  The question is when will be next release since we have
ELPA and tarball releases.  How did you install AUCTeX?

Best, Arash



Re: \frametitle macro is not automatically indented in frame environment in beamer

2021-08-26 Thread Kourosh Kalayeh

On 26 Aug 2021, at 7:51, Arash Esbati wrote:


Thibaut Verron  writes:


On 25/08/2021 16:52, Arash Esbati wrote:


Hence, you have to turn that mode on in order to get the old
behaviour with something like this in your init file:

 (add-hook 'LaTeX-mode-hook #'turn-on-auto-fill)


With the side effect of enabling auto-fill.


True.


I added `(add-hook 'LaTeX-mode-hook #'turn-on-auto-fill)` in my init 
file, and as suggested it does the automatic indenting but it messes up 
my formatting which might be fine, I am giving it a shot.  Thanks.





If you don't want auto-fill, a less intrusive but somewhat more
hazardous alternative could be:

(add-hook 'LaTeX-mode-hook (lambda () (setq auto-fill-function 
'indent-according-to-mode)))


I agree, this option is ``somewhat more hazardous''.  I think I've 
fixed

this issue by adding (indent-according-to-mode) before inserting
\frametitle in beamer.el[1].


Awesome, will it be in the next version?

Thanks,
Kourosh

Re: \frametitle macro is not automatically indented in frame environment in beamer

2021-08-26 Thread Arash Esbati
Thibaut Verron  writes:

> On 25/08/2021 16:52, Arash Esbati wrote:
>>
>> Hence, you have to turn that mode on in order to get the old
>> behaviour with something like this in your init file:
>>
>>  (add-hook 'LaTeX-mode-hook #'turn-on-auto-fill)
>
> With the side effect of enabling auto-fill.

True.

> If you don't want auto-fill, a less intrusive but somewhat more
> hazardous alternative could be:
>
> (add-hook 'LaTeX-mode-hook (lambda () (setq auto-fill-function 
> 'indent-according-to-mode)))

I agree, this option is ``somewhat more hazardous''.  I think I've fixed
this issue by adding (indent-according-to-mode) before inserting
\frametitle in beamer.el[1].

Comment welcome.

Best, Arash

Footnotes:
[1]  
http://git.savannah.gnu.org/cgit/auctex.git/commit/?id=d77538b45831f0321767fdf79f91ba89090c0211



Re: \frametitle macro is not automatically indented in frame environment in beamer

2021-08-25 Thread Thibaut Verron

On 25/08/2021 16:52, Arash Esbati wrote:

Kourosh Kalayeh  writes:


On 25 Aug 2021, at 10:27, Thibaut Verron wrote:


Oh I'm very sorry, I read "insert" instead of "indent". What is the
value of the variable auto-fill-function in your buffer?

I ran `C-h v` with `auto-fill-function` as an argument (while in
AUXTeX mode), and I got its value as nil.

This behaviour is due to this change in beamer.el[1].  AUCTeX now checks
if users have auto-filling enabled before filling.  Hence, you have to
turn that mode on in order to get the old behaviour with something like
this in your init file:

 (add-hook 'LaTeX-mode-hook #'turn-on-auto-fill)


With the side effect of enabling auto-fill.

If you don't want auto-fill, a less intrusive but somewhat more 
hazardous alternative could be:


(add-hook 'LaTeX-mode-hook (lambda () (setq auto-fill-function 
'indent-according-to-mode)))

Best wishes,

Thibaut




Re: \frametitle macro is not automatically indented in frame environment in beamer

2021-08-25 Thread Arash Esbati
Kourosh Kalayeh  writes:

> On 25 Aug 2021, at 10:27, Thibaut Verron wrote:
>
>> Oh I'm very sorry, I read "insert" instead of "indent". What is the
>> value of the variable auto-fill-function in your buffer?
>
> I ran `C-h v` with `auto-fill-function` as an argument (while in
> AUXTeX mode), and I got its value as nil.

This behaviour is due to this change in beamer.el[1].  AUCTeX now checks
if users have auto-filling enabled before filling.  Hence, you have to
turn that mode on in order to get the old behaviour with something like
this in your init file:

(add-hook 'LaTeX-mode-hook #'turn-on-auto-fill)

Best, Arash

Footnotes:
[1]  
http://git.savannah.gnu.org/cgit/auctex.git/commit/style/beamer.el?id=a21c10a076734b710145df5950459351025b8723



Re: \frametitle macro is not automatically indented in frame environment in beamer

2021-08-25 Thread Kourosh Kalayeh

On 25 Aug 2021, at 10:45, Thibaut Verron wrote:


No worries, thank you for clarification.

I ran |C-h v| with |auto-fill-function| as an argument (while in 
AUXTeX mode), and I got its value as nil.


Thanks,
Kourosh

Okay, then it looks like a new behavior indeed. It appears that the 
\frametitle command was never actually indented, but rather 
auto-filled, which had the side effect of indenting it. Now auctex 
checks whether the user actually wants to auto-fill before doing so.


I would say that it is a bug and that indentation should be considered 
(or done) regardless of auto-filling.


Modifying the behavior in your configuration is a bit awkward, because 
(afaik) you have to copy the whole (TeX-add-style-hook "beamer" ...) 
form from /style/beamer.el, and make the 
change. If you want to go that route, adding 
(indent-according-to-mode) before the lines saying 
";; This works because \frametitle is a paragraph command." 
should work (untested).


Best wishes,

Thibaut


Thank you for figuring it out.  I am relatively new to this space and 
don't feel comfortable to change the source code.  Do you know if I 
should report it as a bug or having it in this mail list is sufficient.


Thanks,
Kourosh

Re: \frametitle macro is not automatically indented in frame environment in beamer

2021-08-25 Thread Thibaut Verron



No worries, thank you for clarification.

I ran |C-h v| with |auto-fill-function| as an argument (while in 
AUXTeX mode), and I got its value as nil.


Thanks,
Kourosh

Okay, then it looks like a new behavior indeed. It appears that the 
\frametitle command was never actually indented, but rather auto-filled, 
which had the side effect of indenting it. Now auctex checks whether the 
user actually wants to auto-fill before doing so.


I would say that it is a bug and that indentation should be considered 
(or done) regardless of auto-filling.


Modifying the behavior in your configuration is a bit awkward, because 
(afaik) you have to copy the whole (TeX-add-style-hook "beamer" ...) 
form from /style/beamer.el, and make the 
change. If you want to go that route, adding (indent-according-to-mode) 
before the lines saying ";; This works because \frametitle is a 
paragraph command." should work (untested).


Best wishes,

Thibaut



Re: \frametitle macro is not automatically indented in frame environment in beamer

2021-08-25 Thread Kourosh Kalayeh

On 25 Aug 2021, at 10:27, Thibaut Verron wrote:


On 25/08/2021 16:11, Kourosh Kalayeh wrote:


On 25 Aug 2021, at 10:06, Thibaut Verron wrote:

On 25/08/2021 16:00, Kourosh Kalayeh wrote:


Hi all,

After most recent update of AUCTeX, I have noticed something has
changed in entering “frame” environment in beamer using |C-c 
C-e|

key; it does not automatically indent |\frametitle| macro
anymore. Can anyone help me figuring out how I can achieve this.

I am running AUCTeX 13.0.13 in Emacs 27.2 on MacOS.

Thanks,
Kourosh


Hi,

Can you try to reload auctex with C-c C-n (or, after saving, M-x
revert-buffer, or close and reopen the file) to make sure that 
the

beamer style file is loaded?

Best wishes,

Thibaut


Thank you for your message. Yes, I have tried them all, no luck.

Oh I'm very sorry, I read "insert" instead of "indent". What is the 
value of the variable auto-fill-function in your buffer?


Best wishes,

Thibaut


I should have noted that when I use Tab, AUCTeX recognizes that it has 
to indent it and it indents it.

Re: \frametitle macro is not automatically indented in frame environment in beamer

2021-08-25 Thread Kourosh Kalayeh

On 25 Aug 2021, at 10:27, Thibaut Verron wrote:


On 25/08/2021 16:11, Kourosh Kalayeh wrote:


On 25 Aug 2021, at 10:06, Thibaut Verron wrote:

On 25/08/2021 16:00, Kourosh Kalayeh wrote:


Hi all,

After most recent update of AUCTeX, I have noticed something has
changed in entering “frame” environment in beamer using |C-c 
C-e|

key; it does not automatically indent |\frametitle| macro
anymore. Can anyone help me figuring out how I can achieve this.

I am running AUCTeX 13.0.13 in Emacs 27.2 on MacOS.

Thanks,
Kourosh


Hi,

Can you try to reload auctex with C-c C-n (or, after saving, M-x
revert-buffer, or close and reopen the file) to make sure that 
the

beamer style file is loaded?

Best wishes,

Thibaut


Thank you for your message. Yes, I have tried them all, no luck.

Oh I'm very sorry, I read "insert" instead of "indent". What is the 
value of the variable auto-fill-function in your buffer?


Best wishes,

Thibaut


No worries, thank you for clarification.

I ran `C-h v` with `auto-fill-function` as an argument (while in AUXTeX 
mode), and I got its value as nil.


Thanks,
Kourosh

Re: \frametitle macro is not automatically indented in frame environment in beamer

2021-08-25 Thread Thibaut Verron

On 25/08/2021 16:11, Kourosh Kalayeh wrote:


On 25 Aug 2021, at 10:06, Thibaut Verron wrote:

On 25/08/2021 16:00, Kourosh Kalayeh wrote:


Hi all,

After most recent update of AUCTeX, I have noticed something has
changed in entering “frame” environment in beamer using |C-c C-e|
key; it does not automatically indent |\frametitle| macro
anymore. Can anyone help me figuring out how I can achieve this.

I am running AUCTeX 13.0.13 in Emacs 27.2 on MacOS.

Thanks,
Kourosh


Hi,

Can you try to reload auctex with C-c C-n (or, after saving, M-x
revert-buffer, or close and reopen the file) to make sure that the
beamer style file is loaded?

Best wishes,

Thibaut


Thank you for your message. Yes, I have tried them all, no luck.

Oh I'm very sorry, I read "insert" instead of "indent". What is the 
value of the variable auto-fill-function in your buffer?


Best wishes,

Thibaut



Re: \frametitle macro is not automatically indented in frame environment in beamer

2021-08-25 Thread Kourosh Kalayeh

On 25 Aug 2021, at 10:06, Thibaut Verron wrote:


On 25/08/2021 16:00, Kourosh Kalayeh wrote:


Hi all,

After most recent update of AUCTeX, I have noticed something has 
changed in entering “frame” environment in beamer using |C-c C-e| 
key; it does not automatically indent |\frametitle| macro anymore. 
Can anyone help me figuring out how I can achieve this.


I am running AUCTeX 13.0.13 in Emacs 27.2 on MacOS.

Thanks,
Kourosh


Hi,

Can you try to reload auctex with C-c C-n (or, after saving, M-x 
revert-buffer, or close and reopen the file) to make sure that the 
beamer style file is loaded?


Best wishes,

Thibaut


Thank you for your message.  Yes, I have tried them all, no luck.


Re: \frametitle macro is not automatically indented in frame environment in beamer

2021-08-25 Thread Thibaut Verron

On 25/08/2021 16:00, Kourosh Kalayeh wrote:


Hi all,

After most recent update of AUCTeX, I have noticed something has 
changed in entering “frame” environment in beamer using |C-c C-e| key; 
it does not automatically indent |\frametitle| macro anymore. Can 
anyone help me figuring out how I can achieve this.


I am running AUCTeX 13.0.13 in Emacs 27.2 on MacOS.

Thanks,
Kourosh


Hi,

Can you try to reload auctex with C-c C-n (or, after saving, M-x 
revert-buffer, or close and reopen the file) to make sure that the 
beamer style file is loaded?


Best wishes,

Thibaut



\frametitle macro is not automatically indented in frame environment in beamer

2021-08-25 Thread Kourosh Kalayeh

Hi all,

After most recent update of AUCTeX, I have noticed something has changed 
in entering “frame” environment in beamer using `C-c C-e` key; it 
does not automatically indent `\frametitle` macro anymore.  Can anyone 
help me figuring out how I can achieve this.


I am running AUCTeX 13.0.13 in Emacs 27.2 on MacOS.

Thanks,
Kourosh