bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#5570: Emacs 23.1.91.1 C++ mode "ESC C-q" and TAB indenting issue.


From: Bob
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

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<GetDataType<_TypeKind>::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<GetDataType<_TypeKind>::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:address@hidden 
Sent: Sunday, February 14, 2010 12:10 PM
To: Chong Yidong
Cc: Bob; address@hidden
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" <address@hidden> 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<a,b>::value,
> >  IF<
> >    Length<c,d>::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).







reply via email to

[Prev in Thread] Current Thread [Next in Thread]