emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#20685: closed (2015-04-19; args-out-of-range error


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#20685: closed (2015-04-19; args-out-of-range error when no newline at eob.)
Date: Fri, 29 May 2015 06:03:02 +0000

Your message dated Fri, 29 May 2015 08:02:41 +0200
with message-id <address@hidden>
and subject line Re: bug#20685: 2015-04-19; args-out-of-range error when no 
newline at eob.
has caused the debbugs.gnu.org bug report #20685,
regarding 2015-04-19; args-out-of-range error when no newline at eob.
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
20685: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20685
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 2015-04-19; args-out-of-range error when no newline at eob. Date: Thu, 28 May 2015 20:42:33 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)
Hi,

This one often bites me when I'm in a narrowed buffer.

Here's a backtrace from a minimal recipe (which is in the backtrace).

Debugger entered--Lisp error: (args-out-of-range #<buffer temp> 57 58)
  buffer-substring-no-properties(57 58)
  LaTeX-backward-paragraph()
  LaTeX-fill-region(41 57 nil " environment document")
  LaTeX-fill-environment(nil)
  call-interactively(LaTeX-fill-environment)
  (let ((data 
"\\documentclass{minimal}\n\\begin{document}\n\n\\end{document}")) 
(switch-to-buffer (get-buffer-create "temp")) (TeX-latex-mode) (insert data) 
(search-backward "\n\n") (call-interactively (quote LaTeX-fill-environment)))
  eval-buffer(#<buffer  *load*> nil 
"/home/youngfrog/tmp-test-auctex-filling.el" nil t)  ; Reading at buffer 
position 319
  load-with-code-conversion("/home/youngfrog/tmp-test-auctex-filling.el" 
"/home/youngfrog/tmp-test-auctex-filling.el" nil t)
  load("/home/youngfrog/tmp-test-auctex-filling.el" nil t)
  command-line-1(("-l" "/home/youngfrog/tmp-test-auctex-filling.el"))
  command-line()
  normal-top-level()

I suggest the following change:

--8<---------------cut here---------------start------------->8---
modified   latex.el
@@ -4475,10 +4475,7 @@ If COUNT is non-nil, do it COUNT times."
                                                "address@hidden|[ \t]*\\($\\|"
                                                TeX-comment-start-regexp "\\)"))
                            (progn
-                             (when (string= (buffer-substring-no-properties
-                                             (point) (+ (point)
-                                                        (length TeX-esc)))
-                                            TeX-esc)
+                             (when (looking-at (regexp-quote TeX-esc))
                                (goto-char (TeX-find-macro-end)))
                              (forward-line 1)
                              (when (< (point) start)
--8<---------------cut here---------------end--------------->8---



--- End Message ---
--- Begin Message --- Subject: Re: bug#20685: 2015-04-19; args-out-of-range error when no newline at eob. Date: Fri, 29 May 2015 08:02:41 +0200 User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux)
Nicolas Richard <address@hidden> writes:

Hi Nicolas,

> I suggest the following change:
>
> modified   latex.el
> @@ -4475,10 +4475,7 @@ If COUNT is non-nil, do it COUNT times."
>                                               "address@hidden|[ \t]*\\($\\|"
>                                               TeX-comment-start-regexp "\\)"))
>                           (progn
> -                           (when (string= (buffer-substring-no-properties
> -                                           (point) (+ (point)
> -                                                      (length TeX-esc)))
> -                                          TeX-esc)
> +                           (when (looking-at (regexp-quote TeX-esc))
>                               (goto-char (TeX-find-macro-end)))
>                             (forward-line 1)
>                             (when (< (point) start)

-4 lines +1 line.  Sounds very good.  Applied. ;-)

Oh, I made that commit and ChangeLog entry with your email address you
are using right now, not the evil look thingy.  Could you please
register your FSF member address with address@hidden so that they add it
to your CA record and nobody gets confused?

Bye,
Tassilo


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]