You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
|
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(9) |
Jun
(1) |
Jul
(1) |
Aug
(3) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
2009 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
(2) |
Jun
(1) |
Jul
(7) |
Aug
(1) |
Sep
(5) |
Oct
|
Nov
(6) |
Dec
(3) |
2010 |
Jan
|
Feb
(10) |
Mar
(12) |
Apr
(13) |
May
(2) |
Jun
(4) |
Jul
(4) |
Aug
(4) |
Sep
|
Oct
(4) |
Nov
(2) |
Dec
(4) |
2011 |
Jan
(11) |
Feb
|
Mar
(18) |
Apr
|
May
(1) |
Jun
(12) |
Jul
(10) |
Aug
(4) |
Sep
(4) |
Oct
(5) |
Nov
|
Dec
(10) |
2012 |
Jan
(4) |
Feb
(26) |
Mar
|
Apr
(1) |
May
|
Jun
(8) |
Jul
(3) |
Aug
(1) |
Sep
|
Oct
(14) |
Nov
(1) |
Dec
(2) |
2013 |
Jan
(5) |
Feb
(2) |
Mar
(2) |
Apr
(5) |
May
(3) |
Jun
|
Jul
(8) |
Aug
(4) |
Sep
|
Oct
(7) |
Nov
(2) |
Dec
(7) |
2014 |
Jan
(14) |
Feb
|
Mar
(6) |
Apr
|
May
(3) |
Jun
(2) |
Jul
(4) |
Aug
(3) |
Sep
(7) |
Oct
(9) |
Nov
(9) |
Dec
(5) |
2015 |
Jan
(2) |
Feb
(1) |
Mar
|
Apr
(2) |
May
(1) |
Jun
(10) |
Jul
(3) |
Aug
(4) |
Sep
(8) |
Oct
(1) |
Nov
(3) |
Dec
(3) |
2016 |
Jan
(12) |
Feb
(59) |
Mar
(23) |
Apr
(11) |
May
(4) |
Jun
(15) |
Jul
|
Aug
|
Sep
(9) |
Oct
(19) |
Nov
(12) |
Dec
(5) |
2017 |
Jan
(1) |
Feb
(5) |
Mar
(5) |
Apr
|
May
(2) |
Jun
|
Jul
(5) |
Aug
|
Sep
(3) |
Oct
(12) |
Nov
(15) |
Dec
|
2018 |
Jan
(7) |
Feb
(6) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
(3) |
Aug
(2) |
Sep
(2) |
Oct
(4) |
Nov
|
Dec
|
2019 |
Jan
(2) |
Feb
(9) |
Mar
(4) |
Apr
(9) |
May
(1) |
Jun
(1) |
Jul
(1) |
Aug
(3) |
Sep
|
Oct
(2) |
Nov
(6) |
Dec
(5) |
2020 |
Jan
(9) |
Feb
|
Mar
(2) |
Apr
|
May
(1) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
(3) |
Nov
(28) |
Dec
(5) |
2021 |
Jan
(11) |
Feb
(2) |
Mar
(2) |
Apr
(2) |
May
(15) |
Jun
(9) |
Jul
(11) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
|
Dec
(3) |
2022 |
Jan
(1) |
Feb
|
Mar
|
Apr
(9) |
May
(1) |
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
(12) |
May
(4) |
Jun
|
Jul
(22) |
Aug
(3) |
Sep
|
Oct
(1) |
Nov
|
Dec
(14) |
2024 |
Jan
|
Feb
|
Mar
|
Apr
(17) |
May
(35) |
Jun
(1) |
Jul
(18) |
Aug
(31) |
Sep
(5) |
Oct
(18) |
Nov
(20) |
Dec
(9) |
2025 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
(1) |
Jul
(5) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Eric L. <Eri...@ma...> - 2012-02-22 14:17:00
|
Hi Robert, Everything in the menu can be accessed via M-x. The menus is just a handy way to see some common features. You can use M-x customize-group RET matlab RET to see all the various options available. The per-buffer options are a little trickier. For ends, you can force the menu call with matlab-toggle-functions-have-end. The others you can just set the global value via customize above. The tracking of having ends is actually a minor-mode, and not a variable because it is tied into some complex logic that deals with indenting function bodies, indenting nested functions, and some other stuff I don't remember. Hopefully that will help you build the environment you want. Eric -----Original Message----- From: rl...@kn... [mailto:rl...@kn...] Sent: Monday, February 13, 2012 7:29 PM To: Eric Ludlam Cc: mat...@li... Subject: Re: [Matlab-emacs-discuss] Handling of function end statement in matlab-mode Eric Ludlam writes: > When a MATLAB file is first pulled into a buffer, it scans it to see if you > have END at the end of all your functions or not. If the topmost function > fails to have one, it remembers that, and treats the new end you write as > unstarted. > > If you go into the menu, you can toggle the value for each buffer. The next ^^^^^^^^^^^^^^^^^^^^^^^ > time you load in that buffer, it should get it right. That may be my problem. I use no menus at all. What am I losing as a result? > Also, the first time you type an end, it should ask if you want to switch the > value so that functions have ends. Definitely does not do that. What is the relevant variable? > I'm not sure why it didn't ask you about > that. > > Eric > > -----Original Message----- > From: Robert Knighten [mailto:rl...@kn...] > Sent: Monday, February 13, 2012 2:28 AM > To: mat...@li... > Subject: [Matlab-emacs-discuss] Handling of function end statement in matlab-mode > > A fair amount of my Matlab code has multiple nested functions and so each of > them must be terminated with an end statement, but when I type the end for the > outermost function the message "Unstarted block at cursor." is displayed and > when I go to save the file the message "Unstarted block. Continue anyway?(y > or n)" is displayed and must be answered. > > This seems to be a bug, right? > > -- Bob > > -- > Robert L. Knighten > RL...@kn... > > ------------------------------------------------------------------------------ > Try before you buy = See our experts in action! > The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-dev2 > _______________________________________________ > Matlab-emacs-discuss mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matlab-emacs-discuss > -- Robert L. Knighten RL...@kn... |
From: Uwe B. <ou...@ma...> - 2012-02-18 15:24:40
|
Hello The culprit for me is page-delimiter setting of matlab: (setq page-delimiter "^\\(\f\\|%% \\)") So the following simple solutions solves my problem: (defun matlab-shell-run-cell () "Run the cell the cursor is in." (interactive) (let ((page-delimiter "^%%")) (let ((start (save-excursion (forward-page -1) (if (looking-at "function") (error "You are not in a cell. Try `matlab-shell-save-and-go' instead")) (when (matlab-ltype-comm) ;; Skip over starting comment from the current cell. (matlab-end-of-command 1) (end-of-line) (forward-char 1)) (point))) (end (save-excursion (forward-page 1) (when (matlab-ltype-comm) (beginning-of-line) (forward-char -1)) (point)))) (matlab-shell-run-region start end)))) |
From: Uwe B. <ou...@ma...> - 2012-02-18 15:16:32
|
Hello Below you find a test file which works fine in built in editor: --8<------------------------schnipp------------------------->8--- %% hallo %% disp('again') y=8 %% z=8--8 <------------------------schnapp------------------------->8--- when running on the first cell matlab complains about hallo not being known, when running about the second cell everything works fine. As I mentioned in an earlier mail, matlab-shell-run-region works in the current version contra intuitive. I don't know whether the patch I sent was accepted. In any case when I use matlab-shell-run-cell then matlab-run-shell-region runs over the *whole* file (GNU emacs 23.1 or Xemacs 21.5.31 Mule) I debugged matlab-shell-run-cell: The reason is the bizarre (forward-page -1) which jumps to the beginning of the buffer Before I start to experiment with the code: - What is the purpose of the forward-page code? - What is your opinion about the behaviour of matlab-shell-run-region? (defun matlab-shell-run-cell () "Run the cell the cursor is in." (interactive) (let ((start (save-excursion (forward-page -1) (if (looking-at "function") (error "You are not in a cell. Try `matlab-shell-save-and-go' instead")) (when (matlab-ltype-comm) ;; Skip over starting comment from the current cell. (matlab-end-of-command 1) (end-of-line) (forward-char 1)) (point))) (end (save-excursion (forward-page 1) (when (matlab-ltype-comm) (beginning-of-line) (forward-char -1)) (point)))) (matlab-shell-run-region start end))) |
From: Dan B. <db...@gm...> - 2012-02-15 20:53:39
|
(I also posted this question on Stackoverflow, so feel free to answer there if you like) I'm running emacs 23.4 on OSX, obtained from emacsformacosx.com. I'm writing matlab code, using the latest code from matlab-emacs.sourceforge.net. I can set breakpoints and step through matlab code with no problems. However, when I set breakpoints, no "stop-sign" icon appears next to the lines that have breakpoints. The arrow icon indicating the line on which you are stopped *does* appear. I've seen emacs screenshots online that show stop-sign icons, but I can't find any GUD documentation on this. How can I get these icons to appear? Is this a problem with matlab-mode, or something in my setup? Thanks, Dan -- Dan Becker |
From: <rl...@kn...> - 2012-02-14 00:29:22
|
Eric Ludlam writes: > When a MATLAB file is first pulled into a buffer, it scans it to see if you > have END at the end of all your functions or not. If the topmost function > fails to have one, it remembers that, and treats the new end you write as > unstarted. > > If you go into the menu, you can toggle the value for each buffer. The next ^^^^^^^^^^^^^^^^^^^^^^^ > time you load in that buffer, it should get it right. That may be my problem. I use no menus at all. What am I losing as a result? > Also, the first time you type an end, it should ask if you want to switch the > value so that functions have ends. Definitely does not do that. What is the relevant variable? > I'm not sure why it didn't ask you about > that. > > Eric > > -----Original Message----- > From: Robert Knighten [mailto:rl...@kn...] > Sent: Monday, February 13, 2012 2:28 AM > To: mat...@li... > Subject: [Matlab-emacs-discuss] Handling of function end statement in matlab-mode > > A fair amount of my Matlab code has multiple nested functions and so each of > them must be terminated with an end statement, but when I type the end for the > outermost function the message "Unstarted block at cursor." is displayed and > when I go to save the file the message "Unstarted block. Continue anyway?(y > or n)" is displayed and must be answered. > > This seems to be a bug, right? > > -- Bob > > -- > Robert L. Knighten > RL...@kn... > > ------------------------------------------------------------------------------ > Try before you buy = See our experts in action! > The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-dev2 > _______________________________________________ > Matlab-emacs-discuss mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matlab-emacs-discuss > -- Robert L. Knighten RL...@kn... |
From: Uwe B. <ou...@ma...> - 2012-02-13 14:10:21
|
>> On Sun, 12 Feb 2012 17:20:26 +0000, Eric Ludlam <Eri...@ma...> wrote: Hi Eric, > Hi Uwe, It seems an earlier message did not make it to the list. > I can't run matlab-shell at the moment to help answer the question, > but I'm confused as to what you are expecting. In your example, of > the cursor is on line 2, run cell should only run x=8. If your cursor > is on the line for y=91, it should only run that. I tried the parsing > bit of matlab-shell-run-cell without executing the code, and it seemed > to work as expected for me. Are you seeing some other behavior? Yes but the reason is the behaviour of matlab-shell-run-region. The issue is the cell line contains naturally %% and then the current implementation of matlab-shell-run-region just ignores the lines of that cell. If I follow the advice as expressed in the message: Bug in matlab-shell-run-region ,---- | Hello All, | | I just bumped into something looking suspiciously like a bug. | | symptoms: | while running matlab-shell-run-region over matlab code including | comments, all the code followed by the commented line is no executed. | | causes: | In the definition 'matlab-shell-run-region @ matlab.el, while creating | the 'command binding, there is a 'while loop labeled as ;; HACK FOR | NOSHOW whose action is to replace '\n' by ',' regardless of the present | line being or not a comment. | | aesthetic considerations: | I do prefer to see the lines ran in the prompt as they were layered out | by me in the code file. I can understand some people might wish to | completely remove those lines from the matlab-shell buffer; that would | certainly be another effort, different from simply concatenating | everything in a big one-liner... | | | the cure: | Just comment the hack code... | `---- then the problem which occurs in matlab-shell-run-cell disappears! That is the culprit is the the code ;; HACK FOR NOSHOW (while (string-match "\n" str) (setq str (replace-match ", " t t str))) Which I commented out! I strongly recommend to modify matlab-shell-run-region and to remove that code or define a variable (defvar matlab-shell-run-no-show nil *Variable which defines whether to replace '\n' by ',' regardless of the present line being or not a comment.) So matlab-shell-run-region should look like: (defun matlab-shell-run-region (beg end) "Run region from BEG to END and display result in MATLAB shell. This command requires an active MATLAB shell." (interactive "r") (if (> beg end) (let (mid) (setq mid beg beg end end mid))) (let ((command (let ((str (concat (buffer-substring-no-properties beg end) "\n"))) (while (string-match "\n\\s-*\n" str) (setq str (concat (substring str 0 (match-beginning 0)) "\n" (substring str (match-end 0))))) ;; HACK FOR NOSHOW (if matlab-shell-run-no-show (while (string-match "\n" str) (setq str (replace-match ", " t t str)))) (setq str (concat str "\n")) str)) (msbn nil) (lastcmd) (inhibit-field-text-motion t)) (if (matlab-with-emacs-link) ;; Run the region w/ Emacs Link (matlab-eei-eval-region beg end) (save-excursion (setq msbn (matlab-shell-buffer-barf-not-running)) (set-buffer msbn) (if (not (matlab-on-prompt-p)) (error "MATLAB shell must be non-busy to do that")) ;; Save the old command (beginning-of-line) (re-search-forward comint-prompt-regexp) (setq lastcmd (buffer-substring (point) (matlab-point-at-eol))) (delete-region (point) (matlab-point-at-eol)) ;; We are done error checking, run the command. (matlab-shell-send-string command) (insert lastcmd)) (set-buffer msbn) (goto-char (point-max)) (display-buffer msbn)) )) But I leave it up to you and others to decide..... Uwe |
From: Eric L. <Eri...@ma...> - 2012-02-13 13:55:31
|
When a MATLAB file is first pulled into a buffer, it scans it to see if you have END at the end of all your functions or not. If the topmost function fails to have one, it remembers that, and treats the new end you write as unstarted. If you go into the menu, you can toggle the value for each buffer. The next time you load in that buffer, it should get it right. Also, the first time you type an end, it should ask if you want to switch the value so that functions have ends. I'm not sure why it didn't ask you about that. Eric -----Original Message----- From: Robert Knighten [mailto:rl...@kn...] Sent: Monday, February 13, 2012 2:28 AM To: mat...@li... Subject: [Matlab-emacs-discuss] Handling of function end statement in matlab-mode A fair amount of my Matlab code has multiple nested functions and so each of them must be terminated with an end statement, but when I type the end for the outermost function the message "Unstarted block at cursor." is displayed and when I go to save the file the message "Unstarted block. Continue anyway?(y or n)" is displayed and must be answered. This seems to be a bug, right? -- Bob -- Robert L. Knighten RL...@kn... ------------------------------------------------------------------------------ Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 _______________________________________________ Matlab-emacs-discuss mailing list Mat...@li... https://lists.sourceforge.net/lists/listinfo/matlab-emacs-discuss |
From: Eric L. <Eri...@ma...> - 2012-02-13 13:52:16
|
Yes, the $$$ are normal. They are still there from the previous author before I adopted the project. I think they are there to distinguish a sort of temporary comment from real comments, making them easy to remove. You can experiment with the value of matlab-comment-region-s to make it whatever you want. Eric From: Yakir Gagnon [mailto:12....@gm...] Sent: Sunday, February 12, 2012 12:42 PM To: Eric Ludlam Cc: mat...@li... Subject: Re: [Matlab-emacs-discuss] commenting Yes! That worked, but I get 3 $ signs after the % symbol. is that normal? % $$$ somecode Thanks ! Yakir Gagnon cell +1 919 886 3877 office +1 919 684 7188 Johnsen Lab Biology Department Box 90338 Duke University Durham, NC 27708 BioSci Building Room 307 http://fds.duke.edu/db/aas/Biology/postdoc/yg32 http://www.biology.duke.edu/johnsenlab/people/yakir.html On Sun, Feb 12, 2012 at 12:24 PM, Eric Ludlam <Eri...@ma...<mailto:Eri...@ma...>> wrote: Hi Yakir, For me, M-; is supposed to add comments to the end of a line, as it does with other languages. M-: is "eval" in Emacs, and not related to comments. In matlab-mode, C-c ; and C-c : will comment and uncomment a region, and I tried them, and they still work for me. Is that what you were expecting? Eric From: Yakir Gagnon [mailto:12....@gm...<mailto:12....@gm...>] Sent: Sunday, February 05, 2012 1:34 PM To: mat...@li...<mailto:mat...@li...> Subject: [Matlab-emacs-discuss] commenting Hi all, I'm new to emacs and matlab-mode. My problem is that I can't seem to comment and unncomment lines or regions in an m file while in MATLAB Fill (which I assume is the matlab mode) using emacs (GNU Emacs 23.3.1) on ubuntu (11.10) by pressing M-;. all that happens is that a % sign shows up at the ens of the line. If the line was already commented, pressing M-: doesn't do anything (neither selecting the uncomment option from the menu). My .emacs file has only these 2 lines: (add-to-list 'load-path "~/.emacs.d/matlab-emacs/") (require 'matlab-load) I hope this is silly and basic, thanks in advance for any help!!! Yakir Gagnon cell +1 919 886 3877<tel:%2B1%20919%20886%203877> office +1 919 684 7188<tel:%2B1%20919%20684%207188> Johnsen Lab Biology Department Box 90338 Duke University Durham, NC 27708 BioSci Building Room 307 http://fds.duke.edu/db/aas/Biology/postdoc/yg32 http://www.biology.duke.edu/johnsenlab/people/yakir.html |
From: Robert K. <rl...@kn...> - 2012-02-13 07:51:21
|
A fair amount of my Matlab code has multiple nested functions and so each of them must be terminated with an end statement, but when I type the end for the outermost function the message "Unstarted block at cursor." is displayed and when I go to save the file the message "Unstarted block. Continue anyway?(y or n)" is displayed and must be answered. This seems to be a bug, right? -- Bob -- Robert L. Knighten RL...@kn... |
From: Yakir G. <12....@gm...> - 2012-02-12 17:41:51
|
Yes! That worked, but I get 3 $ signs after the % symbol. is that normal? % $$$ somecode Thanks ! Yakir Gagnon cell +1 919 886 3877 office +1 919 684 7188 Johnsen Lab Biology Department Box 90338 Duke University Durham, NC 27708 BioSci Building Room 307 http://fds.duke.edu/db/aas/Biology/postdoc/yg32 http://www.biology.duke.edu/johnsenlab/people/yakir.html On Sun, Feb 12, 2012 at 12:24 PM, Eric Ludlam <Eri...@ma...>wrote: > Hi Yakir,**** > > ** ** > > For me, M-; is supposed to add comments to the end of a line, as it does > with other languages. M-: is “eval” in Emacs, and not related to comments. > **** > > ** ** > > In matlab-mode, C-c ; and C-c : will comment and uncomment a region, and > I tried them, and they still work for me. Is that what you were expecting? > **** > > ** ** > > Eric**** > > ** ** > > *From:* Yakir Gagnon [mailto:12....@gm...] > *Sent:* Sunday, February 05, 2012 1:34 PM > *To:* mat...@li... > *Subject:* [Matlab-emacs-discuss] commenting**** > > ** ** > > Hi all,**** > > I'm new to emacs and matlab-mode. **** > > My problem is that I can't seem to comment and unncomment lines or regions > in an m file while in MATLAB Fill (which I assume is the matlab mode) using > emacs (GNU Emacs 23.3.1) on ubuntu (11.10) by pressing M-;. all that > happens is that a % sign shows up at the ens of the line. If the line was > already commented, pressing M-: doesn't do anything (neither selecting the > uncomment option from the menu). **** > > My .emacs file has only these 2 lines:**** > > (add-to-list 'load-path "~/.emacs.d/matlab-emacs/") **** > > (require 'matlab-load) **** > > I hope this is silly and basic, thanks in advance for any help!!! **** > > ** ** > > Yakir Gagnon > cell +1 919 886 3877 > office +1 919 684 7188 > Johnsen Lab > Biology Department > Box 90338 > Duke University > Durham, NC 27708 > BioSci Building > Room 307 > http://fds.duke.edu/db/aas/Biology/postdoc/yg32 > http://www.biology.duke.edu/johnsenlab/people/yakir.html**** > |
From: Eric L. <Eri...@ma...> - 2012-02-12 17:24:18
|
Hi Yakir, For me, M-; is supposed to add comments to the end of a line, as it does with other languages. M-: is "eval" in Emacs, and not related to comments. In matlab-mode, C-c ; and C-c : will comment and uncomment a region, and I tried them, and they still work for me. Is that what you were expecting? Eric From: Yakir Gagnon [mailto:12....@gm...] Sent: Sunday, February 05, 2012 1:34 PM To: mat...@li... Subject: [Matlab-emacs-discuss] commenting Hi all, I'm new to emacs and matlab-mode. My problem is that I can't seem to comment and unncomment lines or regions in an m file while in MATLAB Fill (which I assume is the matlab mode) using emacs (GNU Emacs 23.3.1) on ubuntu (11.10) by pressing M-;. all that happens is that a % sign shows up at the ens of the line. If the line was already commented, pressing M-: doesn't do anything (neither selecting the uncomment option from the menu). My .emacs file has only these 2 lines: (add-to-list 'load-path "~/.emacs.d/matlab-emacs/") (require 'matlab-load) I hope this is silly and basic, thanks in advance for any help!!! Yakir Gagnon cell +1 919 886 3877 office +1 919 684 7188 Johnsen Lab Biology Department Box 90338 Duke University Durham, NC 27708 BioSci Building Room 307 http://fds.duke.edu/db/aas/Biology/postdoc/yg32 http://www.biology.duke.edu/johnsenlab/people/yakir.html |
From: Eric L. <Eri...@ma...> - 2012-02-12 17:20:34
|
Hi Uwe, I can't run matlab-shell at the moment to help answer the question, but I'm confused as to what you are expecting. In your example, of the cursor is on line 2, run cell should only run x=8. If your cursor is on the line for y=91, it should only run that. I tried the parsing bit of matlab-shell-run-cell without executing the code, and it seemed to work as expected for me. Are you seeing some other behavior? Eric -----Original Message----- From: Uwe Brauer [mailto:ou...@ma...] Sent: Wednesday, February 08, 2012 10:55 AM To: matlab-emacs Subject: [Matlab-emacs-discuss] resend:matlab-shell-run-cell can only run one cell, narrow-to-region Hello I am sorry that I missed the change to the new list. Here is a copy of an email I just sent to the old list (and to Eric) I tested this in GNU emacs Xemacs 21.5.31 and Xemacs 21.4.21: matlab-shell-run-cell can only run one cell, all others cells below are ignored: the cells of the following example ,---- | %% | x=8 | | | %% | y=91 | `---- Are executed in the built in editor but in all the Emacsen I tested only x=8 is executed, the other command is ignored which is odd. The only solution consists to use narrow-to-region for a cell and then use the function: matlab-shell-run-cell. So I presume the function should be modfied. I tried that but I can't get narrow-to-region (narrow-to-region start end) to work: (defun matlab-shell-run-cell () "Run the cell the cursor is in." (interactive) (let ((start (save-excursion (forward-page -1) (if (looking-at "function") (error "You are not in a cell. Try `matlab-shell-save-and-go' instead")) (when (matlab-ltype-comm) ;; Skip over starting comment from the current cell. (matlab-end-of-command 1) (end-of-line) (forward-char 1)) (point))) (end (save-excursion (forward-page 1) (when (matlab-ltype-comm) (beginning-of-line) (forward-char -1)) (point)))) (save-restriction (progn (narrow-to-region start end) (matlab-shell-run-region start end))))) Uwe Brauer ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ Matlab-emacs-discuss mailing list Mat...@li... https://lists.sourceforge.net/lists/listinfo/matlab-emacs-discuss |
From: Uwe B. <ou...@ma...> - 2012-02-08 16:22:16
|
>> On Wed, 08 Feb 2012 16:55:22 +0100, Uwe Brauer <uwe...@ma...> wrote: > I tested this in GNU emacs Xemacs 21.5.31 and Xemacs > 21.4.21: > matlab-shell-run-cell can only run one cell, all others > cells below are ignored: > the cells of the following example If I follow the advice as expressed in the message: Bug in matlab-shell-run-region then the problem which occurs in matlab-shell-run-cell. I strongly recommend to modify matlab-shell-run-region! Uwe Brauer |
From: Uwe B. <ou...@ma...> - 2012-02-08 15:55:39
|
Hello I am sorry that I missed the change to the new list. Here is a copy of an email I just sent to the old list (and to Eric) I tested this in GNU emacs Xemacs 21.5.31 and Xemacs 21.4.21: matlab-shell-run-cell can only run one cell, all others cells below are ignored: the cells of the following example ,---- | %% | x=8 | | | %% | y=91 | `---- Are executed in the built in editor but in all the Emacsen I tested only x=8 is executed, the other command is ignored which is odd. The only solution consists to use narrow-to-region for a cell and then use the function: matlab-shell-run-cell. So I presume the function should be modfied. I tried that but I can't get narrow-to-region (narrow-to-region start end) to work: (defun matlab-shell-run-cell () "Run the cell the cursor is in." (interactive) (let ((start (save-excursion (forward-page -1) (if (looking-at "function") (error "You are not in a cell. Try `matlab-shell-save-and-go' instead")) (when (matlab-ltype-comm) ;; Skip over starting comment from the current cell. (matlab-end-of-command 1) (end-of-line) (forward-char 1)) (point))) (end (save-excursion (forward-page 1) (when (matlab-ltype-comm) (beginning-of-line) (forward-char -1)) (point)))) (save-restriction (progn (narrow-to-region start end) (matlab-shell-run-region start end))))) Uwe Brauer |
From: Yakir G. <12....@gm...> - 2012-02-05 18:34:04
|
Hi all, I'm new to emacs and matlab-mode. My problem is that I can't seem to comment and unncomment lines or regions in an m file while in MATLAB Fill (which I assume is the matlab mode) using emacs (GNU Emacs 23.3.1) on ubuntu (11.10) by pressing M-;. all that happens is that a % sign shows up at the ens of the line. If the line was already commented, pressing M-: doesn't do anything (neither selecting the uncomment option from the menu). My .emacs file has only these 2 lines: (add-to-list 'load-path "~/.emacs.d/matlab-emacs/") (require 'matlab-load) I hope this is silly and basic, thanks in advance for any help!!! Yakir Gagnon cell +1 919 886 3877 office +1 919 684 7188 Johnsen Lab Biology Department Box 90338 Duke University Durham, NC 27708 BioSci Building Room 307 http://fds.duke.edu/db/aas/Biology/postdoc/yg32 http://www.biology.duke.edu/johnsenlab/people/yakir.html |
From: Eric L. <Eri...@ma...> - 2012-01-24 14:38:17
|
Hi, I don't think I ever tried any OO programming with matlab-shell yet. I have some thoughts but not a lot of time to code this morning. Do you mind trying out a few things? In matlab.el, around line 4600 is the regexp that parses errors and turns them into urls that can be sent to matlab to open the file. You will see that the regexp at the beginning of line 2 has a bunch of characters that are expected in the file name. I'm guessing we need to add ">" to that. Hopefully when emacs converts it to an "openline" call, openline will be able to interpret the object syntax. I suppose trying: openline("MyClass>MyClass",47) in the shell would let you know that. The two syntaxes will need to eventually match. Eric From: Jeff Cen [mailto:jef...@ya...] Sent: Monday, January 23, 2012 11:41 PM To: mat...@li... Subject: [Matlab-emacs-discuss] link on error not working as expected Hi, everyone, I found the link on error inside the matlab shell seemed not to work as expected. For example, when I run a selected region in a matab script that calls MyClass, which has an error in method1, the matlab shell shows an error message like below Error in ==> MyClass>MyClass.method1 at 47 Then I click return with cursor on this error message line and expect emacs to bring up MyClass.m in a buffer and leave the cursor at line 47. However emacs opens an empty buffer named as MyClass instead. I wonder if you have encountered a similar issue and have a way to solve this problem. The environment I found this problem is emacs 23.2, matlab 2011a, linux 64bit and the latest matlab mode. Thanks a lot Jeff |
From: Jeff C. <jef...@ya...> - 2012-01-24 04:40:46
|
Hi, everyone, I found the link on error inside the matlab shell seemed not to work as expected. For example, when I run a selected region in a matab script that calls MyClass, which has an error in method1, the matlab shell shows an error message like below Error in ==> MyClass>MyClass.method1 at 47 Then I click return with cursor on this error message line and expect emacs to bring up MyClass.m in a buffer and leave the cursor at line 47. However emacs opens an empty buffer named as MyClass instead. I wonder if you have encountered a similar issue and have a way to solve this problem. The environment I found this problem is emacs 23.2, matlab 2011a, linux 64bit and the latest matlab mode. Thanks a lot Jeff |
From: David E. <de...@ra...> - 2012-01-21 16:09:27
|
Jeff Cen writes: > It will be great if the shell can display all the 20 columns without > breaking in the middle. This feature will be helpful to visually > checking the data. [...] > The matlab IDE allows such display. I wonder if anyone is aware of a > way to do this in the emacs matlab mode. That's a problem with running processes in comint. You can set the number of columns manually: create a shell skript "mymatlab" or similar, containing the following export COLUMNS=175 stty rows 65 cols 175 <PATH TO MATLAB>/matlab $* Adapt the number of columns/rows to your needs and use that script in `matlab-shell-command'. Cheers, David |
From: Jeff C. <jef...@ya...> - 2012-01-07 21:08:17
|
Hi, everyone, I have switched to using the matlab mode inside emacs from the matlab IDE. Thanks to Eric for this great mode. One minor problem I found with this mode is that the matlab shell in emacs only display a few columns of data, start a new line, and then display the rest. For example, if I type zeros(20) in the matlab shell in emacs, it displays the first 13 columns, start a new line and then display the remaining 7 columns. >> zeros(20) ans = Columns 1 through 13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 14 through 20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 It will be great if the shell can display all the 20 columns without breaking in the middle. This feature will be helpful to visually checking the data. >> zeros(20) ans = Columns 1 through 20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ... The matlab IDE allows such display. I wonder if anyone is aware of a way to do this in the emacs matlab mode. thanks Jeff |
From: Daniele N. <da...@gr...> - 2011-12-26 12:07:39
|
On 23/12/11 16:49, Punya Murthy wrote: > Hi everyone, > I am very much glad to get emacs major mode for matlab. > It is of great help for me. But indentation is a bit annoying for > me. 'Is there a way to alter the default indentation length?' Sure. M-x customize-apropos RET matlab RET The indentation width is controlled by, surprise, Matlab Indent Level, indentation in switch-case flow control constructs is controlled by Matlab Case Level (the first number is the indentation of the case statements into the switch block, the second number is the indentation of the code block within each case). Cheers, -- Daniele |
From: Punya M. <pun...@gm...> - 2011-12-23 15:45:54
|
Hi everyone, I am very much glad to get emacs major mode for matlab. It is of great help for me. But indentation is a bit annoying for me. 'Is there a way to alter the default indentation length?' -- Thanks and Regards Punya Murthy, CSA, IISc, Bangalore-560012. |
From: David C. <dav...@fr...> - 2011-12-12 13:40:30
|
Ok I understand a little bit better how everything is supposed to be working now. In fact, I think there are minor problems in the function matlab-shell-mode of matlab.el and the GUD functions should be mapped as follows: (gud-def gud-finish "dbstep out" "\C-f" "Finish executing current function.") (gud-def gud-up "dbup(%p)" "<" "Up N stack frames (numeric arg).") (gud-def gud-down "dbdown(%p)" ">" "Down N stack frames (numeric arg).") On a related (but cosmetic) note, there are problems with hyperlinks when using dbup and dbdown. The matlab-shell window shows hyperlinks of the kind: In workspace belonging to file>function at line But when you click on it, it creates buffer named "workspace belonging to" and doesn't lead anywhere. Furthermore, hyperlinks also do not work with "dbstack", although the behaviour is different from that with "dbup" and "dbdown". On top of the above, I believe "dbquit" should be mapped to "gud-stop-subjob" (please anyone correct me, I'm really kind of guessing here !) At last we might also want to add to the list: (gud-def gud-until "d bstop at %l in %f; dbcont; dbclear at %l in %f" "Run until cursor or first breakpoint") Cheers, David. _____ From: David Chappaz [mailto:dav...@fr...] Sent: 09 December 2011 14:39 To: 'Eric Ludlam'; 'mat...@li...' Subject: RE: [Matlab-emacs-discuss] Matlab-Shell & Sun Grid Engine Brilliant, Eric !! Many thanks for your help. I think I'm making good progress in configuring matlab-emacs and getting used to it :-) A few more questions, if I may, because I'm really not a GUD expert. EmacsLink (and most debuggers) provides - "matlab-eei-step-out" to finish the execution of the current function, and stop. My understanding is that "gud-finish" should do the same, but for me it just invokes "dbquit" and stops there. - "matlab-eei-go-until-cursor" but although there seems to be a "gud-until" in gud.el, emacs just doesn't know this function at all (M-x gud-until can't be invoked). Any clue what the problem is ? - "matlab-eei-exit-debug" to stop the current session. My understanding is that "gud-stop-subjob" should do the same, but I only get the following string echoed in the matlab-shell window: "M-x g u d - s t o p - s u b j o b RET". At last, I think I have identified a subtle problem with hyperlinks. If I start debugging a script, and go step by step, the matlab-shell window properly shows hyperlinks with the line number, followed by the line of code. That works fine. Now say I click on any of the above hyperlinks (without quitting the debugging session), it brings me back to the source code as expected. But if I start stepping through my code again, then the hyperlinks are not parsed correctly any more, and I get something like: <a href="matlab: opentoline('~/matlab/peri.m',106,1)">106 </a>end That's a bit cosmetic really, but it looks like following the hyperlink in the first place broke something. Thanks in advance for any help you can provide on the GUD functions ! Cheers, David. _____ From: Eric Ludlam [mailto:Eri...@ma...] Sent: 09 December 2011 13:49 To: David Chappaz; mat...@li... Subject: RE: [Matlab-emacs-discuss] Matlab-Shell & Sun Grid Engine Hi, for (1), there is a function called : matlab-with-emacs-link you can use. (if (matlab-with-emacs-link) (define-key .) (define-key.) for (2), that's the way it has always worked. The keybindings, however, work in any MATLAB buffer as long as matlab-shell-enable-gud-flag is set, which is t by default. for (3), I think I've seen that reported, but not seen it myself. Your repro steps, however, were good so now I see the problem. On line 4925 the variable 'limitpos' is being set to something based on characters in the line, including the period. That means if you complete: mystruct.plotmat <TAB> it will complete ok without saying mystruct.plotmatmystruct.plotmatrix Unfortunately, when you complete for edit, the return completed file name has a . in it. To fix this, we'd have to add a little hack to know it was completing for 'edit' specifically, and to ignore the . I suppose an alternative would be to take the completion string, and search for the matching substring in the replacement string, and replace only that. I don't think there is a utility in Emacs that matches like that. (4) - the figure focus thing is annoying. The problem here is just MATLAB doesn't know where the command line is, so can't give focus back. I don't know how to fix that. (5) - matlab-shell-run-region runs the region, but gud-print I think picks some symbol under point to evaluate. I use run region to highlight a bunch of lines to run. Eric |
From: David C. <dav...@fr...> - 2011-12-09 14:40:08
|
Brilliant, Eric !! Many thanks for your help. I think I'm making good progress in configuring matlab-emacs and getting used to it :-) A few more questions, if I may, because I'm really not a GUD expert. EmacsLink (and most debuggers) provides - "matlab-eei-step-out" to finish the execution of the current function, and stop. My understanding is that "gud-finish" should do the same, but for me it just invokes "dbquit" and stops there. - "matlab-eei-go-until-cursor" but although there seems to be a "gud-until" in gud.el, emacs just doesn't know this function at all (M-x gud-until can't be invoked). Any clue what the problem is ? - "matlab-eei-exit-debug" to stop the current session. My understanding is that "gud-stop-subjob" should do the same, but I only get the following string echoed in the matlab-shell window: "M-x g u d - s t o p - s u b j o b RET". At last, I think I have identified a subtle problem with hyperlinks. If I start debugging a script, and go step by step, the matlab-shell window properly shows hyperlinks with the line number, followed by the line of code. That works fine. Now say I click on any of the above hyperlinks (without quitting the debugging session), it brings me back to the source code as expected. But if I start stepping through my code again, then the hyperlinks are not parsed correctly any more, and I get something like: <a href="matlab: opentoline('~/matlab/peri.m',106,1)">106 </a>end That's a bit cosmetic really, but it looks like following the hyperlink in the first place broke something. Thanks in advance for any help you can provide on the GUD functions ! Cheers, David. _____ From: Eric Ludlam [mailto:Eri...@ma...] Sent: 09 December 2011 13:49 To: David Chappaz; mat...@li... Subject: RE: [Matlab-emacs-discuss] Matlab-Shell & Sun Grid Engine Hi, for (1), there is a function called : matlab-with-emacs-link you can use. (if (matlab-with-emacs-link) (define-key .) (define-key.) for (2), that's the way it has always worked. The keybindings, however, work in any MATLAB buffer as long as matlab-shell-enable-gud-flag is set, which is t by default. for (3), I think I've seen that reported, but not seen it myself. Your repro steps, however, were good so now I see the problem. On line 4925 the variable 'limitpos' is being set to something based on characters in the line, including the period. That means if you complete: mystruct.plotmat <TAB> it will complete ok without saying mystruct.plotmatmystruct.plotmatrix Unfortunately, when you complete for edit, the return completed file name has a . in it. To fix this, we'd have to add a little hack to know it was completing for 'edit' specifically, and to ignore the . I suppose an alternative would be to take the completion string, and search for the matching substring in the replacement string, and replace only that. I don't think there is a utility in Emacs that matches like that. (4) - the figure focus thing is annoying. The problem here is just MATLAB doesn't know where the command line is, so can't give focus back. I don't know how to fix that. (5) - matlab-shell-run-region runs the region, but gud-print I think picks some symbol under point to evaluate. I use run region to highlight a bunch of lines to run. Eric |
From: Eric L. <Eri...@ma...> - 2011-12-09 13:49:38
|
Hi, for (1), there is a function called : matlab-with-emacs-link you can use. (if (matlab-with-emacs-link) (define-key ...) (define-key...) for (2), that's the way it has always worked. The keybindings, however, work in any MATLAB buffer as long as matlab-shell-enable-gud-flag is set, which is t by default. for (3), I think I've seen that reported, but not seen it myself. Your repro steps, however, were good so now I see the problem. On line 4925 the variable 'limitpos' is being set to something based on characters in the line, including the period. That means if you complete: mystruct.plotmat <TAB> it will complete ok without saying mystruct.plotmatmystruct.plotmatrix Unfortunately, when you complete for edit, the return completed file name has a . in it. To fix this, we'd have to add a little hack to know it was completing for 'edit' specifically, and to ignore the . I suppose an alternative would be to take the completion string, and search for the matching substring in the replacement string, and replace only that. I don't think there is a utility in Emacs that matches like that. (4) - the figure focus thing is annoying. The problem here is just MATLAB doesn't know where the command line is, so can't give focus back. I don't know how to fix that. (5) - matlab-shell-run-region runs the region, but gud-print I think picks some symbol under point to evaluate. I use run region to highlight a bunch of lines to run. Eric From: David Chappaz [mailto:dav...@fr...] Sent: Friday, December 09, 2011 5:08 AM To: Eric Ludlam; mat...@li... Subject: RE: [Matlab-emacs-discuss] Matlab-Shell & Sun Grid Engine Hi Eric, You should really be thanked for all the hard work you made, and for improving matlab-emacs in the last couple of years since EmacsLink has disappeared. I happen to be working next door to a Mathworks development site, and I regularly meet some of the Mathworks folks... They always try hard to convince me to move the new Matlab releases, but for now I'm sticking with R2008b because I think EmacsLink is invaluable. I do have R2011b but just don't use it.... Anyway, many thanks for your feedback and possible directions to have "visual breakpoints". It does sound tricky, and way beyond my very limited elisp skills. I'd be prepared to spend some time looking at it, if I thought it was within my abilities, but I'm afraid it's not. I can't deny I am reluctant to give up EmacsLink, but I'm willing to give matlab-emacs a good go. For now I have a few minor issues which hopefully the community can help me solve: 1/ Because I mostly use EmacsLink, I have configured "Visual Sudio like" key bindings for debugging, e.g.: (define-key matlab-mode-map [f9] 'matlab-eei-breakpoint-set-clear) (define-key matlab-mode-map [f10] 'matlab-eei-step) (define-key matlab-mode-map [f11] 'matlab-eei-step-in) But now with matlab-emacs, I would have to redefine the bindings to something like: (define-key matlab-mode-map [f9] 'gud-break) (define-key matlab-mode-map [f10] 'gud-step) (define-key matlab-mode-map [f11] 'gud-next) Ideally I would like my key bindings to work both with EmacsLink and matlab-emacs. Is there a simple way to detect which "mode" is currently used, e.g. something like: (define-key matlab-mode-map [f9] '(lambda () (interactive) (if (EmacsLink) (matlab-eei-breakpoint-set-clear) (gud-break)))) (define-key matlab-mode-map [f10] '(lambda () (interactive) (if (EmacsLink) (matlab-eei-step) (gud-step)))) (define-key matlab-mode-map [f11] '(lambda () (interactive) (if (EmacsLink) (matlab-eei-step-in) (gud-next)))) 2/ The GUD toolbar doesn't automatically show up in my m source files, unless I manually set a breakpoint (e.g. with M-x gud-break), and effectively *** execute *** the function. The same must be repeated for ALL m files, one by one. Is this the way it is expected to be ? Or should the GUD toolbar show up automatically in all opened m files ? 3/ I also have a problem with auto-complete. Say I type "edit plot" and at this point hit TAB. As expected I get the list of all possible completions... Now say I want to edit "plot.m", so I further type "." and hit TAB again Then auto-complete gives me the following: edit plot.plot.m Can anyone reproduce this ? Or is there something wrong with my config ? 4/ Something which I find really (I mean really) annoying with matlab-emacs is that figures do steal focus. At the matlab shell prompt, I can't just type "figure", hit ENTER, and continue typing... I have to take my mouse, and return the focus to the matlab shell.... Any workaround for this problem ? 5/ This is more a question than a problem really, but can anyone explain the difference (if any) between matlab-shell-run-region (as in the matlab menu) and gud-print-expression (as in the GUD toolbar) ? Many thanks in advance to anyone who can help !! Cheers, David. ________________________________ From: Eric Ludlam [mailto:Eri...@ma...] Sent: 08 December 2011 15:52 To: David Chappaz; mat...@li... Subject: RE: [Matlab-emacs-discuss] Matlab-Shell & Sun Grid Engine Hi, Good Luck getting your matlab shell working. It sounds like a tricky environment. EmacsLink depended on some Java APIs that aren't available any more. Most of what you may think of as EmacsLink, however, is the same as matlab-emacs except that matlab-emacs on SourceForge has a bunch of misc bug fixes. The matlab-shell command was an EmacsLink predecessor, and fortunately, still works. The breakpoint feature was one of the things not available. I would be possible to fake it out by reading commands that set breakpoints, and using linemark to remember them, but I imagine that would be quite tricky. It would probably work to have some command for matlab-shell that calls dbstatus, reads the breakpoints, and dumps out a lisp struct that could be read in to populate a linemark database. I picture a couple pages of code for that. You'd have to run the command to show the BP though. If someone would like to give it a try, I'll be happy to give some pointers. Eric From: David Chappaz [mailto:dav...@fr...] Sent: Thursday, December 08, 2011 10:23 AM To: Eric Ludlam; mat...@li... Subject: RE: [Matlab-emacs-discuss] Matlab-Shell & Sun Grid Engine Hi Eric, Many thanks for your swift reply !! In fact I've just realised things are more complicated than that... Eventually I did manage to submit matlab as a Sun Grid Engine job, but then, the communication between emacs and matlab is broken because the two processes do not necessarily run on the same machine.... So it looks like the only way is to submit emacs as a job first, and start matlab normally from there (on the same machine !). On a slightly different note, I've been using EmacsLink for years, but only now am I starting to look at matlab-emacs. Undoubtedly there are a few things I need to learn and to get used to, but one thing that I miss terribly is the ability to "see" where my breakpoints are in the source code, pretty much in the same way as mlint warnings are reported (with linemark.el). Is this feature not supported ? Or is something broken in my configuration ? Cheers, David. ________________________________ From: Eric Ludlam [mailto:Eri...@ma...] Sent: 08 December 2011 15:07 To: David Chappaz; mat...@li... Subject: RE: [Matlab-emacs-discuss] Matlab-Shell & Sun Grid Engine Hi, The variable 'matlab-shell-command' needs to be a string that represents a single executable. In your case, you want it to just be "qrsh". You would then set 'matlab-shell-command-switches' to be '("-b" "y" "-q" "single" "-V" ...) with all your switches spelled out. It seems outlook is messing with my 'quote' marks, so you will need to type it in and not copy what I typed here. Good Luck Eric From: David Chappaz [mailto:dav...@fr...] Sent: Thursday, December 08, 2011 7:51 AM To: mat...@li... Subject: [Matlab-emacs-discuss] Matlab-Shell & Sun Grid Engine Hi everyone, I'm having a simple problem configuring matlab-shell-command. The thing is I actually never run matlab locally on the machine I am logged on, but matlab is submitted as a job to a large pool of linux machines with the Sun Grid Engine. In other words, I don't use the "matlab" command at the shell prompt, but instead I use something like: qrsh -b y -q single -V -cwd -noshell matlab Now, everything works fine by default, if I set matlab-shell-command to "matlab". But if I set matlab-shell-command to "qrsh -b y -q single -V -cwd -noshell matlab", a problem occurs in matlab.el (matlab-shell function), and more specifically on this line : (switch-to-buffer (apply 'make-comint matlab-shell-buffer-name matlab-shell-command nil matlab-shell-command-switches)) which returns the error message Searching for program: no such file or directory, qrsh -b y -q single -V -cwd -noshell matlab As a workaround, I have tried defining an alias in my .cshrc, something like: alias sge_matlab 'qrsh -b y -q single -V -cwd -noshell matlab' and this works to manually start matlab from the shell. But again if I set matlab-shell-command to "sge_matlab", then I get apply: Searching for program: no such file or directory, sge_matlab So what is the proper way to get everything to work in my case ? Many thanks in advance ! Cheers, David. |
From: David C. <dav...@fr...> - 2011-12-09 10:09:41
|
Hi Eric, You should really be thanked for all the hard work you made, and for improving matlab-emacs in the last couple of years since EmacsLink has disappeared. I happen to be working next door to a Mathworks development site, and I regularly meet some of the Mathworks folks. They always try hard to convince me to move the new Matlab releases, but for now I'm sticking with R2008b because I think EmacsLink is invaluable. I do have R2011b but just don't use it.. Anyway, many thanks for your feedback and possible directions to have "visual breakpoints". It does sound tricky, and way beyond my very limited elisp skills. I'd be prepared to spend some time looking at it, if I thought it was within my abilities, but I'm afraid it's not. I can't deny I am reluctant to give up EmacsLink, but I'm willing to give matlab-emacs a good go. For now I have a few minor issues which hopefully the community can help me solve: 1/ Because I mostly use EmacsLink, I have configured "Visual Sudio like" key bindings for debugging, e.g.: (define-key matlab-mode-map [f9] 'matlab-eei-breakpoint-set-clear) (define-key matlab-mode-map [f10] 'matlab-eei-step) (define-key matlab-mode-map [f11] 'matlab-eei-step-in) But now with matlab-emacs, I would have to redefine the bindings to something like: (define-key matlab-mode-map [f9] 'gud-break) (define-key matlab-mode-map [f10] 'gud-step) (define-key matlab-mode-map [f11] 'gud-next) Ideally I would like my key bindings to work both with EmacsLink and matlab-emacs. Is there a simple way to detect which "mode" is currently used, e.g. something like: (define-key matlab-mode-map [f9] '(lambda () (interactive) (if (EmacsLink) (matlab-eei-breakpoint-set-clear) (gud-break)))) (define-key matlab-mode-map [f10] '(lambda () (interactive) (if (EmacsLink) (matlab-eei-step) (gud-step)))) (define-key matlab-mode-map [f11] '(lambda () (interactive) (if (EmacsLink) (matlab-eei-step-in) (gud-next)))) 2/ The GUD toolbar doesn't automatically show up in my m source files, unless I manually set a breakpoint (e.g. with M-x gud-break), and effectively *** execute *** the function. The same must be repeated for ALL m files, one by one. Is this the way it is expected to be ? Or should the GUD toolbar show up automatically in all opened m files ? 3/ I also have a problem with auto-complete. Say I type "edit plot" and at this point hit TAB. As expected I get the list of all possible completions. Now say I want to edit "plot.m", so I further type "." and hit TAB again Then auto-complete gives me the following: edit plot.plot.m Can anyone reproduce this ? Or is there something wrong with my config ? 4/ Something which I find really (I mean really) annoying with matlab-emacs is that figures do steal focus. At the matlab shell prompt, I can't just type "figure", hit ENTER, and continue typing. I have to take my mouse, and return the focus to the matlab shell.. Any workaround for this problem ? 5/ This is more a question than a problem really, but can anyone explain the difference (if any) between matlab-shell-run-region (as in the matlab menu) and gud-print-expression (as in the GUD toolbar) ? Many thanks in advance to anyone who can help !! Cheers, David. _____ From: Eric Ludlam [mailto:Eri...@ma...] Sent: 08 December 2011 15:52 To: David Chappaz; mat...@li... Subject: RE: [Matlab-emacs-discuss] Matlab-Shell & Sun Grid Engine Hi, Good Luck getting your matlab shell working. It sounds like a tricky environment. EmacsLink depended on some Java APIs that aren't available any more. Most of what you may think of as EmacsLink, however, is the same as matlab-emacs except that matlab-emacs on SourceForge has a bunch of misc bug fixes. The matlab-shell command was an EmacsLink predecessor, and fortunately, still works. The breakpoint feature was one of the things not available. I would be possible to fake it out by reading commands that set breakpoints, and using linemark to remember them, but I imagine that would be quite tricky. It would probably work to have some command for matlab-shell that calls dbstatus, reads the breakpoints, and dumps out a lisp struct that could be read in to populate a linemark database. I picture a couple pages of code for that. You'd have to run the command to show the BP though. If someone would like to give it a try, I'll be happy to give some pointers. Eric From: David Chappaz [mailto:dav...@fr...] Sent: Thursday, December 08, 2011 10:23 AM To: Eric Ludlam; mat...@li... Subject: RE: [Matlab-emacs-discuss] Matlab-Shell & Sun Grid Engine Hi Eric, Many thanks for your swift reply !! In fact I've just realised things are more complicated than that. Eventually I did manage to submit matlab as a Sun Grid Engine job, but then, the communication between emacs and matlab is broken because the two processes do not necessarily run on the same machine.. So it looks like the only way is to submit emacs as a job first, and start matlab normally from there (on the same machine !). On a slightly different note, I've been using EmacsLink for years, but only now am I starting to look at matlab-emacs. Undoubtedly there are a few things I need to learn and to get used to, but one thing that I miss terribly is the ability to "see" where my breakpoints are in the source code, pretty much in the same way as mlint warnings are reported (with linemark.el). Is this feature not supported ? Or is something broken in my configuration ? Cheers, David. _____ From: Eric Ludlam [mailto:Eri...@ma...] Sent: 08 December 2011 15:07 To: David Chappaz; mat...@li... Subject: RE: [Matlab-emacs-discuss] Matlab-Shell & Sun Grid Engine Hi, The variable 'matlab-shell-command' needs to be a string that represents a single executable. In your case, you want it to just be "qrsh". You would then set 'matlab-shell-command-switches' to be '("-b" "y" "-q" "single" "-V" .) with all your switches spelled out. It seems outlook is messing with my 'quote' marks, so you will need to type it in and not copy what I typed here. Good Luck Eric From: David Chappaz [mailto:dav...@fr...] Sent: Thursday, December 08, 2011 7:51 AM To: mat...@li... Subject: [Matlab-emacs-discuss] Matlab-Shell & Sun Grid Engine Hi everyone, I'm having a simple problem configuring matlab-shell-command. The thing is I actually never run matlab locally on the machine I am logged on, but matlab is submitted as a job to a large pool of linux machines with the Sun Grid Engine. In other words, I don't use the "matlab" command at the shell prompt, but instead I use something like: qrsh -b y -q single -V -cwd -noshell matlab Now, everything works fine by default, if I set matlab-shell-command to "matlab". But if I set matlab-shell-command to "qrsh -b y -q single -V -cwd -noshell matlab", a problem occurs in matlab.el (matlab-shell function), and more specifically on this line : (switch-to-buffer (apply 'make-comint matlab-shell-buffer-name matlab-shell-command nil matlab-shell-command-switches)) which returns the error message Searching for program: no such file or directory, qrsh -b y -q single -V -cwd -noshell matlab As a workaround, I have tried defining an alias in my .cshrc, something like: alias sge_matlab 'qrsh -b y -q single -V -cwd -noshell matlab' and this works to manually start matlab from the shell. But again if I set matlab-shell-command to "sge_matlab", then I get apply: Searching for program: no such file or directory, sge_matlab So what is the proper way to get everything to work in my case ? Many thanks in advance ! Cheers, David. |