GNU bug report logs - #61400
Different filling for verbatim macros

Previous Next

Package: auctex;

Reported by: Arash Esbati <arash <at> gnu.org>

Date: Fri, 10 Feb 2023 08:53:01 UTC

Severity: normal

Done: Arash Esbati <arash <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ikumi Keita <ikumi <at> ikumi.que.jp>
To: Arash Esbati <arash <at> gnu.org>
Cc: 61400 <at> debbugs.gnu.org, Tassilo Horn <tsdh <at> gnu.org>
Subject: bug#61400: Different filling for verbatim macros
Date: Wed, 15 Feb 2023 15:30:52 +0900
Hi Arash,

>>>>> Arash Esbati <arash <at> gnu.org> writes:
>> However, I'm a bit reluctant.
>> 1. If `LaTeX-verbatim-p' should return non-nil at just before
>> "\verb", then it should also do so just before "\begin{verbatim}" for
>> consistency, shouldn't it?
>> 2. Suppose that you type "$" just before "\verb...". Then
>> `TeX-insert-dollar' inserts only one "$" instead of "$$" under the
>> current behavior of `LaTeX-verbatim-p', because `TeX-insert-dollar'
>> uses `TeX-verbatim-p'. I think it's unexpected. 
>
> I think we have everything we need now so we can change the behavior of
> `LaTeX-verbatim-p' acc. to what you describe above because:

Sorry, I'm unsure what you mean by "to what you describe above".
1. To change `LaTeX-verbatim-p' to return non-nil just before
   "\begin{verbatim}", keeping the current behavior at just before
   "\verb..."?
2. To change `LaTeX-verbatim-p' to return nil just before "\verb..."?

Reading again my paragraphs, my opinion wasn't clear enough probably. I
feel that it isn't natural that `LaTeX-verbatim-p' returns non-nil just
before "\begin{verbatim}". Taking into account `TeX-insert-dollar'
behavior as well, I'm still in favor of changing it to return nil just
before "\verb..." as my first patch, keeping the current behavior just
before "\begin{verbatim}". That's the reason why I feel reluctant.

> Note that I had to apply the patch attached on top of yours in order
> to get it working (some trouble with parens). I've also adjusted the
> comment (the optional arg of \lstinline was already there).

Oops, sorry for those! 😵

>> (By the way, I noticed that `LaTeX-verbatim-p' raises error when "\verb"
>> is at the end of the buffer without delimiters and its contents "|...|".
>> In fact `LaTeX-verbatim-macro-boundaries' and
>> `LaTeX-current-verbatim-macro' raise the same error. The reason is that
>> `LaTeX-verbatim-macro-boundaries' presumes there is nonempty string
>> after the macro body. Should we cater for such corner case?)

> I'd say let's fix the issue at hand and then see if others complain and
> there is a real use for this corner case, and then we can touch that.
> Does it make sense?

I see, let's do so.

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine




This bug report was last modified 2 years and 156 days ago.

Previous Next


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