GNU bug report logs - #5490
23.1.91; CC Mode, after a while, everything is topmost-intro.

Previous Next

Packages: emacs, cc-mode;

Reported by: jan.h.d <at> swipnet.se (Jan Djärv)

Date: Fri, 29 Jan 2010 09:03:02 UTC

Severity: normal

Tags: unreproducible

Done: Andrew Hyatt <ahyatt <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 5490 in the body.
You can then email your comments to 5490 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5490; Package emacs. (Fri, 29 Jan 2010 09:03:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to jan.h.d <at> swipnet.se (Jan Djärv):
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 29 Jan 2010 09:03:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: jan.h.d <at> swipnet.se (Jan Djärv)
To: bug-gnu-emacs <at> gnu.org
Subject: 23.1.91; CC Mode, after a while, everything is topmost-intro.
Date: Fri, 29 Jan 2010 10:02:17 +0100
Hello.

This is one of those vague bug reports that aren't easy to reproduce.
After using Emacs for some time (several hours, more than 4) and editing
many C++ and C files, indentating breaks down.  This manifests itself
that most lines get indetated at column 0.  Doing C-c c-s on those lines
shows topmost-intro.  even if they should be inclass or statement.

Restarting Emacs fixes everything.

           Jan D.



In GNU Emacs 23.1.91.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.18.3)
 of 2010-01-25 on gaffa
Windowing system distributor `The X.Org Foundation', version 11.0.10604000
configured using `configure  '--prefix=/opt/emacs-cvs' '--verbose' '--enable-asserts' 'CFLAGS=-g''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: C
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: sv_SE.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  delete-selection-mode: t
  icomplete-mode: t
  display-time-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<help-echo> M-x r e p o r t - e m <tab> <return>

Recent messages:
Loading /home/jhd/lib/elisp/BAK-file.el (source)...done
Loading /home/jhd/lib/elisp/ccsetup.el (source)...done
Loading icomplete...done
Loading /home/jhd/lib/elisp/saveframe.el (source)...done
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
None found.

Features:
(shadow sort mail-extr message sendmail ecomplete rfc822 mml mml-sec
password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231
rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc
time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock sha1
hex-util hashcash mail-utils emacsbug desktop msb delsel icomplete
cc-mode cc-fonts easymenu cc-menus cc-cmds cc-styles cc-align cc-engine
cc-vars cc-defs regexp-opt time tooltip ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd font-setting tool-bar dnd fontset
image fringe lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
simple abbrev loaddefs button minibuffer faces cus-face files
text-properties overlay md5 base64 format env code-pages mule custom
widget hashtable-print-readable backquote make-network-process dbusbind
system-font-setting font-render-setting gtk x-toolkit x multi-tty emacs)





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5490; Package emacs. (Fri, 29 Jan 2010 11:12:01 GMT) Full text and rfc822 format available.

Message #8 received at 5490 <at> debbugs.gnu.org (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: Jan =?UTF-8?Q?Dj=C3=A4rv <jan.h.d <at> swipnet.se?=>
Cc: 5490 <at> debbugs.gnu.org
Subject: Re: bug#5490: 23.1.91;
	CC Mode, after a while, everything is topmost-intro.
Date: Fri, 29 Jan 2010 11:18:23 +0000
Hello, Jan,

On Fri, Jan 29, 2010 at 10:02:17AM +0100, Jan =?UTF-8?Q?Dj=C3=A4rv wrote:
> Hello.

First thing, sorry about the annoyance this bug is causing.

> This is one of those vague bug reports that aren't easy to reproduce.

Hmm.  It's also, unfortunately, one of these bug reports that are
difficult to respond to in a helpful manner.

> After using Emacs for some time (several hours, more than 4) and
> editing many C++ and C files, indentating breaks down.  This manifests
> itself that most lines get indetated at column 0.  Doing C-c c-s on
> those lines shows topmost-intro.  even if they should be inclass or
> statement.

"Most"?  Any chance you could post a fragment of a buffer (say, 20 - 60
lines starting near a beginning of defun) with the syntactic analysis of
each line (Use C-u C-c C-s on each line)?

