Hi Werner,
Werner LEMBERG <[email protected]> writes:
> and thus makes the two spaces disappear. This behaviour doesn't
> happen if there is only a single space after the closing brace (before
> pressing M-q).
AUCTeX relies for filling on the function `fill-delete-newlines' (see
`LaTeX-fill-region-as-para-do'). So this is what we get from Emacs.
Try this snippet in a .tex file:
--8<---------------cut here---------------start------------->8---
% - Start
} Test
% - Start
} Test
% - Start
} Test
--8<---------------cut here---------------end--------------->8---
Now eval this function and run it in your .tex file:
--8<---------------cut here---------------start------------->8---
(defun fill-delete-newlines-test ()
(let (s e)
(save-excursion
(goto-char (point-min))
(while (search-forward "% - Start" nil t)
(forward-line)
(setq s (point))
(setq e (line-end-position))
(fill-delete-newlines s e nil nil nil)))))
--8<---------------cut here---------------end--------------->8---
I see:
--8<---------------cut here---------------start------------->8---
% - Start
}Test
% - Start
} Test
% - Start
}Test
--8<---------------cut here---------------end--------------->8---
> AFAICS, this is a serious bug, since it makes a space disappear in the
> output.
I tend to agree, but I'm not sure how to cure this. Adding Keita, maybe
he has an idea.
Best, Arash
_______________________________________________
bug-auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-auctex