all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Alan Mackenzie <acm@muc.de>
Cc: "Óscar Fuentes" <ofv@wanadoo.es>,
	7181@debbugs.gnu.org, emacs-devel@gnu.org
Subject: Re: bug#7181: 24.0.50; args-out-of-range while reverting C++ header file
Date: Sun, 10 Oct 2010 01:33:19 +0200	[thread overview]
Message-ID: <jwvpqvjrljn.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20101009211332.GA5486@muc.de> (Alan Mackenzie's message of "Sat,  9 Oct 2010 21:13:32 +0000")

>> With the attached files the problem can be reproduced predictability:
>> 
>> Save the attached files b.h.master and b.h.next to a directory and cd to
>> it.
>> 
>> $ emacs -Q &
>> $ cp b.h.master b.h
>> C-x C-f b.h
>> $ cp b.h.next b.h
>> M-x revert-buffer
>> 
>> and the args-out-of-range error pops:
>> 
>> c-clear-char-property-with-value-function: Args out of range: 166, 453
>> 
>> I was unable to try with the latest Emacs sources because the build is
>> broken. My Emacs is from the 16 September.
>> 

> Thanks for the recipe.  I turned on debug-on-error and got this
> traceback:

> Debugger entered--Lisp error: (args-out-of-range 166 453)
>   remove-text-properties(166 453 (category))
>   c-clear-char-property-with-value-function(1 453 category c-cpp-delimiter)
>   c-neutralize-syntax-in-and-mark-CPP(94 94 286)
>   c-after-change(94 94 286) <<======================================
>   insert-file-contents("/home/acm/b.h" t nil nil t)
>   revert-buffer(t)
>   call-interactively(revert-buffer nil nil)

> c-after-change is on the after-change-functions hook.  The values of BEG
> END OLD-LEN it is being passed look utterly wrong.  BEG and END should
> delimit the entire buffer and OLD-LEN should be the length of the
> previous buffer.  Surely?

No, here the after-change is called right after removing the chars that
are different, and just before inserting the new (different) chars.
You can reproduce the same error without reverting:

emacs -Q b.h.master
M-x c-mode
C-u 93 C-f
C-SPC
C-u 286 C-f
C-w


        Stefan



  parent reply	other threads:[~2010-10-09 23:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-09  4:30 bug#7181: 24.0.50; args-out-of-range while reverting C++ header file Oscar Fuentes
2010-10-09  8:57 ` Eli Zaretskii
2010-10-09 13:39   ` Óscar Fuentes
2010-10-09 13:56     ` Óscar Fuentes
2010-10-09 21:13       ` Alan Mackenzie
2010-10-09 22:08         ` after-change-functions hook arguments (was: bug#7181: 24.0.50; args-out-of-range while reverting C++ header file) Óscar Fuentes
2010-10-09 22:08         ` bug#7181: " Óscar Fuentes
2010-10-09 23:33         ` bug#7181: 24.0.50; args-out-of-range while reverting C++ header file Stefan Monnier
2010-10-09 23:33         ` Stefan Monnier [this message]
2010-10-09 21:13       ` Alan Mackenzie
2010-10-10 14:09       ` bug#7181: 24.0.50; args-out-of-range while reverting C++ header file. PATCH Alan Mackenzie
     [not found]       ` <20101010140958.GA5249@muc.de>
2010-10-10 18:40         ` Óscar Fuentes
2010-10-09 13:46 ` 24.0.50; args-out-of-range while reverting C++ header file Alan Mackenzie
2010-10-09 14:05   ` Miles Bader
2010-10-09 14:14     ` Oscar Fuentes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvpqvjrljn.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=7181@debbugs.gnu.org \
    --cc=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    --cc=ofv@wanadoo.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.