unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Bob" <purchasebyemail1@comcast.net>
To: "'Alan Mackenzie'" <acm@muc.de>,
	"'Chong Yidong'" <cyd@stupidchicken.com>
Cc: 5570@debbugs.gnu.org
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	[thread overview]
Message-ID: <000301caae8c$5e161380$1a423a80$@net> (raw)
In-Reply-To: <20100214201006.GA6169@muc.de>

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: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" <purchasebyemail1@comcast.net> 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	other threads:[~2010-02-15 22:15 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-12 22:52 bug#5570: Emacs 23.1.91.1 C++ mode "ESC C-q" and TAB indenting issue Bob
2010-02-13  7:37 ` Chong Yidong
     [not found]   ` <000e01caad1e$dcbfc560$963f5020$@net>
2010-02-14  5:09     ` Chong Yidong
2010-02-14 20:10       ` Alan Mackenzie
2010-02-15 22:15         ` Bob [this message]
     [not found]         ` <000001caae62$638af6c0$2aa0e440$@net>
2010-02-16 16:39           ` Alan Mackenzie
2010-02-16 18:35             ` Bob
2010-02-17  9:46               ` Alan Mackenzie
2010-02-17 16:40                 ` Bob
2010-02-18 15:12                   ` Alan Mackenzie
2010-02-18 15:53                     ` Bob
2010-02-19 20:34                       ` Alan Mackenzie
2010-02-20 13:41 ` Paul Pogonyshev
     [not found] ` <201002212354.23776.pogonyshev@gmx.net>
     [not found]   ` <873a0ujlba.fsf@stupidchicken.com>
2010-02-22 15:33     ` Paul Pogonyshev
2010-02-23 13:28       ` Paul Pogonyshev
2010-03-18 20:05 ` bug#5570: automatic cache validation Paul Pogonyshev
2010-03-18 20:31   ` Chong Yidong
2010-03-19 21:56   ` Alan Mackenzie
2010-03-19 22:45     ` Jan Djärv
2010-03-20 13:22       ` Alan Mackenzie
2010-03-20 14:49         ` Jan D.
2010-03-21 11:16           ` Alan Mackenzie
2010-03-21 11:50             ` Jan Djärv
2010-03-22  8:07             ` Jan Djärv
2010-04-02 17:01               ` Paul Pogonyshev
2010-04-03 23:55 ` Chong Yidong
2010-04-28 18:55 ` Chong Yidong
2020-09-14 13:48 ` bug#5570: Emacs 23.1.91.1 C++ mode "ESC C-q" and TAB indenting issue Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000301caae8c$5e161380$1a423a80$@net' \
    --to=purchasebyemail1@comcast.net \
    --cc=5570@debbugs.gnu.org \
    --cc=acm@muc.de \
    --cc=cyd@stupidchicken.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).