From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Bob" Newsgroups: gmane.emacs.bugs Subject: bug#5570: Emacs 23.1.91.1 C++ mode "ESC C-q" and TAB indenting issue. Date: Mon, 15 Feb 2010 14:15:21 -0800 Message-ID: <000301caae8c$5e161380$1a423a80$@net> References: <000301caac36$0fc0b760$2f422620$@net> <87pr494md5.fsf@stupidchicken.com> <000e01caad1e$dcbfc560$963f5020$@net> <876360s8rw.fsf@stupidchicken.com> <20100214201006.GA6169@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1266272654 26335 80.91.229.12 (15 Feb 2010 22:24:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 15 Feb 2010 22:24:14 +0000 (UTC) Cc: 5570@debbugs.gnu.org To: "'Alan Mackenzie'" , "'Chong Yidong'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 15 23:24:11 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Nh9MO-0001zW-OC for geb-bug-gnu-emacs@m.gmane.org; Mon, 15 Feb 2010 23:24:09 +0100 Original-Received: from localhost ([127.0.0.1]:51310 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nh9MO-0005es-1i for geb-bug-gnu-emacs@m.gmane.org; Mon, 15 Feb 2010 17:24:08 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nh9L0-0005JP-Uc for bug-gnu-emacs@gnu.org; Mon, 15 Feb 2010 17:22:43 -0500 Original-Received: from [140.186.70.92] (port=51600 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nh9L0-0005J0-6M for bug-gnu-emacs@gnu.org; Mon, 15 Feb 2010 17:22:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nh9Kz-0002YJ-QN for bug-gnu-emacs@gnu.org; Mon, 15 Feb 2010 17:22:42 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52491) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nh9Kz-0002YF-OZ for bug-gnu-emacs@gnu.org; Mon, 15 Feb 2010 17:22:41 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Nh9EY-0000eE-5p; Mon, 15 Feb 2010 17:16:02 -0500 X-Loop: bug-gnu-emacs@gnu.org Resent-From: "Bob" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Feb 2010 22:16:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 5570 X-Emacs-PR-Package: emacs,cc-mode X-Emacs-PR-Keywords: Original-Received: via spool by 5570-submit@debbugs.gnu.org id=B5570.12662721092465 (code B ref 5570); Mon, 15 Feb 2010 22:16:02 +0000 Original-Received: (at 5570) by debbugs.gnu.org; 15 Feb 2010 22:15:09 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nh9Dg-0000di-Lf for submit@debbugs.gnu.org; Mon, 15 Feb 2010 17:15:09 -0500 Original-Received: from qmta01.emeryville.ca.mail.comcast.net ([76.96.30.16]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nh9De-0000d7-4h for 5570@debbugs.gnu.org; Mon, 15 Feb 2010 17:15:07 -0500 Original-Received: from omta19.emeryville.ca.mail.comcast.net ([76.96.30.76]) by qmta01.emeryville.ca.mail.comcast.net with comcast id iMmC1d0021eYJf8A1NF2f3; Mon, 15 Feb 2010 22:15:02 +0000 Original-Received: from Cache ([71.202.16.94]) by omta19.emeryville.ca.mail.comcast.net with comcast id iNF11d00521mHQP01NF1wE; Mon, 15 Feb 2010 22:15:02 +0000 In-Reply-To: <20100214201006.GA6169@muc.de> X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcqtsLU823zvPRLrTS6AQucy6khbWAA2ZyPA Content-Language: en-us X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 15 Feb 2010 17:16:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:35132 Archived-At: More stuff: With the emacs I've had going since last week I have several buffers where the indentation is incorrect. I validate by writing the buffer, then in a fresh emacs, visit the file, go to the lines with incorrect indentation, apply TAB and the result is the correct indentation. Ok, nothing new there. This is new: After applying TAB in the 2nd emacs to correct the indentation I write the file, then go back to the original buffer and re-visit the file with "C-x C-f" "ESC-n". Emacs confirms the file has changed, I reply "yes" and the visible buffer becomes truncated at the line where I TAB'ed to reformat: The saved file is: template< class _TypeKind, class _EStore = typename ScalarVectorSelector<_TypeKind>::Result bool _fixed = TL::MemberOf< DataTypeTrait::Result>::TAbout, EnumDTP::FixedPacked >::value > The re-visited buffer now shows: template< class _TypeKind, class _EStore = typename ScalarVectorSelector<_TypeKind>::Result bool _fixed = TL::MemberOf< EOF <--------------- NO MORE TEXT! The original incorrect indentation was something like this (it got lost when I revisited): template< class _TypeKind, class _EStore = typename ScalarVectorSelector<_TypeKind>::Result bool _fixed = TL::MemberOf< DataTypeTrait::Result>::TAbout, EnumDTP::FixedPacked >::value > Now, I kill the truncated buffer, re-visit (the original emacs) and I see correct indentation of the saved file, so I can continue work :) in the original emacs. -----Original Message----- From: Alan Mackenzie [mailto:acm@muc.de] Sent: Sunday, February 14, 2010 12:10 PM To: Chong Yidong Cc: Bob; 5570@debbugs.gnu.org Subject: Re: bug#5570: Emacs 23.1.91.1 C++ mode "ESC C-q" and TAB indenting issue. Hi, Bob and Yidong, On Sun, Feb 14, 2010 at 12:09:39AM -0500, Chong Yidong wrote: > Forwarding an email with pertinent info to the bug tracker, and to Alan > the CC-mode maintainer: > "Bob" writes: > > Yes, it does look related to 5490. I can respond to: I have the horrible suspicion that this is different from 5490. :-( > >> (i) Have you ever noticed this bug happening on earlier Emacsen, in > >> particular Emacs 23.1? > > Yes, it happened in 23.1 also. > >> (ii) Does this bug happen every time you use Emacs this long, or > >> only sometimes? > > For me it happens within minutes of use. My C++ files are HEAVILY > > templated and the issue appears to be related to '<' and '>' of > > template args, e.g. > > typedef IF< > > MemberOf::value, > > IF< > > Length::value, > > true, > > false > > >::Result, > > false > > >::Result Result; OK, template brackets are difficult, because they're so difficult to distinguish from less/greater than. Bob, seeing as how the bug hits you "withing minutes", is there any chance you could try and get it reproducible? Using a dribble file might be useful (see the page "Checklist" in the Emacs manual; you'd use this with something like '(open-dribble-file "~/dribble")' at the beginning of your Emacs session). If you manage to get it reproducible, could you send me the C++ file (which I will regard as confidential if needed) together with the sequence of commands (e.g. the dribble file) which triggers the bug. Also appreciated would be a dump of your CC Mode configuration, generated by C-c C-b. > > I will have several of these, one after the other, and be editing > > them. By accident I'll leave out a ',' or a '>' or kill & yank lines > > with similar error. After minutes of such editing, the indentation > > gets wacked. Sometimes by TAB indentation on a prior line the problem > > corrects. Sometimes I have to write the buffer and re-visit it. One other thing. Would you please try M-: (c-state-cache-init) when in this state, and tell me if it resolves the badness. Thanks! > >>(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? > > Just the buffer with the '<' and '>' in it. -- Alan Mackenzie (Nuremberg, Germany).