all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#6014: processing of "'" inside Emacs octave-mode
@ 2010-04-23 12:56 Pascal Dupuis
  2010-04-25  7:42 ` Kurt Hornik
  2010-08-31 12:56 ` Stefan Monnier
  0 siblings, 2 replies; 3+ messages in thread
From: Pascal Dupuis @ 2010-04-23 12:56 UTC (permalink / raw)
  To: Kurt.Hornik, 6014

[-- Attachment #1: Type: text/plain, Size: 1162 bytes --]

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: mysimple.m --]
[-- Type: text/x-objcsrc; name="mysimple.m", Size: 154 bytes --]

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))

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#6014: processing of "'" inside Emacs octave-mode
  2010-04-23 12:56 bug#6014: processing of "'" inside Emacs octave-mode Pascal Dupuis
@ 2010-04-25  7:42 ` Kurt Hornik
  2010-08-31 12:56 ` Stefan Monnier
  1 sibling, 0 replies; 3+ messages in thread
From: Kurt Hornik @ 2010-04-25  7:42 UTC (permalink / raw)
  To: Pascal Dupuis; +Cc: Kurt Hornik, bug-gnu-emacs

>>>>> 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))







^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#6014: processing of "'" inside Emacs octave-mode
  2010-04-23 12:56 bug#6014: processing of "'" inside Emacs octave-mode Pascal Dupuis
  2010-04-25  7:42 ` Kurt Hornik
@ 2010-08-31 12:56 ` Stefan Monnier
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2010-08-31 12:56 UTC (permalink / raw)
  To: Pascal Dupuis; +Cc: Kurt.Hornik

> 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





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-08-31 12:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-23 12:56 bug#6014: processing of "'" inside Emacs octave-mode Pascal Dupuis
2010-04-25  7:42 ` Kurt Hornik
2010-08-31 12:56 ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.