Hi Eric,

now that I understand a bit more how tab completion works in 
matlab-emacs, I found a fix for a little bug/feature which had annoyed 
me for some time:
For example, I would like to open a saved figure from file Fig1.fig
In the matlab shell buffer, if I type
open Fig1<tab>
I get the correct completions (Fig1 and Fig1.fig)

If I type
open Fig1.<tab>
[note the extra dot]
then I get the completion
open Fig1.Fig1.fig

The same happens when completing any directory or file name which 
contains a ".".

I found that removing the "." character from the regexp in line 4963 of 
matlab.el fixes this for me. (There might be some unkown side effects, 
though.)

Below is the patch.

--- /home/henrik/tmp/matlab-emacs/matlab-emacs/matlab.el 2014-11-13 
16:09:31.651487062 +0000
+++ matlab.el   2014-11-14 17:37:39.202090667 +0000
@@ -4960,7 +4960,7 @@
               (limitpos nil))
          ;; search for character which limits completion, and limit 
command to it
          (setq limitpos
-              (if (string-match ".*\\([( /[.,;=']\\)" lastcmd)
+              (if (string-match ".*\\([( /[,;=']\\)" lastcmd)
                    (1+ (match-beginning 1))
                  0))
          (setq lastcmd (substring lastcmd limitpos))


Henrik

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Matlab-emacs-discuss mailing list
Matlab-emacs-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matlab-emacs-discuss

Reply via email to