From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] let octave-mode understand single-quoted strings Date: Wed, 01 Sep 2010 08:46:58 +0200 Message-ID: References: <4C02D67D.5090302@censorshipresearch.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1283323631 8817 80.91.229.12 (1 Sep 2010 06:47:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 1 Sep 2010 06:47:11 +0000 (UTC) Cc: Daniel Colascione , Emacs development discussions To: Jordi =?iso-8859-1?Q?Guti=E9rrez?= Hermoso Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 01 08:47:09 2010 Return-path: Envelope-to: ged-emacs-devel@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 1Oqh6D-0000p1-9Y for ged-emacs-devel@m.gmane.org; Wed, 01 Sep 2010 08:47:09 +0200 Original-Received: from localhost ([127.0.0.1]:53530 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oqh6C-0007WU-Q3 for ged-emacs-devel@m.gmane.org; Wed, 01 Sep 2010 02:47:08 -0400 Original-Received: from [140.186.70.92] (port=38123 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oqh66-0007VZ-0n for emacs-devel@gnu.org; Wed, 01 Sep 2010 02:47:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oqh64-0004Xe-RX for emacs-devel@gnu.org; Wed, 01 Sep 2010 02:47:01 -0400 Original-Received: from impaqm4.telefonica.net ([213.4.138.4]:61438) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oqh64-0004XX-Ib for emacs-devel@gnu.org; Wed, 01 Sep 2010 02:47:00 -0400 Original-Received: from IMPmailhost3.adm.correo ([10.20.102.124]) by IMPaqm4.telefonica.net with bizsmtp id 1Hlh1f00U2h2L9m3QJmzxb; Wed, 01 Sep 2010 08:46:59 +0200 Original-Received: from ceviche.home ([83.40.7.141]) by IMPmailhost3.adm.correo with BIZ IMP id 1Jmy1f00432ZxvX1jJmy4a; Wed, 01 Sep 2010 08:46:59 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="monnier$movistar.es" |auth_email="monnier@movistar.es" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" Original-Received: by ceviche.home (Postfix, from userid 20848) id 30BB4660DF; Wed, 1 Sep 2010 08:46:58 +0200 (CEST) In-Reply-To: ("Jordi =?iso-8859-1?Q?Guti=E9rrez?= Hermoso"'s message of "Tue, 31 Aug 2010 16:15:39 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:129536 Archived-At: >> I'm not familiar with Octave, so your code might be more correct in >> some cases, OTOH my code handles multi-line strings. Do you think we >> should try and get the best of both worlds, or should we replace my >> code with yours, or should we just stick with my code? > Daniel's code is correct in several cases I tried, so I would > recommend it. I don't know what you may have done with multiline > strings, but they seem to work just as well. IIUC Daniel's code, his multiline strings will only work if font-lock happens to fontify the whole string at a time. If it only needs to update a single line (e.g. when you edit the first or last line of a multiline single-quoted string), it will forget that it's a string (I think it may even lead to nasty misfontifications where the rest of the text gets fontified as a string). > Of course it would be nice if both features worked. That's definitely doable. Tho if multiline strings are very rare and are discouraged/deprecated, it might not be worth the trouble. > Octave mode still requires a lot of work in other directions. Octave > syntax has been enriched somewhat since the mode was first written. > With time I may be able to provide these necessary patches myself. Please check the new code in Emacs's trunk (uses the new SMIE package to do the navigation and indentation) and report any missing feature (with patch if you can: hopefully the new code makes it easier). Stefan