From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andrew Hyatt Newsgroups: gmane.emacs.bugs Subject: bug#681: Wrong C++ indentation in batch mode Date: Mon, 25 Jan 2016 23:46:23 -0500 Message-ID: References: <200808091726.22907.Vivien.Mallet@inria.fr> <87zjn8hu79.fsf@bzg.ath.cx> <87zjn7g5x7.fsf@verdandi.inria.fr> <87ppo3hiz0.fsf@bzg.ath.cx> <20160104231642.GA13716@acm.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1453783652 32651 80.91.229.3 (26 Jan 2016 04:47:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Jan 2016 04:47:32 +0000 (UTC) Cc: Bastien , Vivien Mallet , 681@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jan 26 05:47:21 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aNvXE-0007ja-Mj for geb-bug-gnu-emacs@m.gmane.org; Tue, 26 Jan 2016 05:47:20 +0100 Original-Received: from localhost ([::1]:41909 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNvXA-0001xY-IP for geb-bug-gnu-emacs@m.gmane.org; Mon, 25 Jan 2016 23:47:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46277) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNvX5-0001xO-RY for bug-gnu-emacs@gnu.org; Mon, 25 Jan 2016 23:47:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aNvX1-0006ho-LR for bug-gnu-emacs@gnu.org; Mon, 25 Jan 2016 23:47:08 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48290) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNvWv-0006gz-NO; Mon, 25 Jan 2016 23:47:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aNvWv-0000zR-In; Mon, 25 Jan 2016 23:47:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andrew Hyatt Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Tue, 26 Jan 2016 04:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 681 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: Original-Received: via spool by 681-submit@debbugs.gnu.org id=B681.14537835953768 (code B ref 681); Tue, 26 Jan 2016 04:47:01 +0000 Original-Received: (at 681) by debbugs.gnu.org; 26 Jan 2016 04:46:35 +0000 Original-Received: from localhost ([127.0.0.1]:36510 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aNvWU-0000yi-WC for submit@debbugs.gnu.org; Mon, 25 Jan 2016 23:46:35 -0500 Original-Received: from mail-qg0-f50.google.com ([209.85.192.50]:34169) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aNvWS-0000yU-Vo for 681@debbugs.gnu.org; Mon, 25 Jan 2016 23:46:33 -0500 Original-Received: by mail-qg0-f50.google.com with SMTP id 6so126589526qgy.1 for <681@debbugs.gnu.org>; Mon, 25 Jan 2016 20:46:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=Y4+3bXECmjuHNgWV8t6YH/Y6T/QT5I//skE8PI2j8lM=; b=AisqiQi4MtNQmFBD0pEPzyrU3ha59qmCt8XSY8SMg48nxAX7khaKMMGwiLgOSKeYWC Cuq0A4hM+rjp/1s6hfPwuL2/m090ppRhRHPxwz/8nDNfka2yv4hY7nU+sALCuacl3DVR OrZPc3Y5Dh3K3NESIl4aM/03a7KxO4Q4OW9Euv/6Ef3jQ4rvzfNMejlJHMmqApsTHDAh h2uzdn7gOHqOhN0GgXdRvZkDA3jxNEKU4Wqre2RS+DFgTIHiVIhnyxtskTtSLMTm/b/b wSBvzccDalz/5V6SnIaqrEplhfOjV0HJnWNWuz4s49hD4I9t+8Lqa6cIStlsfW9BnUTg BRTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=Y4+3bXECmjuHNgWV8t6YH/Y6T/QT5I//skE8PI2j8lM=; b=F8uzp/SSgj807/6gdWVHruossmmQmc9UGjDbkno7cM0xSx9YwoHiMwYSDSYUkBlMgV eijP9pim6OG2YgMGA7AE+CJRYMC+CcU8RgW3CT2UGOLr+nPbsU/OLqaXyw5E3R0AaaPO SnURRybJOouaT3fzT7HXqVIXPJpqesCEc74IU3dmcJTGVMXXdggFZtKTlBoibZhlyCDh 0cjBtLZWadHkNtL+Ey/n0p30XLnQa+7diyLh2jBs5yxGbKXyS79JqRi0wyajlXzFSsKn cELwbDC0/+o/3hzMryXkWSFNtIoIpdY+8KU8kZvNaQBEY2mKP0mxIK/7lvspvPnP+2Uu dhrw== X-Gm-Message-State: AG10YOSVveRkj28utaMH0MMLkBQecqS9RsKmKdgTpH7/iHnn1sao+01499VX9w/oXVhPAg== X-Received: by 10.140.221.17 with SMTP id r17mr27344621qhb.94.1453783587269; Mon, 25 Jan 2016 20:46:27 -0800 (PST) Original-Received: from Andrews-MacBook-Pro.local.ahyatt-laptop (cpe-74-73-128-199.nyc.res.rr.com. [74.73.128.199]) by smtp.gmail.com with ESMTPSA id f7sm10097961qhf.35.2016.01.25.20.46.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jan 2016 20:46:25 -0800 (PST) In-Reply-To: <20160104231642.GA13716@acm.fritz.box> (Alan Mackenzie's message of "Mon, 4 Jan 2016 23:16:42 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (darwin) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:111972 Archived-At: Alan Mackenzie writes: > Hello Vivien. > > On Mon, Dec 28, 2015 at 08:18:02PM -0500, Andrew Hyatt wrote: > >> Bastien writes: > >> > Hi Vivien, > >> > Vivien Mallet writes: > >> >> Now, launch from command line: >> >> \emacs -Q test.cpp --batch --eval="(defun cpp_indent () (c-set-style \"gnu\") (c++-mode) (indent-region (point-min) (point-max) ()) (save-buffer))" --eval="(cpp_indent)" > >> >> You should get: > >> >> template >> >> Derived::Derived(): >> >> Base> >> B>() // Problem: wrong indentation in batch mode. >> >> { >> >> int i: >> >> } > >> >> In addition, it seems that "c-set-style" is not honored. It may be >> >> "bsd", "k&r", etc. without any difference. > >> > Mhh... yes, I see now. > >> > I reopend the bug and will let someone more familiar >> > with the code fix it. > >> I'm not the one more familiar, but I just want to record that this still >> reproduces on emacs 25. > > I've committed what I hope is a fix to the emacs-25 branch at savannah. > Sorry it's taken (a lot) longer than it should have done. > > Would you please tell me what version of Emacs you're currently using, > and I will try to adapt the patch for that version. Then I will ask you > to try out the patch and let me know whether or not there are still > errors. > > Then, hopefully, we can close this bug. Seeing as how there's no response, if you've fixed this bug (thanks, BTW!), perhaps we should close it now?