OK.  Now some more details, please!

(i) Have you ever noticed this bug happening on earlier Emacsen, in
  particular Emacs 23.1?
(ii) Does this bug happen every time you use Emacs this long, or only
  sometimes?  If the latter, how often (10%, 50%, 90%)?
(iii) Do you think there might be any connection with some of the more
  unusual minor modes you've got switched on?  Things like
  auto-encryption mode?

When Emacs reaches this broken state:
(iv) Are all C(++) buffers in this state, or only some?  Any correlation
  with how many edits have been done on a buffer, or how long it's been
  loaded?
(v) What about indentation in a freshly loaded file?
(vi) Will M-x c-mode or M-x c++-mode clear the problem?
(vii) Does reverting (M-x revert-buffer) a file fix indentation?
(viii) Does killing and reloading a file fix indentation?
(ix) Does intentation gradually deteriorate at around 4 hours, or does it
  break suddenly?
(x) Do all CC Mode buffers break at the same time, or is it a "creeping
  death"?

I realise how tedious it is to reproduce the broken state, but answers to
these questions might suggest a line of attack on the bug.  Also, please
post any further thoughts you've had about it.

Just one other thing: Could you please post a dump of your CC Mode
configuration (C-c C-b in a C(++) buffer).  Thanks.

> Restarting Emacs fixes everything.

Well, that's one thing to be grateful for.  :-)

>            Jan D.

-- 
Alan Mackenzie (Nuremberg, Germany).




bug reassigned from package 'emacs' to 'emacs,cc-mode'. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 02 Feb 2010 20:00:03 GMT) Full text and rfc822 format available.

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5490; Package emacs,cc-mode. (Tue, 09 Feb 2010 12:46:02 GMT) Full text and rfc822 format available.

Message #13 received at 5490 <at> debbugs.gnu.org (full text, mbox):

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 5490 <at> debbugs.gnu.org
Subject: Re: bug#5490: 23.1.91;
	CC Mode, after a while, everything is topmost-intro.
Date: Tue, 09 Feb 2010 13:45:35 +0100
Ok, here are some answers.

Alan Mackenzie skrev:
>
> OK.  Now some more details, please!
> 
> (i) Have you ever noticed this bug happening on earlier Emacsen, in
>   particular Emacs 23.1?

No.

> (ii) Does this bug happen every time you use Emacs this long, or only
>   sometimes?  If the latter, how often (10%, 50%, 90%)?

100%.  If I just keep editing it eveentually breaks.

> (iii) Do you think there might be any connection with some of the more
>   unusual minor modes you've got switched on?  Things like
>   auto-encryption mode?
> 

No, this doesn't seem to have any effect.

> When Emacs reaches this broken state:
> (iv) Are all C(++) buffers in this state, or only some?  Any correlation
>   with how many edits have been done on a buffer, or how long it's been
>   loaded?

It is a pre buffer breakage.  One buffer usually gets borken first, while the 
others are ok.  It is the one that I've changed/edited the most in.

> (v) What about indentation in a freshly loaded file?

No problem.

> (vi) Will M-x c-mode or M-x c++-mode clear the problem?

Yes.

> (vii) Does reverting (M-x revert-buffer) a file fix indentation?

No.

> (viii) Does killing and reloading a file fix indentation?

Yes.

> (ix) Does intentation gradually deteriorate at around 4 hours, or does it
>   break suddenly?

Suddenly.

> (x) Do all CC Mode buffers break at the same time, or is it a "creeping
>   death"?

Only one at the time.


> Just one other thing: Could you please post a dump of your CC Mode
> configuration (C-c C-b in a C(++) buffer).  Thanks.
> 

