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, 28 Dec 2015 20:18:02 -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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1451362062 22319 80.91.229.3 (29 Dec 2015 04:07:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Dec 2015 04:07:42 +0000 (UTC) Cc: Vivien Mallet , 681@debbugs.gnu.org To: Bastien Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 29 05:07:31 2015 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 1aDlZK-0008Bj-Pv for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Dec 2015 05:07:30 +0100 Original-Received: from localhost ([::1]:47021 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDlZK-00062M-3p for geb-bug-gnu-emacs@m.gmane.org; Mon, 28 Dec 2015 23:07:30 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37278) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDlZ1-0005UX-9Y for bug-gnu-emacs@gnu.org; Mon, 28 Dec 2015 23:07:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aDlZ0-0002v2-5n for bug-gnu-emacs@gnu.org; Mon, 28 Dec 2015 23:07:11 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39592) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDlYv-0002rL-KB; Mon, 28 Dec 2015 23:07:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aDlYv-0008Or-GA; Mon, 28 Dec 2015 23:07:05 -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, 29 Dec 2015 04:07:05 +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.145136202132199 (code B ref 681); Tue, 29 Dec 2015 04:07:05 +0000 Original-Received: (at 681) by debbugs.gnu.org; 29 Dec 2015 04:07:01 +0000 Original-Received: from localhost ([127.0.0.1]:47177 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aDlYq-0008N4-LJ for submit@debbugs.gnu.org; Mon, 28 Dec 2015 23:07:01 -0500 Original-Received: from mail-qg0-f53.google.com ([209.85.192.53]:34315) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aDivS-0003fJ-5V for 681@debbugs.gnu.org; Mon, 28 Dec 2015 20:18:10 -0500 Original-Received: by mail-qg0-f53.google.com with SMTP id 6so79091083qgy.1 for <681@debbugs.gnu.org>; Mon, 28 Dec 2015 17:18:10 -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=4/6IpTJMGz4OqDKK8OAD1FSCrB87p8DixhfKOm3sI8c=; b=pz3CHInkyjPUQ7ncxTnBVaY8ZSuErreJTc4jXrqhoPP2rEb9tv5ujNAoGyRXLVzGJN 0nr5CtyvyRNDDZ75m1tYIZm1csp8Roe4Ka2FiHLMpFA2SvqZHkQfw7qC0FlEwSCDR2sN t32PSNsCHhG+N0wJaFJbYYVl/elhvKb5dLyJpuAHKrv3G1BsX4VNe+HKOWOS2jNFPuj3 1DzCM8f7MDzFD2fL0dn2zfB5OiTWz7m3p9C7womMpkQxDzTKCe3B6HtY3HipzCL6qJWu AK5SkvTpuWb0C2hEMc/LCwohfvv3LQ8FEmTtu0Y4N5oc0vBDNYz16tr1aebObGEXLFLB Rc6w== X-Received: by 10.140.140.80 with SMTP id 77mr7362916qhm.61.1451351884857; Mon, 28 Dec 2015 17:18:04 -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 s95sm1629354qge.5.2015.12.28.17.18.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Dec 2015 17:18:04 -0800 (PST) In-Reply-To: <87ppo3hiz0.fsf@bzg.ath.cx> (Bastien's message of "Tue, 07 Jan 2014 17:09:23 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (darwin) X-Mailman-Approved-At: Mon, 28 Dec 2015 23:06:57 -0500 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:110946 Archived-At: 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.