GNU bug report logs - #70811
ConTeXt-mode-cleanup clobbers my paragraph-start

Previous Next

Package: auctex;

Reported by: Jim <zlists+auctex <at> jdvb.ca>

Date: Tue, 7 May 2024 04:13:01 UTC

Severity: normal

Done: Ikumi Keita <ikumi <at> ikumi.que.jp>

Bug is archived. No further changes may be made.

Full log


Message #23 received at 70811 <at> debbugs.gnu.org (full text, mbox):

From: Jim <zlists+auctex <at> jdvb.ca>
To: Ikumi Keita <ikumi <at> ikumi.que.jp>
Cc: 70811 <at> debbugs.gnu.org
Subject: Re: bug#70811: ConTeXt-mode-cleanup clobbers my paragraph-start
Date: Mon, 13 May 2024 13:57:56 -0300
Hi Ikumi,

On Tue, May 14, 2024 at 00:34 (+0900), Ikumi Keita wrote:

>>>>>> Jim <zlists+auctex <at> jdvb.ca> writes:
>> Thank you very much for spending some time on this.  I tried it on this
>> section of code

>> \startitemize[yadda]
>> \item sslkdslkd lskdlskdls slkd slkdslk
>> sldk sldkl
>> lkslks d sldsldk s sldksldk slkdsldksd sldsldk s sldksldk slkdsldksd
>> sldsldk s sldksldk slkdsldksd
>> \item sldsldk s sldksldk slkdsldksd
>> \item fill this paragraph right here
>> fill this paragraph right here fill this paragraph right here
>> fill this paragraph right here
>> \stopitemize

>> and if I run fill-paragraph on the last item, I get

>> ...
>> \item fill this paragraph right here fill this paragraph right here fill
>> this paragraph right here fill this paragraph right here \stopitemize

>> (i.e., the \stopitemize has become "part of" the "\item" paragraph).  I
>> won't try to imagine what other ConTeXt users want, but I don't like this.

> Thanks for your report. I 'm sorry, I was wrong at altering regexp
> generation code.  Can you try the attached patch?  (Undo the last patch
> and apply the attached patch to the fresh source, please.)

In the interest of getting you an answer quickly, I only tested it for
about 5 minutes, but in all of those tests, I can happily say that it did
what I wanted it to do.

>> I wonder if the default definition should (could?) somehow capture all
>> of them.

> I expect the revised patch fills that bill.

It certainly did in my brief tests.

>> Given that the (interactive) customization doesn't want the leading
>> '\',

> Do you mean that `ConTeXt-paragraph-commands' doesn't include the leading
> backslash?  Then it isn't specific to interactive customization.  It is
> designed after LaTeX counterpart, which also doesn't include the leading
> backslash.

Indeed, I assumed that restriction was not from the interactive
customization, but instead from the auctex code.

>> is there any way to add that to paragraph-start with the code you
>> recently added?

> You can use
> (add-hook 'LaTeX-mode-hook
>   (lambda ()
>      (add-hook 'find-file-hook
>         (lambda ()
>            (setq paragraph-start "abc")) <-- Set whatever you like
> nil t)))
> in your init file if you really need, but I'd like you to try the patch
> below first.

Thanks for that emacs-fu.  (Although I wonder if I want 'ConTeXt-mode-hook'
intead of 'LaTeX-mode-hook'.)

Regardless of what hook I should use, this version of your patch seems to
work very nicely.  Thank you for all the time you have put into this.

                                      Jim




This bug report was last modified 1 year and 65 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.