X-Reporter-Void-Vars-Found: auto-fill-mode (setq
 c-basic-offset 4
 c-comment-only-line-offset 0
 c-indent-comment-alist '((anchored-comment column . 0) (end-block space . 1)
			  (cpp-end-block space . 2))
 c-indent-comments-syntactically-p nil
 c-block-comment-prefix "* "
 c-comment-prefix-regexp '((pike-mode . "//+!?\\|\\**") (awk-mode . "#+")
			   (other . "//+\\|\\**"))
 c-doc-comment-style '((java-mode . javadoc) (pike-mode . autodoc)
		       (c-mode . gtkdoc))
 c-cleanup-list '(defun-close-semi list-close-comma scope-operator)
 c-hanging-braces-alist '((substatement-open before after)
			  (brace-list-open before after)
			  (brace-list-intro after) (brace-list-entry)
			  (brace-list-close before after)
			  (block-close . c-snug-do-while))
 c-hanging-colons-alist '((access-label after) (case-label after)
			  (label after) (member-init-intro before)
			  (inher-intro))
 c-hanging-semi&comma-criteria '(c-semi&comma-inside-parenlist)
 c-backslash-column 48
 c-backslash-max-column 72
 c-special-indent-hook nil
 c-label-minimum-indentation 1
 c-offsets-alist '((inexpr-class . c-lineup-inexpr-block)
		   (inexpr-statement . +)
		   (lambda-intro-cont . +)
		   (inlambda . c-lineup-inexpr-block)
		   (template-args-cont c-lineup-template-args +)
		   (incomposition . +)
		   (inmodule . +)
		   (innamespace . 0)
		   (inextern-lang . +)
		   (composition-close . 0)
		   (module-close . 0)
		   (namespace-close . 0)
		   (extern-lang-close . 0)
		   (composition-open . 0)
		   (module-open . 0)
		   (namespace-open . 0)
		   (extern-lang-open . 0)
		   (objc-method-call-cont
		    c-lineup-ObjC-method-call-colons
		    c-lineup-ObjC-method-call
		    +
		    )
		   (objc-method-args-cont . c-lineup-ObjC-method-args)
		   (objc-method-intro . [0])
		   (friend . 0)
		   (cpp-define-intro c-lineup-cpp-define +)
		   (cpp-macro-cont . +)
		   (cpp-macro . [0])
		   (inclass . +)
		   (stream-op . c-lineup-streamop)
		   (arglist-cont-nonempty
		    c-lineup-gcc-asm-reg
		    c-lineup-arglist
		    )
		   (arglist-cont c-lineup-gcc-asm-reg 0)
		   (comment-intro
		    c-lineup-knr-region-comment
		    c-lineup-comment
		    )
		   (catch-clause . 0)
		   (else-clause . 0)
		   (do-while-closure . 0)
		   (access-label . -1000)
		   (case-label . 0)
		   (substatement . +)
		   (statement-case-intro . +)
		   (statement . 0)
		   (brace-entry-open . 0)
		   (brace-list-entry . 0)
		   (brace-list-intro . +)
		   (brace-list-close . 0)
		   (block-close . 0)
		   (block-open . 0)
		   (inher-cont . c-lineup-multi-inher)
		   (inher-intro . +)
		   (member-init-cont . c-lineup-multi-inher)
		   (member-init-intro . +)
		   (topmost-intro . 0)
		   (knr-argdecl . 0)
		   (func-decl-cont . +)
		   (inline-close . 0)
		   (class-close . 0)
		   (class-open . 0)
		   (defun-block-intro . +)
		   (defun-close . 0)
		   (defun-open . 0)
		   (c . c-lineup-C-comments)
		   (string . c-lineup-dont-change)
		   (topmost-intro-cont . 0)
		   (brace-list-open . 0)
		   (inline-open . 0)
		   (arglist-close . c-lineup-arglist)
		   (arglist-intro . c-lineup-arglist)
		   (statement-cont . +)
		   (statement-case-open . 0)
		   (label . -1000)
		   (substatement-label . 2)
		   (substatement-open . 0)
		   (knr-argdecl-intro . +)
		   (statement-block-intro . +)
		   )
 c-buffer-is-cc-mode 'c++-mode
 c-tab-always-indent t
 c-syntactic-indentation t
 c-syntactic-indentation-in-macros t
 c-ignore-auto-fill '(string cpp code)
 c-auto-align-backslashes t
 c-backspace-function 'backward-delete-char-untabify
 c-delete-function 'delete-char
 c-electric-pound-behavior '(alignleft)
 c-default-style '((java-mode . "java") (awk-mode . "awk") (other . "gnu"))
 c-enable-xemacs-performance-kludge-p nil
 c-old-style-variable-behavior nil
 defun-prompt-regexp nil
 tab-width 8
 comment-column 32
 parse-sexp-ignore-comments t
 parse-sexp-lookup-properties t
 auto-fill-function nil
 comment-multi-line t
 comment-start-skip "\\(//+\\|/\\*+\\)\\s *"
 fill-prefix nil
 fill-column 70
 paragraph-start "[ 	]*\\(//+\\|\\**\\)[ 	]*$\\|^\f"
 adaptive-fill-mode t
 adaptive-fill-regexp "[ 	]*\\(//+\\|\\**\\)[ 	]*\\([ 
]*\\([-!|#%;>*·•‣⁃◦]+[ 	]*\\)*\\)"
 )

--text follows this line--


Emacs  : GNU Emacs 23.1.92.1 (i686-pc-linux-gnu, GTK+ Version 2.18.3)
 of 2010-02-03 on cons1
Package: CC Mode 5.31.8 (C++/lah)
Buffer Style: JHD
c-emacs-features: (pps-extended-state col-0-paren posix-char-classes 
gen-string-delim gen-comment-delim syntax-properties 1-bit)

	Jan D.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5490; Package emacs,cc-mode. (Tue, 09 Feb 2010 12:57:01 GMT) Full text and rfc822 format available.

Message #16 received at 5490 <at> debbugs.gnu.org (full text, mbox):

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 5490 <at> debbugs.gnu.org
Subject: Re: bug#5490: 23.1.91;
	CC Mode, after a while, everything is topmost-intro.
Date: Tue, 09 Feb 2010 13:55:58 +0100
Jan Djärv skrev:

> 
>> (vii) Does reverting (M-x revert-buffer) a file fix indentation?
> 
> No.

That should be a yes, sorry.

	Jan D.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5490; Package emacs,cc-mode. (Tue, 09 Feb 2010 20:34:02 GMT) Full text and rfc822 format available.

Message #19 received at 5490 <at> debbugs.gnu.org (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: Jan Djärv <jan.h.d <at> swipnet.se>
Cc: 5490 <at> debbugs.gnu.org, emacs-devel <at> gnu.org
Subject: Re: bug#5490: 23.1.91;
	CC Mode, after a while, everything is topmost-intro.
Date: Tue, 9 Feb 2010 20:40:08 +0000
Hi, Jan,

Time for a top-post.  ;-)

