unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Elusive indentation problem in CC Mode
@ 2012-03-16  9:43 Eli Zaretskii
  2012-03-16 14:32 ` Alan Mackenzie
  0 siblings, 1 reply; 2+ messages in thread
From: Eli Zaretskii @ 2012-03-16  9:43 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: emacs-devel

From time to time, I have a strange Heisenbug when editing C source
files: CC Mode computes the indentation level incorrectly.  The
problem usually manifests itself by pressing TAB and having the
current line be flushed all the way to the left, as if point is at
toplevel (which it isn't).  I know it thinks point is at toplevel
because that's what "C-c C-s" tells me.

The "Heisenbug" part comes into play when I try to figure out which
part of the buffer causes the problem, by selectively deleting some of
the parts around point: after a few deletions, restoring the deleted
parts exactly as they were makes the problem go away.

This is in Emacs 24.0.94.  Is this a known problem, and if so, was it
already fixed since 24.0.94 was released?  (Since I don't have a way
of reproducing the problem, I cannot test this in the current trunk.)
If not, I will file a bug report, and please give me instructions for
digging into the problem next time it happens, preferably without
modifying the buffer (which seems to make the problem hide).

TIA



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Elusive indentation problem in CC Mode
  2012-03-16  9:43 Elusive indentation problem in CC Mode Eli Zaretskii
@ 2012-03-16 14:32 ` Alan Mackenzie
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Mackenzie @ 2012-03-16 14:32 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Hello, Eli.

On Fri, Mar 16, 2012 at 11:43:40AM +0200, Eli Zaretskii wrote:
> >>From time to time, I have a strange Heisenbug when editing C source
> files: CC Mode computes the indentation level incorrectly.  The
> problem usually manifests itself by pressing TAB and having the
> current line be flushed all the way to the left, as if point is at
> toplevel (which it isn't).  I know it thinks point is at toplevel
> because that's what "C-c C-s" tells me.

> The "Heisenbug" part comes into play when I try to figure out which
> part of the buffer causes the problem, by selectively deleting some of
> the parts around point: after a few deletions, restoring the deleted
> parts exactly as they were makes the problem go away.

Hopefully the problem is repeatble by reloading the buffer.

> This is in Emacs 24.0.94.  Is this a known problem, and if so, was it
> already fixed since 24.0.94 was released?  (Since I don't have a way
> of reproducing the problem, I cannot test this in the current trunk.)
> If not, I will file a bug report, and please give me instructions for
> digging into the problem next time it happens, preferably without
> modifying the buffer (which seems to make the problem hide).

I think I saw something like this some while ago.  The best way of
approaching this is edebugging through c-guess-basic-syntax, which is
something best done by me.  (It's 1466 lines long.)

I think it would be best to file a bug report for this.

Thanks!

> TIA

-- 
Alan Mackenzie (Nuremberg, Germany).



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-16 14:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-16  9:43 Elusive indentation problem in CC Mode Eli Zaretskii
2012-03-16 14:32 ` Alan Mackenzie

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).