bug#61400: Different filling for verbatim macros

2023-02-16 Thread Arash Esbati
Hi Keita, Ikumi Keita writes: > Done. I also changed > (skip-chars-forward (concat "^" delimiter))) > to > (skip-chars-forward (concat "^" delimiter) (line-end-position))) many thanks for fixing this issue. I'm therefore closing this report. Best, Arash

bug#61400: Different filling for verbatim macros

2023-02-16 Thread Ikumi Keita
Hi Arash, > Arash Esbati writes: > LGTM. Please go ahead and install so we can close this report. Please > just adjust the comment below before pushing: >> ;; Heuristic: If an opening brace is encountered, search for >> ;; both the opening and the closing brace as an end marker. > I

bug#61400: Different filling for verbatim macros

2023-02-16 Thread Arash Esbati
Hi Keita, Ikumi Keita writes: > Thanks, I included your suggestion. See the attachment. LGTM. Please go ahead and install so we can close this report. Please just adjust the comment below before pushing: >;; Heuristic: If an opening brace is encountered, search for >

bug#61400: Different filling for verbatim macros

2023-02-16 Thread Ikumi Keita
Hi Arash, > Arash Esbati writes: > What I don't understand it why the code does: > (when (string= delimiter TeX-grop) > (setq delimiter (concat delimiter TeX-grcl))) > which is "^{}"; I would have expected "^}" only because using \verb{foo{ > is just asking for trouble and not

bug#61400: Different filling for verbatim macros

2023-02-15 Thread Arash Esbati
Hi Keita, Ikumi Keita writes: > Thanks, now I'd like to push the attached commit. Any comments welcome. Thanks, I think I have one minor comment. Take this example: --8<---cut here---start->8--- \documentclass{article} \usepackage{fvextra}

bug#61400: Different filling for verbatim macros

2023-02-15 Thread Ikumi Keita
Hi Arash, > Arash Esbati writes: > Sorry for the confusion. I wanted to say that I like your suggestion > above, let's take this route :-) Thanks, now I'd like to push the attached commit. Any comments welcome. Regards, Ikumi Keita #StandWithUkraine #StopWarInUkraine >From

bug#61400: Different filling for verbatim macros

2023-02-15 Thread Arash Esbati
Hi Keita, Ikumi Keita writes: > 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}". Sorry for the confusion. I wanted to say that I

bug#61400: Different filling for verbatim macros

2023-02-14 Thread Ikumi Keita
Hi Arash, > Arash Esbati 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...".

bug#61400: Different filling for verbatim macros

2023-02-14 Thread Arash Esbati
Hi Keita, Ikumi Keita writes: > OK, then another candidate is the attached patch. Thanks. > This keeps the current behavior of `LaTeX-verbatim-p' and introduces a > new function `LaTeX-verbatim-nobreak-p' as you suggested in your > previous message. > > However, I'm a bit reluctant. > 1. If

bug#61400: Different filling for verbatim macros

2023-02-14 Thread Ikumi Keita
Hi Arash, > Arash Esbati writes: > Do we really want this? My gut feeling is to have `LaTeX-verbatim-p' > returns t just before the "\verb|...|" etc., i.e., when cursor is over > the backslash. OK, then another candidate is the attached patch. This keeps the current behavior of

bug#61400: Different filling for verbatim macros

2023-02-13 Thread Arash Esbati
Ikumi Keita writes: > Looking at the current code closely, I think we can take a more drastic > route. :-) That's always highly welcome :-) > Thus it's safe to modify `LaTeX-verbatim-p' to return nil at just before > "\verb|...|" etc. by the following reasons: > o In

bug#61400: Different filling for verbatim macros

2023-02-12 Thread Ikumi Keita
Following up myself. > Ikumi Keita writes: > (2) `LaTeX-verbatim-p' is currently used only in > `fill-nobreak-predicate', `LaTeX-search-forward-comment-start' and > `TeX-in-comment' (through `TeX-verbatim-p-function'): Sorry, there is another instance of usage in `TeX-insert-dollar'. That

bug#61400: Different filling for verbatim macros

2023-02-12 Thread Ikumi Keita
Hi Arash and all, > Arash Esbati writes: > I think this should be our course of action: Make > `LaTeX-current-verbatim-macro' and `TeX-current-macro' work identical. I'm now thinking a different approach. Please see below. > Here is another idea: We don't use `LaTeX-verbatim-p' in >

bug#61400: Different filling for verbatim macros

2023-02-12 Thread Arash Esbati
Hi Keita, Ikumi Keita writes: > I realized that multiple players are involved in this issue. First of all, many thanks for your (as always) precise analysis  > We can fix this inconsistency by the following code: > -- >

bug#61400: Different filling for verbatim macros

2023-02-11 Thread Ikumi Keita
Hi all, > Arash Esbati writes: > Tassilo Horn writes: >> Hm, (fill-nobreak-p) returns nil only on the \ of the \verb|bar| but >> returns non-nil on each \ of the other verbatim macros. (I can't look >> any further now so it's your turn again. ;-)) > I think I've got it: `LaTeX-verbatim-p'

bug#61400: Different filling for verbatim macros

2023-02-10 Thread Arash Esbati
Tassilo Horn writes: > Yes, I can. BTW, only the last sentence is broken correctly, all others > are wrapped around at a too early position. Thanks for checking. > Hm, (fill-nobreak-p) returns nil only on the \ of the \verb|bar| but > returns non-nil on each \ of the other verbatim macros.

bug#61400: Different filling for verbatim macros

2023-02-10 Thread Ikumi Keita
> Tassilo Horn writes: >> It moves the point to different positions. In the example above, put >> point after \path{bar} and do: >> >> M-: (fill-move-to-break-point (line-beginning-position)) RET >> >> and the point before and. Now go after \verb|bar| and do the same, no >> is point after

bug#61400: Different filling for verbatim macros

2023-02-10 Thread Tassilo Horn
Arash Esbati writes: > thanks for pushing me into that again. I did already but I missed > what's happening in that function directly in the first form: > > (fill-move-to-break-point linebeg) > > It moves the point to different positions. In the example above, put > point after \path{bar}

bug#61400: Different filling for verbatim macros

2023-02-10 Thread Arash Esbati
Tassilo Horn writes: > Arash Esbati writes: > >> \begin{document} >> >> Now we can write some text foo and \path{bar} >> >> Now we can write some text foo and \path|bar| >> >> Now we can write some text foo and \Verb|bar| >> >> Now we can write some text foo and \Verb{bar} >> >> Now we can

bug#61400: Different filling for verbatim macros

2023-02-10 Thread Tassilo Horn
Arash Esbati writes: Hi Arash, > \begin{document} > > Now we can write some text foo and \path{bar} > > Now we can write some text foo and \path|bar| > > Now we can write some text foo and \Verb|bar| > > Now we can write some text foo and \Verb{bar} > > Now we can write some text foo and

bug#61400: Different filling for verbatim macros

2023-02-10 Thread Arash Esbati
Hi all, please set `TeX-parse-self' to t and load this small file: --8<---cut here---start->8--- \documentclass{article} \usepackage{url} \usepackage{fvextra} \begin{document} Now we can write some text foo and \path{bar} Now we can write some text foo and