jeeger / twauctex

Tweaks for AUCtex
GNU General Public License v3.0
21 stars 4 forks source link

space is breaking lines in emacs 26.3 #5

Closed jsoishi closed 3 years ago

jsoishi commented 4 years ago

Using emacs 26.3 and the current head of twauctex, when I type a space, it breaks a line:

This
is
a
sentence.

I'm not sure if upgrading twauctex or emacs caused this; I only noticed it on a new machine.

jeeger commented 4 years ago

Ah, that's annoying. I'll install Emacs 26 and try to reproduce. In the meantime, you can try debugging twauctex-electric-sentence-end-space and see why it decides to break the line.

jeeger commented 4 years ago

Could you provide the value of AUCTeX-version and your configuration for twauctex? I can't immediately reproduce with Emacs 26.

jsoishi commented 4 years ago

Here's the output of C-h v AUCTeX-version

AUCTeX-version is a variable defined in ‘tex-site.el’.
Its value is "12.2.4"

I have no twauctex configuration specified. In my .emacs I simply have

(require 'twauctex)
(twauctex-global-mode)

Thanks, I really like twauctex!

jeeger commented 4 years ago

Hello!

I couldn't reproduce here. Can you try with the below elisp (adjust your load-path as needed)? Start emacs with -Q, run the code, and edit a TeX file.

(package-initialize)
(add-to-list 'load-path "~/projects/elisp/twauctex")
(require 'twauctex)
(twauctex-global-mode)
jsoishi commented 4 years ago

Following these instructions, I still have the exact same behavior. I tried two different tex files, including one that consisted solely of 

\documentclass[12pt]{paper}
\title{test}
\begin{document}
\maketitle

This
is
a
test.
\end{document}

Edited to add: it's also interesting that twauctex doesn't break the space after a period!

jeeger commented 4 years ago

Do you have the latest version of twauctex installed?

jsoishi commented 4 years ago

Yes, I just pulled down the current version to test. Perhaps this is a clue, or a separate issue, but C-c =, which in auctex brings up a table of contents, also no longer works with twauctex for me.

jeeger commented 4 years ago

Try whether loading auctex without twauctex in emacs -Q has the same problem. This sounds like a problem with your auctex installation.

jeeger commented 4 years ago

I've fixed a bug in the abbreviation detection logic, you could try and test this with the current version.

jsoishi commented 3 years ago

Hi, sorry to have dropped this for so long. The most current version of twauctex fixes this problem for me. I'm really not sure what it was, but it seems fixed. Thanks so much!