GNU bug report logs - #6014
processing of "'" inside Emacs octave-mode

Previous Next

Package: emacs;

Reported by: Pascal Dupuis <Pascal.Dupuis <at> uclouvain.be>

Date: Fri, 23 Apr 2010 13:17:02 UTC

Severity: normal

Done: Stefan Monnier <monnier <at> IRO.UMontreal.CA>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6014 in the body.
You can then email your comments to 6014 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6014; Package emacs. (Fri, 23 Apr 2010 13:17:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Pascal Dupuis <Pascal.Dupuis <at> uclouvain.be>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 23 Apr 2010 13:17:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Pascal Dupuis <Pascal.Dupuis <at> uclouvain.be>
To: Kurt Hornik <Kurt.Hornik <at> wu-wien.ac.at>, bug-gnu-emacs <at> gnu.org
Subject: processing of "'" inside Emacs octave-mode
Date: Fri, 23 Apr 2010 14:56:09 +0200
[Message part 1 (text/plain, inline)]
Emacs  : GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.18.3)
 of 2010-03-26 on palmer, modified by Debian
Package: Emacs version 23.1.1

current state:
==============
(setq
 octave-auto-indent nil
 octave-auto-newline nil
 octave-blink-matching-block t
 octave-block-offset 2
 octave-comment-char 35
 octave-continuation-offset 4
 octave-continuation-string "\\"
 octave-send-echo-input t
 octave-send-line-auto-forward t
 octave-send-show-buffer t
 )

Hello,

I have to interchange programs with collegues working under
MatLab. This implies that I have to use the single quote as string
delimiter. I enclose a simple .m file where MatLab's editor smart
indent feature works OK, but octave-mode chokes on the seventh
line. It considers a brace is opened; this doesn't occur if I use a
double quote instead. Would it be possible to have the single and
double quote treated the same way ?

Regards

Pascal

-- 
Dr. ir. Pascal Dupuis, assistant de recherche / research assistant
U.C.Louvain EPL/ELEC/DICE :  http://www.dice.ucl.ac.be/
Batiment Maxwell; Place du Levant, 3; B-1348 Louvain-la-Neuve Belgium
Tel. +32-10-47 22 74; Fax +32-10-47 25 98
[mysimple.m (text/x-objcsrc, attachment)]

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6014; Package emacs. (Sun, 25 Apr 2010 11:06:01 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Kurt Hornik <Kurt.Hornik <at> wu.ac.at>
To: Pascal Dupuis <Pascal.Dupuis <at> uclouvain.be>
Cc: Kurt Hornik <Kurt.Hornik <at> wu-wien.ac.at>, bug-gnu-emacs <at> gnu.org
Subject: Re: processing of "'" inside Emacs octave-mode
Date: Sun, 25 Apr 2010 09:42:23 +0200
>>>>> Pascal Dupuis writes:

> Emacs  : GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.18.3)
>   of 2010-03-26 on palmer, modified by Debian
> Package: Emacs version 23.1.1

> current state:
> ==============
> (setq
>   octave-auto-indent nil
>   octave-auto-newline nil
>   octave-blink-matching-block t
>   octave-block-offset 2
>   octave-comment-char 35
>   octave-continuation-offset 4
>   octave-continuation-string "\\"
>   octave-send-echo-input t
>   octave-send-line-auto-forward t
>   octave-send-show-buffer t
>   )

> Hello,

> I have to interchange programs with collegues working under
> MatLab. This implies that I have to use the single quote as string
> delimiter. I enclose a simple .m file where MatLab's editor smart
> indent feature works OK, but octave-mode chokes on the seventh
> line. It considers a brace is opened; this doesn't occur if I use a
> double quote instead. Would it be possible to have the single and
> double quote treated the same way ?

Not easily: one would need to emulate the Octave parser which can
distinguish between single quotes for transposition and string
delimiting.  You should really use matlab-mode for such code.

Regards
-k

> Regards

> Pascal

> -- 
> Dr. ir. Pascal Dupuis, assistant de recherche / research assistant
> U.C.Louvain EPL/ELEC/DICE :  http://www.dice.ucl.ac.be/
> Batiment Maxwell; Place du Levant, 3; B-1348 Louvain-la-Neuve Belgium
> Tel. +32-10-47 22 74; Fax +32-10-47 25 98

> ----------------------------------------------------------------------
> x = 'aa';

> for indi = 1:length(x),
>   disp(x(indi));
> end

> x = ['{'];

> for indi = 1:length(x),
>     disp(x(indi));
> end
> y = rand(2, 5);
> x = y.';
> disp(size(x))





Reply sent to Stefan Monnier <monnier <at> IRO.UMontreal.CA>:
You have taken responsibility. (Tue, 31 Aug 2010 13:12:01 GMT) Full text and rfc822 format available.

Notification sent to Pascal Dupuis <Pascal.Dupuis <at> uclouvain.be>:
bug acknowledged by developer. (Tue, 31 Aug 2010 13:12:02 GMT) Full text and rfc822 format available.

Message #13 received at 6014-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Pascal Dupuis <Pascal.Dupuis <at> uclouvain.be>
Cc: Kurt.Hornik <at> wu-wien.ac.at
Subject: Re: bug#6014: processing of "'" inside Emacs octave-mode
Date: Tue, 31 Aug 2010 14:56:01 +0200
> I have to interchange programs with collegues working under
> MatLab. This implies that I have to use the single quote as string
> delimiter. I enclose a simple .m file where MatLab's editor smart
> indent feature works OK, but octave-mode chokes on the seventh
> line. It considers a brace is opened; this doesn't occur if I use a
> double quote instead. Would it be possible to have the single and
> double quote treated the same way ?

The latest code in Emacs's trunk (slated for Emacs-24) handles your
example correctly.  Please try it (it also includes a complete rewrite
of the indentation and navigation code).


        Stefan




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 29 Sep 2010 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 265 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.