GNU bug report logs - #28598
25.3; Errors in narrowed buffers in CC-mode

Previous Next

Packages: cc-mode, emacs;

Reported by: George Plymale II <georgie <at> southernohio.net>

Date: Mon, 25 Sep 2017 15:30:03 UTC

Severity: normal

Found in version 25.3

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Alan Mackenzie <acm <at> muc.de>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#28598: closed (25.3; Errors in narrowed buffers in CC-mode)
Date: Mon, 30 Oct 2017 17:45:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Mon, 30 Oct 2017 17:37:55 +0000
with message-id <20171030173755.GA5659 <at> ACM>
and subject line Re: bug#28598: 25.3; Errors in narrowed buffers in CC-mode
has caused the debbugs.gnu.org bug report #28598,
regarding 25.3; Errors in narrowed buffers in CC-mode
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
28598: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=28598
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: George Plymale II <georgie <at> southernohio.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.3; Errors in narrowed buffers in CC-mode
Date: Mon, 25 Sep 2017 02:21:25 -0400
The inception of this bug report can be found at:
https://github.com/josteink/csharp-mode/issues/119

For those too lazy to follow the link, here's the gist: When I press
`RET' at the beginning or end of a narrowed buffer in CC-mode, I see
errors like this:

c-determine-limit: Args out of range: #<buffer dired.c>, 1, 1564

A full backtrace yields something like this:

Debugger entered--Lisp error: (args-out-of-range #<buffer dired.c> 1 1564)
  parse-partial-sexp(1 1564)
  c-determine-limit(500)
  c-guess-basic-syntax()
  c-indent-line()
  indent-according-to-mode()
  electric-indent-post-self-insert-function()
  self-insert-command(1)
  newline(nil 1)
  funcall-interactively(newline nil 1)
  call-interactively(newline nil nil)
  command-execute(newline)
  
As you can see from the filename there, the file I was testing this with
was dired.c from the very Emacs source tree (although I have now tested
with various header files, other C files, and of course, C# files).

I initially tested this on a macOS system, but now I have also tested
this on Ubuntu and I see the same issue occurring on both systems (which
are both using Emacs 25.3).

I also noticed that this issue does not occur in Emacs 24.


[Message part 3 (message/rfc822, inline)]
From: Alan Mackenzie <acm <at> muc.de>
To: George Plymale II <georgie <at> southernohio.net>
Cc: jwiegley <at> gmail.com, 28598-done <at> debbugs.gnu.org
Subject: Re: bug#28598: 25.3; Errors in narrowed buffers in CC-mode
Date: Mon, 30 Oct 2017 17:37:55 +0000
Hello, George.

On Mon, Oct 02, 2017 at 15:02:36 -0400, George Plymale II wrote:
> Hi, Alan.

> Thanks for making this patch. After applying it to my Emacs source tree
> and recompiling Emacs, the issue seems to be gone as far as I can
> tell. I have also tested the patched version with C# files (as well as C
> files, obviously) and everything seems okay.

> Hopefully Emacs 26 will come out soon and fix this issue, among many
> others that I'm excited to see fixed.

I've committed the fix to Emacs's emacs-26 branch, and I'm closing the
bug.

> Thanks.

Thank you, too!

-- 
Alan Mackenzie (Nuremberg, Germany).


This bug report was last modified 7 years and 208 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.