All your answers to my questions are consistent with a bug in
c-parse-state (don't ask!).  I recently enhanced and severely optimised
this routine (it contains a cache) to deal better with certain types of
non-unusual source files.  If this cache is getting corrupted, it could
easily foul up a buffer's indentation.

Would you try one more thing, please: when you reach this buggy state
again, would you please do

    M-: (c-state-cache-init)

, and tell me if this clears the buggy state.

Thanks!



On Tue, Feb 09, 2010 at 01:45:35PM +0100, Jan Djärv wrote:
> Ok, here are some answers.
> 
> Alan Mackenzie skrev:
> >
> >OK.  Now some more details, please!
> >
> >(i) Have you ever noticed this bug happening on earlier Emacsen, in
> >  particular Emacs 23.1?
> 
> No.
> 
> >(ii) Does this bug happen every time you use Emacs this long, or only
> >  sometimes?  If the latter, how often (10%, 50%, 90%)?
> 
> 100%.  If I just keep editing it eveentually breaks.
> 
> >(iii) Do you think there might be any connection with some of the more
> >  unusual minor modes you've got switched on?  Things like
> >  auto-encryption mode?
> >
> 
> No, this doesn't seem to have any effect.
> 
> >When Emacs reaches this broken state:
> >(iv) Are all C(++) buffers in this state, or only some?  Any correlation
> >  with how many edits have been done on a buffer, or how long it's been
> >  loaded?
> 
> It is a pre buffer breakage.  One buffer usually gets borken first, while 
> the others are ok.  It is the one that I've changed/edited the most in.
> 
> >(v) What about indentation in a freshly loaded file?
> 
> No problem.
> 
> >(vi) Will M-x c-mode or M-x c++-mode clear the problem?
> 
> Yes.
> 
> >(vii) Does reverting (M-x revert-buffer) a file fix indentation?
> 
> No.
> 
> >(viii) Does killing and reloading a file fix indentation?
> 
> Yes.
> 
> >(ix) Does intentation gradually deteriorate at around 4 hours, or does it
> >  break suddenly?
> 
> Suddenly.
> 
> >(x) Do all CC Mode buffers break at the same time, or is it a "creeping
> >  death"?
> 
> Only one at the time.
> 
> 
> >Just one other thing: Could you please post a dump of your CC Mode
> >configuration (C-c C-b in a C(++) buffer).  Thanks.
> >

[ Dump appreciated! ]

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5490; Package emacs,cc-mode. (Wed, 24 Feb 2010 12:10:03 GMT) Full text and rfc822 format available.

Message #22 received at 5490 <at> debbugs.gnu.org (full text, mbox):

From: "Jan D." <jan.h.d <at> swipnet.se>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 5490 <at> debbugs.gnu.org, emacs-devel <at> gnu.org
Subject: Re: bug#5490: 23.1.91;
	CC Mode, after a while, everything is topmost-intro.
Date: Wed, 24 Feb 2010 13:09:13 +0100
Alan Mackenzie wrote:
> Hi, Jan,
> 
> Time for a top-post.  ;-)
> 
> All your answers to my questions are consistent with a bug in
> c-parse-state (don't ask!).  I recently enhanced and severely optimised
> this routine (it contains a cache) to deal better with certain types of
> non-unusual source files.  If this cache is getting corrupted, it could
> easily foul up a buffer's indentation.
> 
> Would you try one more thing, please: when you reach this buggy state
> again, would you please do
> 
>     M-: (c-state-cache-init)
> 
> , and tell me if this clears the buggy state.
> 
> Thanks!

No, it does not.  Run with Emacs taken from trunk 2010-02-24, around 
11.00 UTC.

	Jan D.





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5490; Package emacs,cc-mode. (Thu, 25 Feb 2010 01:10:02 GMT) Full text and rfc822 format available.

Message #25 received at 5490 <at> debbugs.gnu.org (full text, mbox):

From: Miles Bader <miles <at> gnu.org>
To: "Jan D." <jan.h.d <at> swipnet.se>
Cc: Alan Mackenzie <acm <at> muc.de>, 5490 <at> debbugs.gnu.org, emacs-devel <at> gnu.org
Subject: Re: bug#5490: 23.1.91;
	CC Mode, after a while, everything is topmost-intro.
Date: Thu, 25 Feb 2010 09:59:06 +0900
"Jan D." <jan.h.d <at> swipnet.se> writes:
>>     M-: (c-state-cache-init)
>>
>> , and tell me if this clears the buggy state.
>
> No, it does not.  Run with Emacs taken from trunk 2010-02-24, around
> 11.00 UTC.

Yeah, I've been noticing the same problem a lot recently , and
(c-state-cache-init) doesn't seem to help.

Neither does re-invoking c++-mode (which in the past I've found is often
a good way to clear indentation bugs due to c++-mode caching bugs).
Deleting the buffer and re-visiting the file is the only way I've found
to get things working again.

It does seem to always occur somewhere following use of template'd
types though, so I imagine it's probs with the < and > chars.

[The annoying thing is that while it's very repeatable at the time it
occurs, it doesn't repeat for different emacs sessions, so I'm not
entirely sure how to go about reporting the bug...]

-Miles

-- 
Miss, pn. The title with which we brand unmarried women to indicate that
they are in the market. Miss, Missis (Mrs.) and Mister (Mr.) are the three
most distinctly disagreeable words in the language, in sound and sense. Two
are corruptions of Mistress, the other of Master. In the general abolition
of social titles in this our country they miraculously escaped to plague
us. If we must have them let us be consistent and give one to the unmarried
man. I venture to suggest Mush, abbreviated to Mh.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5490; Package emacs,cc-mode. (Fri, 26 Feb 2010 12:51:02 GMT) Full text and rfc822 format available.

Message #28 received at 5490 <at> debbugs.gnu.org (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: Miles Bader <miles <at> gnu.org>
Cc: "Jan D." <jan.h.d <at> swipnet.se>, 5490 <at> debbugs.gnu.org, emacs-devel <at> gnu.org
Subject: Re: bug#5490: 23.1.91;
	CC Mode, after a while, everything is topmost-intro.
Date: Fri, 26 Feb 2010 12:58:17 +0000
Jan, Miles,

On Thu, Feb 25, 2010 at 09:59:06AM +0900, Miles Bader wrote:
> "Jan D." <jan.h.d <at> swipnet.se> writes:
> >>     M-: (c-state-cache-init)

> >> , and tell me if this clears the buggy state.

> > No, it does not.  Run with Emacs taken from trunk 2010-02-24, around
> > 11.00 UTC.

> Yeah, I've been noticing the same problem a lot recently , and
> (c-state-cache-init) doesn't seem to help.

> Neither does re-invoking c++-mode (which in the past I've found is often
> a good way to clear indentation bugs due to c++-mode caching bugs).
> Deleting the buffer and re-visiting the file is the only way I've found
> to get things working again.

Reinitialising a CC Mode doesn't clear text properties from the buffer.
Perhaps it should.

> It does seem to always occur somewhere following use of template'd
> types though, so I imagine it's probs with the < and > chars.

As always.  These little characters are horrors to deal with in C++ Mode.
Their treatment is gradually improving.

In particular, I fixed some "silly" bugs concerned with them and
committed the fix yesterday evening (UCT+2).  Hopefully, things will run
more smoothly from now on.

> [The annoying thing is that while it's very repeatable at the time it
> occurs, it doesn't repeat for different emacs sessions, so I'm not
> entirely sure how to go about reporting the bug...]

Bob did so splendidly with a dribble file and CC Mode configuration
(generated by C-c C-b).  Anyhow, it might be working properly now.

> -Miles

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org:
bug#5490; Package emacs,cc-mode. (Sat, 09 Jul 2011 07:56:02 GMT) Full text and rfc822 format available.

Message #31 received at 5490 <at> debbugs.gnu.org (full text, mbox):

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 5490 <at> debbugs.gnu.org, emacs-devel <at> gnu.org
Subject: Re: bug#5490: 23.1.91;
	CC Mode, after a while, everything is topmost-intro.
Date: Sat, 09 Jul 2011 09:55:11 +0200
Hello.

FWIW, this bug is still present in the trunk.  I see it 5-8 times per day.
Revert buffer sometimes work to get back on track, but for the majority of 
cases, I have to kill the buffer and reopen the file for cc-mode to work again.

	Jan D.




Information forwarded to bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org:
bug#5490; Package emacs,cc-mode. (Thu, 18 Aug 2016 05:02:01 GMT) Full text and rfc822 format available.

Message #34 received at 5490 <at> debbugs.gnu.org (full text, mbox):

From: Andrew Hyatt <ahyatt <at> gmail.com>
To: Jan Djärv <jan.h.d <at> swipnet.se>
Cc: Alan Mackenzie <acm <at> muc.de>, 5490 <at> debbugs.gnu.org, emacs-devel <at> gnu.org
Subject: Re: bug#5490: 23.1.91;
 CC Mode, after a while, everything is topmost-intro.
Date: Thu, 18 Aug 2016 01:01:04 -0400
Jan Djärv <jan.h.d <at> swipnet.se> writes:

> Hello.
>
> FWIW, this bug is still present in the trunk.  I see it 5-8 times per day.
> Revert buffer sometimes work to get back on track, but for the majority of
> cases, I have to kill the buffer and reopen the file for cc-mode to work again.
>
> 	Jan D.

Hi, I've been using cc-mode every day for the past few years at
work, and I don't recall seeing this bug either in Emacs 24 or 25.  Has
anyone reproduced this lately?




Information forwarded to bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org:
bug#5490; Package emacs,cc-mode. (Thu, 18 Aug 2016 14:12:01 GMT) Full text and rfc822 format available.

Message #37 received at 5490 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Andrew Hyatt <ahyatt <at> gmail.com>
Cc: acm <at> muc.de, jan.h.d <at> swipnet.se, 5490 <at> debbugs.gnu.org, emacs-devel <at> gnu.org
Subject: Re: bug#5490: 23.1.91;
 CC Mode, after a while, everything is topmost-intro.
Date: Thu, 18 Aug 2016 17:11:13 +0300
> From: Andrew Hyatt <ahyatt <at> gmail.com>
> Date: Thu, 18 Aug 2016 01:01:04 -0400
> Cc: Alan Mackenzie <acm <at> muc.de>, 5490 <at> debbugs.gnu.org, emacs-devel <at> gnu.org
> 
> Jan Djärv <jan.h.d <at> swipnet.se> writes:
> 
> > Hello.
> >
> > FWIW, this bug is still present in the trunk.  I see it 5-8 times per day.
> > Revert buffer sometimes work to get back on track, but for the majority of
> > cases, I have to kill the buffer and reopen the file for cc-mode to work again.
> >
> > 	Jan D.
> 
> Hi, I've been using cc-mode every day for the past few years at
> work, and I don't recall seeing this bug either in Emacs 24 or 25.  Has
> anyone reproduced this lately?

I think it's very likely that the latest fixes by Alan in CC mode
nailed this one for good.




Information forwarded to bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org:
bug#5490; Package emacs,cc-mode. (Sun, 21 Aug 2016 04:59:01 GMT) Full text and rfc822 format available.

Message #40 received at 5490 <at> debbugs.gnu.org (full text, mbox):

From: Andrew Hyatt <ahyatt <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: acm <at> muc.de, jan.h.d <at> swipnet.se, 5490 <at> debbugs.gnu.org, emacs-devel <at> gnu.org
Subject: Re: bug#5490: 23.1.91;
 CC Mode, after a while, everything is topmost-intro.
Date: Sun, 21 Aug 2016 00:57:50 -0400
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Andrew Hyatt <ahyatt <at> gmail.com>
>> Date: Thu, 18 Aug 2016 01:01:04 -0400
>> Cc: Alan Mackenzie <acm <at> muc.de>, 5490 <at> debbugs.gnu.org, emacs-devel <at> gnu.org
>> 
>> Jan Djärv <jan.h.d <at> swipnet.se> writes:
>> 
>> > Hello.
>> >
>> > FWIW, this bug is still present in the trunk.  I see it 5-8 times per day.
>> > Revert buffer sometimes work to get back on track, but for the majority of
>> > cases, I have to kill the buffer and reopen the file for cc-mode to work
>> > again.
>> >
>> > 	Jan D.
>> 
>> Hi, I've been using cc-mode every day for the past few years at
>> work, and I don't recall seeing this bug either in Emacs 24 or 25.  Has
>> anyone reproduced this lately?
>
> I think it's very likely that the latest fixes by Alan in CC mode
> nailed this one for good.

OK, I'm going to mark this one as doneunreproducible - it may have been
fixed some time in the past, or by these recent fixes you refer to.
I'll keep an eye out for this myself during my normal work, and re-open
this if I or anyone else starts seeing this again.




Added tag(s) unreproducible. Request was from Andrew Hyatt <ahyatt <at> gmail.com> to control <at> debbugs.gnu.org. (Sun, 21 Aug 2016 04:59:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 5490 <at> debbugs.gnu.org and jan.h.d <at> swipnet.se (Jan Djärv) Request was from Andrew Hyatt <ahyatt <at> gmail.com> to control <at> debbugs.gnu.org. (Sun, 21 Aug 2016 04:59:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org:
bug#5490; Package emacs,cc-mode. (Mon, 22 Aug 2016 10:50:01 GMT) Full text and rfc822 format available.

Message #47 received at 5490 <at> debbugs.gnu.org (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: Andrew Hyatt <ahyatt <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, jan.h.d <at> swipnet.se, 5490 <at> debbugs.gnu.org,
 emacs-devel <at> gnu.org
Subject: Re: bug#5490: 23.1.91; CC Mode, after a while, everything is
 topmost-intro.
Date: Mon, 22 Aug 2016 10:49:16 +0000
Hello, Andrew.

On Sun, Aug 21, 2016 at 12:57:50AM -0400, Andrew Hyatt wrote:
> Eli Zaretskii <eliz <at> gnu.org> writes:

> >> From: Andrew Hyatt <ahyatt <at> gmail.com>
> >> Date: Thu, 18 Aug 2016 01:01:04 -0400
> >> Cc: Alan Mackenzie <acm <at> muc.de>, 5490 <at> debbugs.gnu.org, emacs-devel <at> gnu.org

> >> Jan Djärv <jan.h.d <at> swipnet.se> writes:

> >> > Hello.

> >> > FWIW, this bug is still present in the trunk.  I see it 5-8 times per day.
> >> > Revert buffer sometimes work to get back on track, but for the majority of
> >> > cases, I have to kill the buffer and reopen the file for cc-mode to work
> >> > again.

> >> > 	Jan D.

> >> Hi, I've been using cc-mode every day for the past few years at
> >> work, and I don't recall seeing this bug either in Emacs 24 or 25.  Has
> >> anyone reproduced this lately?

> > I think it's very likely that the latest fixes by Alan in CC mode
> > nailed this one for good.

> OK, I'm going to mark this one as doneunreproducible - it may have been
> fixed some time in the past, or by these recent fixes you refer to.
> I'll keep an eye out for this myself during my normal work, and re-open
> this if I or anyone else starts seeing this again.

Thanks.  I think this bug (which was definitely real) got fixed as a side
effect of fixing something else, and this happened quite a long time ago.

-- 
Alan Mackenzie (Nuremberg, Germany).




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 19 Sep 2016 11:24:04 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Alan Mackenzie <acm <at> muc.de> to control <at> debbugs.gnu.org. (Thu, 14 Nov 2019 19:58:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org:
bug#5490; Package emacs,cc-mode. (Thu, 14 Nov 2019 20:12:02 GMT) Full text and rfc822 format available.

Message #54 received at 5490 <at> debbugs.gnu.org (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: Eric Scrivner <eric.t.scrivner <at> gmail.com>
Cc: 37910-done <at> debbugs.gnu.org, Stefan Kangas <stefan <at> marxist.se>,
 5490 <at> debbugs.gnu.org, 18072 <at> debbugs.gnu.org
Subject: Re: bug#37910: CC Mode 5.33.2 (C++//l); CC-mode inconsistently
 indents everything as topmost-intro after a while
Date: Thu, 14 Nov 2019 20:11:39 +0000
Hello, Eric.

On Wed, Nov 13, 2019 at 16:12:11 -0800, Eric Scrivner wrote:
> Hi Alan,

> Thanks so much for the patch and explanation. I applied it locally and
> while the patch didn't seem to have much effect, setting
> `open-paren-in-column-0-is-defun-start` to `nil` seems to have done the
> trick here without any noticeable impact on performance. It seems as you've
> said that there may be some issues in the heuristic used for performance
> optimization here.

> I will let you know if any other issues surface, but it appears this has
> fixed my issue.

OK, thanks for the test.  I think it is now time to commit the patch and
close the bug.

I am hoping that the patch, already applied to the savannah master
branch, will also have fixed bugs #5910 and #18072.  Their (sporadic)
symptoms were consistent with the glitches fixed by the patch.

-- 
Alan Mackenzie (Nuremberg, Germany).




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 13 Dec 2019 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 135 days ago.

Previous Next


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