Hoo boy. That’s a hairy one. The code for navigating over a string is good,
and over if/end type constructs and [arrays of symbols] is all good, but I
don’t have anything for concatenated strings yet. The current code for
skipping a sexp gets confused if there are [] in the string being skipped
inside the brackets.
I’m sure it could be brute-forced with enough time, but it’ll be messy. ;)
Eric
From: Hunter McClelland [mailto:hunter.mcclell...@gmail.com]
Sent: Thursday, October 02, 2014 8:01 PM
To: Eric Ludlam
Cc: matlab-emacs-discuss@lists.sourceforge.net
Subject: Re: [Matlab-emacs-discuss] Bug in auto-filling strings
Hi Eric,
That fixed some of the errors, but I can still find bugs. For example, take
the m-file:
foo = 'correct';
disp(['this is a ', foo, 'string']);
Put your cursor at the end of the 2nd line, change fill column to 18, and put a
space. Mine results in:
foo = 'correct';
disp(['this is ' ...
'a '], foo, 'string']);
which has an extra ] and is a syntax error.
This is definitely not an urgent issue, so take your time. Let me know what
else I can do to help! I really appreciate your code, and enjoy contributing
to good free software.
Thanks,
-Hunter
On Tue, Sep 23, 2014 at 9:47 AM, Eric Ludlam
<eric.lud...@mathworks.com<mailto:eric.lud...@mathworks.com>> wrote:
Hi Hunter,
I made a small change to how strings are auto-filled that I think better covers
several variants of pre-existing [] around the string. I submitted the change
to the CVS repository on sourceforge. Could you try it out and let me know how
it goes?
Thanks
Eric
From: Hunter McClelland
[mailto:hunter.mcclell...@gmail.com<mailto:hunter.mcclell...@gmail.com>]
Sent: Friday, September 19, 2014 12:08 PM
To:
matlab-emacs-discuss@lists.sourceforge.net<mailto:matlab-emacs-discuss@lists.sourceforge.net>
Subject: [Matlab-emacs-discuss] Bug in auto-filling strings
Hello developers,
This is a bug report for matlab-mode (I hope this is the right place to submit
these?)
I'm using version 3.3.2
When I'm editing a file in MATLAB mode, I found a bug in how the auto-fill
works, an example is below.
0) open some m-file in matlab mode
1) set your fill column to 40 (c-x f 40)
2) create the line: "disp(['this is a , foo, ' string']);"
3) change fill column to 32 (c-x f 32)
4) put a space after the line, causing it to auto fill. Mine now reads:
disp(['This is a ', foo, [' ' ...
'string']);
The bug is that there are now two opening "[" but only one closing "]" and this
is a syntax error.
I can produce other similarly syntax errors auto-filling with different
fill-columns, so something is buggy in how the auto-fill is working.
I like MATLAB mode a lot, thank you for great software!
-Hunter
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Matlab-emacs-discuss mailing list
Matlab-emacs-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matlab-emacs-discuss