Malabarba / latex-extra

A series of usability improvements for Emacs latex-mode.
GNU General Public License v3.0
69 stars 14 forks source link

latex/next-section #4

Closed higham closed 10 years ago

higham commented 10 years ago

Very nice package.

latex/next-section does not move the point when point is on a section command. So issuing the command a second time does not move point. On the other hand latex/previous-section keeps moving back a section each time it is issued. Thus latex/next-section and latex/previous-section are not inverses of each other.

Can next-section be modified to move repeatedly to the next section with each successive invocation?

Malabarba commented 10 years ago

latex/next-section should indeed move point when point is on a section command. If that's not happening for you then it seems we've got a bug.

Unfortunately, I can't reproduce that here. If I have the following buffer:

\subsection{Bar}
Some text
\subsubsection{Foo}

I place point right on top of the first \, and I invoke latex/next-section, then the point moves right to the second \.

Is that not heppening for you?
If so, could you let me know which version you're running?

higham commented 10 years ago

When I try your example the cursor doesn't move, but I see "Mark set" in the minibuffer.

I'm running

GNU Emacs 24.3.1 (i386-mingw-nt6.1.7601) of 2013-03-16 on USER-PC

Precompiled AUCTeX for Emacs auctex-11.87-e24.2-msw.zip (signature) from http://www.gnu.org/software/auctex/download-for-windows.html

and am using reftex as well.

I do have a heavily customized .emacs and I haven't yet tried a stripped down version.

BTW, C-c C-q is predefined as a prefix in Auctex:

C-c C-q C-e LaTeX-fill-environment C-c C-q C-p LaTeX-fill-paragraph C-c C-q C-r LaTeX-fill-region C-c C-q C-s LaTeX-fill-section

so I've switched to (define-key LaTeX-mode-map (kbd "C-c C-q C-q") 'latex/clean-fill-indent-environment)

Malabarba commented 10 years ago

Ok, I've spotted the bug. And it was really stupid of me for not noticing this earlier.

Thanks for reporting this.

Malabarba commented 10 years ago

Ok, I think I fixed it now. It's not on the master branch yet because I want to test it for a day before releasing. If you'd like to download it, it's on the dev branch.

higham commented 10 years ago

A quick test indicates the problem is fixed. Thanks for the quick response.

Malabarba commented 10 years ago

By the way, I implemented a variable to disable the C-c C-q mapping, so you don't have to manually edit the file. The variable is called latex/override-fill-map.

You can check out it's documentation for some comments on why it's enabled by default.