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: Tue, 16 Feb 2010 10:35:37 -0800 Message-ID: <000301caaf36$d5f86100$81e92300$@net> References: <000301caac36$0fc0b760$2f422620$@net> <87pr494md5.fsf@stupidchicken.com> <000e01caad1e$dcbfc560$963f5020$@net> <876360s8rw.fsf@stupidchicken.com> <20100214201006.GA6169@muc.de> <000001caae62$638af6c0$2aa0e440$@net> <20100216163923.GB3456@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0004_01CAAEF3.C7D52100" X-Trace: ger.gmane.org 1266346376 8537 80.91.229.12 (16 Feb 2010 18:52:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 16 Feb 2010 18:52:56 +0000 (UTC) Cc: 'Chong Yidong' , 5570@debbugs.gnu.org To: "'Alan Mackenzie'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 16 19:52:53 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 1NhSXU-0001hR-Ev for geb-bug-gnu-emacs@m.gmane.org; Tue, 16 Feb 2010 19:52:52 +0100 Original-Received: from localhost ([127.0.0.1]:39970 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NhSXT-0002rU-Qt for geb-bug-gnu-emacs@m.gmane.org; Tue, 16 Feb 2010 13:52:51 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NhSXO-0002nI-II for bug-gnu-emacs@gnu.org; Tue, 16 Feb 2010 13:52:46 -0500 Original-Received: from [140.186.70.92] (port=57145 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NhSXN-0002lY-MG for bug-gnu-emacs@gnu.org; Tue, 16 Feb 2010 13:52:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NhSXN-0003td-7m for bug-gnu-emacs@gnu.org; Tue, 16 Feb 2010 13:52:45 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41371) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NhSXN-0003tX-4Z for bug-gnu-emacs@gnu.org; Tue, 16 Feb 2010 13:52:45 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NhSHB-0007QX-VW; Tue, 16 Feb 2010 13:36: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: Tue, 16 Feb 2010 18:36:01 +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.126634532128526 (code B ref 5570); Tue, 16 Feb 2010 18:36:01 +0000 Original-Received: (at 5570) by debbugs.gnu.org; 16 Feb 2010 18:35:21 +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 1NhSGX-0007Q3-Ex for submit@debbugs.gnu.org; Tue, 16 Feb 2010 13:35:21 -0500 Original-Received: from qmta11.emeryville.ca.mail.comcast.net ([76.96.27.211]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NhSGV-0007Pw-SD for 5570@debbugs.gnu.org; Tue, 16 Feb 2010 13:35:20 -0500 Original-Received: from omta05.emeryville.ca.mail.comcast.net ([76.96.30.43]) by qmta11.emeryville.ca.mail.comcast.net with comcast id ieM51d0050vp7WLABiYXpA; Tue, 16 Feb 2010 18:32:31 +0000 Original-Received: from Cache ([71.202.16.94]) by omta05.emeryville.ca.mail.comcast.net with comcast id iibE1d00C21mHQP8RibF3P; Tue, 16 Feb 2010 18:35:15 +0000 In-Reply-To: <20100216163923.GB3456@muc.de> X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcqvJZyiYLzPQwZPRlOhzLz6K2IKpQADB0OA Content-Language: en-us X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 16 Feb 2010 13:36:01 -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:35142 Archived-At: This is a multi-part message in MIME format. ------=_NextPart_000_0004_01CAAEF3.C7D52100 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Alan, >> I am now attempting to try your c-state-cache-init and find this is not >> defined. > >That's exactly > > M-: (c-state-cache-init) Ahh, typed it in wrong. I have been saving the buffer where the " SelectInternalConvertableToVectorType" snippet is with the problematic '{' in column 0. So I am now able to eval your "(c-state-cache-init)" in the buffer. The result is no difference, '{' still appears in column 0 when I TAB. *Messages* contains "1 (#o1, #x1)" after running it, if that means anything to you. With regard to being more specific about what I type, that's going to be really difficult. Typically, I do a lot of kill - yanks, keyboard entry, and often return to text to post-insert missing ','s or '>'s and then TAB or C-q C-j. That's when I discover a bad indentation case. Sometimes, by TAB-ing on previous lines then returning to the problematic line, the indentation corrects. I have done what you did with the snippet also - put it into a separate file, start a separate emacs session. Each time I do that, the indentation corrects ('{' is not in col 0) and doesn't get out of whack as I fiddle in it. Makes me think the problem occurs with more than 1 file visited. I am preserving the emacs session with the bad '{' indentation (col 0). Is there any way we can narrow the issue by probing the buffer, such as with your (c-state-cache-init) ? Attached is the "c-submit-bug-report" run from the problematic buffer. Bob -----Original Message----- From: Alan Mackenzie [mailto:acm@muc.de] Sent: Tuesday, February 16, 2010 8:39 AM To: Bob Cc: 'Chong Yidong'; 5570@debbugs.gnu.org Subject: Re: bug#5570: Emacs 23.1.91.1 C++ mode "ESC C-q" and TAB indenting issue. Hi, Bob, On Mon, Feb 15, 2010 at 09:14:52AM -0800, Bob wrote: > Alan, > I am now running two emacs 23.1.91.1, one I started last week with many > files open in which I "work" etc., and one I just started with dribbling > "on" to edit a file I have seen the issue in. After half-hours editing in > this one, nothing bad has happened. I temporarily jumped back to the "work" > session to add a few needed lines and wammy! the problem appeared after > adding 7 lines: Could you be a little bit more exact in exactly what you did here. I have just fired up emacs 23.1.91, typed in namespace foo { (in column 0), then typed in the the lines that you've identified as causing the error: > template > struct SelectInternalConvertableToVectorType > { > typedef typename DataTypeTrait<_DataType>::TAbout TAbout; > > typedef TL::IF::value> > TInternal; > typedef TL::IF< > TL::MemberOf::value > > TConvertableToVectorType; > > typedef TL::IF< > (TInternal::value && > TConvertableToVectorType::value),_DataType,TL::False > >::Result Result; > }; <------------------------ Appears in column 1 However, that "};" for me appeared in the correct column, not in column 0. > I wrote the buffer, started a 3rd emacs, went to the line, hit TAB and the > indentation > corrected: That, at least, is refreshing. > }; <------------------------ Correct. > Back in the original session TAB still places the '{' in column 1. It doesn't for me. But I _have_ seen this error happening. So, could you please try and give me a precise recipe for how to reproduce the error, down at the level of what the buffer should look like before inserting these lines, and which keys to press to insert them. Was I correct in guessing that you typed in the lines when you said you "added" them, as opposed to, say, C-y? > I am now attempting to try your c-state-cache-init and find this is not > defined. That's exactly M-: (c-state-cache-init) , including the parens round the word. Are you certain you typed it correctly? It should be there in Emacs 23.1.91. > Please advise what to do. I've attached "describe-bindings" if that helps. > Thanks, > Bob > PS "C-c C-b" runs "c-submit-bug-report" - is that what you expect? Yes. It produces a dump of CC Mode's config as part of a mail buffer. Cut and paste it into your own mail client. -- Alan Mackenzie (Nuremberg, Germany). ------=_NextPart_000_0004_01CAAEF3.C7D52100 Content-Type: application/octet-stream; name="Mail" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="Mail" To: bug-cc-mode@gnu.org Subject: CC Mode 5.31.8 (C++/la); Incorrect indentation From: Bob@CACHE.i-did-not-set--mail-host-address--so-tickle-me X-Reporter-Void-Vars-Found: auto-fill-mode (setq c-basic-offset 2 c-comment-only-line-offset '(0 . 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 '(scope-operator) c-hanging-braces-alist '((substatement-open before after) (arglist-cont-nonempty)) c-hanging-colons-alist nil c-hanging-semi&comma-criteria '(c-semi&comma-inside-parenlist) c-backslash-column 48 c-backslash-max-column 72 c-special-indent-hook '(c-gnu-impose-minimum) c-label-minimum-indentation 1 c-offsets-alist '((inexpr-class . +) (inexpr-statement . +) (lambda-intro-cont . +) (inlambda . c-lineup-inexpr-block) (template-args-cont c-lineup-template-args +) (incomposition . +) (inmodule . +) (innamespace . +) (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 . +) (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 . -) (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-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 first c-lineup-topmost-intro-cont c-lineup-gnu-DEFUN-intro-cont ) (brace-list-open . +) (inline-open . 0) (arglist-close . c-lineup-arglist) (arglist-intro . c-lineup-arglist-intro-after-paren) (statement-case-open . +) (label . 0) (substatement-label . 0) (knr-argdecl-intro . 5) (statement-block-intro . +) (statement-cont . 0) (arglist-cont-nonempty . 0) (stream-op . 0) (inher-cont . 0) (substatement-open . 0) ) c-buffer-is-cc-mode 'c++-mode c-tab-always-indent nil 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 nil 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 "[ ]*\\(//+\\|\\**\\)[ ]*\\([ = ]*\\([-!|#%;>*=C2=B7=E2=80=A2=E2=80=A3=E2=81=83=E2=97=A6]+[ ]*\\)*\\)" ) --text follows this line-- Emacs : GNU Emacs 23.1.91.1 (i386-mingw-nt6.0.6002) of 2010-01-02 on PRETEST Package: CC Mode 5.31.8 (C++/la) Buffer Style: gnu c-emacs-features: (pps-extended-state col-0-paren posix-char-classes = gen-string-delim gen-comment-delim syntax-properties 1-bit) current state: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ------=_NextPart_000_0004_01CAAEF3.C7D52100--