From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Rosen Diankov" Newsgroups: gmane.emacs.bugs Subject: bug#703: Octave comments in emacs Date: Wed, 20 Aug 2008 19:21:24 -0400 Message-ID: <103101d70808201621x243bc027xee296d26d5ce5331@mail.gmail.com> References: <87wsiko8yl.fsf@stupidchicken.com> <18604.19606.61385.981605@fangorn.hornik.net> Reply-To: Rosen Diankov , 703@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1219276063 10345 80.91.229.12 (20 Aug 2008 23:47:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Aug 2008 23:47:43 +0000 (UTC) Cc: Chong Yidong , 703@emacsbugs.donarmstrong.com To: Kurt.Hornik@wu-wien.ac.at Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 21 01:48:35 2008 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.50) id 1KVxPn-0006RW-7C for geb-bug-gnu-emacs@m.gmane.org; Thu, 21 Aug 2008 01:48:35 +0200 Original-Received: from localhost ([127.0.0.1]:44220 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KVxOp-0005vt-MA for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Aug 2008 19:47:35 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KVxOl-0005vc-Hh for bug-gnu-emacs@gnu.org; Wed, 20 Aug 2008 19:47:31 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KVxOk-0005vD-SB for bug-gnu-emacs@gnu.org; Wed, 20 Aug 2008 19:47:31 -0400 Original-Received: from [199.232.76.173] (port=56312 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KVxOk-0005v7-IA for bug-gnu-emacs@gnu.org; Wed, 20 Aug 2008 19:47:30 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:59023) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KVxOj-000749-V2 for bug-gnu-emacs@gnu.org; Wed, 20 Aug 2008 19:47:30 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7KNlRjO030762; Wed, 20 Aug 2008 16:47:27 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m7KNU4d4024869; Wed, 20 Aug 2008 16:30:04 -0700 X-Loop: don@donarmstrong.com Resent-From: "Rosen Diankov" Original-Sender: ffxvzero@gmail.com Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 20 Aug 2008 23:30:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 703 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 703-submit@emacsbugs.donarmstrong.com id=B703.121927449423013 (code B ref 703); Wed, 20 Aug 2008 23:30:03 +0000 Original-Received: (at 703) by emacsbugs.donarmstrong.com; 20 Aug 2008 23:21:34 +0000 Original-Received: from mail-gx0-f14.google.com (mail-gx0-f14.google.com [209.85.217.14]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7KNLTOU022955 for <703@emacsbugs.donarmstrong.com>; Wed, 20 Aug 2008 16:21:31 -0700 Original-Received: by gxk7 with SMTP id 7so320791gxk.1 for <703@emacsbugs.donarmstrong.com>; Wed, 20 Aug 2008 16:21:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=5DR2p8q2dmKFIFZi0mEsslZfdHKx3G8MId94qpTUfA8=; b=iFSZhw4sxALOtKBa9eC5txY0/YQBR0oh7WEyEF4xZJT8GJmQeSbrAF826mz1YT0o+J PzrzUeA0y94HmuB/SBuFbb8aqf2hz4VxRb6H22pSKBdrNnD/0s+ftE7ifZ+mPJRwbS2K Q7T54RRGFeozrliJyo5pOgWYsgLn/vqAYKHmQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=VEzJVP9EZrD6QtBWab9JDZuk4yO242f4uzE4agER+kLQ0gCPkFhJX3ODjzi5MDqOMs 9qY0LoqstimbJ878U8ftcBx0I28B9f/qlN/lbgXief5uTavGvJJ47DRdZJhlTFfcMT// 49iHnxmGpaoDh/ciFTGddDSPOiEZhTguWxORQ= Original-Received: by 10.151.26.12 with SMTP id d12mr953824ybj.246.1219274484467; Wed, 20 Aug 2008 16:21:24 -0700 (PDT) Original-Received: by 10.150.146.20 with HTTP; Wed, 20 Aug 2008 16:21:24 -0700 (PDT) In-Reply-To: <18604.19606.61385.981605@fangorn.hornik.net> Content-Disposition: inline X-Google-Sender-Auth: c374d070353b1081 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Resent-Date: Wed, 20 Aug 2008 19:47:30 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list 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:19580 Archived-At: Hi all, Coming from Matlab, I feel much more comfortable if the single quotes were treated like double quotes (transposing is not as important), and if the comments were aligned to the start of the next line (like the // in C++). Given that a lot of people use Octave as a free alternative to Matlab, I think a lot would expect the same formatting rules as the matlab editor. At least it would be great to expose these options to the user like 'octave-auto-indent' instead of having people hunt through octave-mod.el to get the behavior they want. Rosen, 2008/8/20 Kurt Hornik : >>>>>> Chong Yidong writes: > >> Hi Kurt, >> Could you take a look at this bug report? > >> http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=697 >> http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=703 > >> Thanks. > > Sure. > > I am not quite sure I understand what the issue is. > > Octave mode has never provided syntax support for single quoted strings > because there is no way (short of actually parsing the code) of telling > these apart from single quotes used for transposition. > > The comment style provided by Octave mode is the same as for Lisp mode, > so a single comment char is aligned at the comment column. > > Best > -k > >> 2008/8/11 Rosen Diankov : > >>> The % also messes up formatting when seen in strings, ie >>> 'my value: %d' >>> >>> For some reason, the octave syntax does not recognize that single >>> quotes are strings (it might be because the transpose character is >>> also ' and it is hard to differentiate between a string and the >>> transposing). >>> >>> In any case, writing the above example will treat the % as a comment. >>> The indenting engine will skip the closing parenthesis )... resulting >>> in all the rest of the indents looking like garbage. >>> >> .... >>> >>> In calculate-octave-indent, just delete the entire expression >>> >>> ((looking-at "\\s<\\S<") >>> (setq icol (list comment-column icol))) >>> >>> that forces comments to comment-column (which is 32). Was there a >>> reason for this? > >