Malabarba / latex-extra

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

Error when calling latex/next-section #13

Closed gdv closed 8 years ago

gdv commented 8 years ago

When inkoving latex/next-section I get the following backtrace:

Debugger entered--Lisp error: (wrong-number-of-arguments #[(_) "\300\207" [t] 1] 2)
  #[(_) "\300\207" [t] 1]("\\section" "\\section")
  eval((#[(_) "\300\207" [t] 1] "\\section" "\\section"))
  latex//find-nth-section-with-predicate(1 #[(_) "\300\207" [t] 1] 57)
  latex/next-section(1 57)
  call-interactively(latex/next-section record nil)
  command-execute(latex/next-section record)
  execute-extended-command(nil "latex/next-section")
  smex-read-and-run(("latex/next-section-same-level" "latex/next-section" "customize-variable" "flycheck-list-errors" "markdown-insert-code" "markdown-code-at-point-p" "pdf-tools-enable-minor-modes" "package-list-packages-no-fetch" "R" "S" "S+" "cd" "w3" "5x5" "S+3" "S+6" "SAS" "arp" "dbx" "dig" "erc" "ert" ...))
  smex()
  call-interactively(smex nil nil)
  command-execute(smex)

This gist provides a minimal tex file on which I get the error.

To reproduce the problem (in my case), you have to go at the line with the first \section and execute latex/next-section. Notice that latex/previous-section works as expected, and that latex/next-section works when the cursor is before the first section.

The relevant portion of my init.el is

(add-hook 'LaTeX-mode-hook #'latex-extra-mode)
(setq latex/override-preview-map nil
      latex/override-font-map nil
      )
  (define-key LaTeX-mode-map [(control prior)] 'latex/previous-section)
  (define-key LaTeX-mode-map [(control next)] 'latex/next-section)

I am running Emacs 24.5.1, using the packages from Ubuntu 15.10.

Thank you very much for your great work.

Malabarba commented 8 years ago

Sorry for the delay. Just pushed a fix.

gdv commented 8 years ago

Wonderful. I confirm that the bug has been fixed.

Thanks