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
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Yasushi S. <yas...@gm...> - 2022-01-11 08:33:00
|
Hi, It seems to me that matlab-mode doesn't return "foo" when I call thing-at-point on "foo'". Note that it has a quotation mark for transpose. (defun foo () (interactive) (message (thing-at-point 'symbol))) Best, -- yashi |
From: Shervin S. <co...@sh...> - 2021-12-03 10:42:48
|
Hi Uwe, I'm not sure if I get the issue, but I had this issue that figure does not pop out, and by just executing "set (0, "defaultfigurevisible", "on");" on the matlab-shell (only once) solved my problem. Maybe give it a try. Best wishes, Shervin On Fri, Dec 3, 2021 at 11:19 AM Uwe Brauer <ou...@ma...> wrote: > * Matlab+python+org mode a problem with the plot command > > Hi > > The following is a bit off topic, my apologies, but it concerns matlab > and emacs and I hope that maybe someone on a list could give me a > hint. > > While matlab-mode is very useful for writing code and debug it, I also > need the feature of executing code and insert its result nicely > formatted in the buffer. > > This can be achieved by > > - first installing the python matlab kernel > https://de.mathworks.com/help/matlab/matlab_external/install-the-matlab-engine-for-python.html > - install the jupyter matlab kernel > sudo dpkg --purge python3-ptyprocess > sudo -H pip3 install --upgrade --force-reinstall --no-cache-dir jupyter > sudo -H pip3 install --upgrade --force-reinstall --no-cache-dir numpy > sudo -H pip3 install --upgrade --force-reinstall --no-cache-dir > pymatbridge > sudo -H pip3 install --upgrade --force-reinstall --no-cache-dir > matlab_kernel > - start the engine > https://de.mathworks.com/help/matlab/matlab_external/start-the-matlab-engine-for-python.html > - use org mode > - install ob-ipython. > - execute > #+BEGIN_SRC emacs-lisp > (setq org-confirm-babel-evaluate nil) ;don't prompt me to confirm > everytime I want to evaluate a block > ;;; display/update images in the buffer after I evaluate > (add-hook 'org-babel-after-execute-hook 'org-display-inline-images 'append) > > (add-to-list 'org-src-lang-modes '("matlab" . matlab)) > (setq python-shell-interpreter "python3") > ;(setq python-shell-interpreter "/usr/bin/python3.6") > ;(setq python-shell-interpreter "/usr/bin/python2.7") > ;; set default headers for convenience > (setq org-babel-default-header-args:matlab > '((:results . "output replace") > (:session . "matlab") > (:kernel . "matlab") > (:exports . "code") > (:cache . "no") > (:noweb . "no") > (:hlines . "no") > (:tangle . "no"))) > (defalias 'org-babel-execute:matlab 'org-babel-execute:ipython) > (defalias 'org-babel-prep-session:matlab 'org-babel-prep-session:ipython) > (defalias 'org-babel-matlab-initiate-session > 'org-babel-ipython-initiate-session) > #+END_SRC > > Then use the following example > > > #+begin_src matlab :results output latex :exports results :eval > never-export :wrap latex > x = [1, 2, 3, 4, 5]; > fprintf('|%d', x) > #+end_src > > And it works like charm. > > However and now comes the question: > > #+begin_src matlab :results output latex :exports code :eval never-export > :wrap latex > clear all > close all > t=[0:0.1:1]; > y=sin(t); > figure(1) > plot(t,y) > #+end_src > > The plot figure *does not* pop, while if I use the emacs matlab-shell it > does. > > If somebody has a clue or hint I would be extremely grateful > > regards > > Uwe Brauer > _______________________________________________ > Matlab-emacs-discuss mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matlab-emacs-discuss > |
From: Uwe B. <ou...@ma...> - 2021-12-03 10:36:10
|
>>> "SS" == Shervin Safavi <co...@sh...> writes: Hi Shervin > Hi Uwe, > I'm not sure if I get the issue, but I had this issue that figure does not > pop out, and by just executing "set (0, "defaultfigurevisible", "on");" on > the matlab-shell (only once) solved my problem. Maybe give it a try. Great!! Thanks. It *almost* solved my problem. If I execute the command you mention, then the figure pops up, stays for 2 seconds and then disappears again 😕. Still better than nothing So I presume I need an additional setting. I try to dig a bit with your hint and then even may write mathworks itself |
From: Uwe B. <ou...@ma...> - 2021-12-03 10:18:47
|
* Matlab+python+org mode a problem with the plot command Hi The following is a bit off topic, my apologies, but it concerns matlab and emacs and I hope that maybe someone on a list could give me a hint. While matlab-mode is very useful for writing code and debug it, I also need the feature of executing code and insert its result nicely formatted in the buffer. This can be achieved by - first installing the python matlab kernel https://de.mathworks.com/help/matlab/matlab_external/install-the-matlab-engine-for-python.html - install the jupyter matlab kernel sudo dpkg --purge python3-ptyprocess sudo -H pip3 install --upgrade --force-reinstall --no-cache-dir jupyter sudo -H pip3 install --upgrade --force-reinstall --no-cache-dir numpy sudo -H pip3 install --upgrade --force-reinstall --no-cache-dir pymatbridge sudo -H pip3 install --upgrade --force-reinstall --no-cache-dir matlab_kernel - start the engine https://de.mathworks.com/help/matlab/matlab_external/start-the-matlab-engine-for-python.html - use org mode - install ob-ipython. - execute #+BEGIN_SRC emacs-lisp (setq org-confirm-babel-evaluate nil) ;don't prompt me to confirm everytime I want to evaluate a block ;;; display/update images in the buffer after I evaluate (add-hook 'org-babel-after-execute-hook 'org-display-inline-images 'append) (add-to-list 'org-src-lang-modes '("matlab" . matlab)) (setq python-shell-interpreter "python3") ;(setq python-shell-interpreter "/usr/bin/python3.6") ;(setq python-shell-interpreter "/usr/bin/python2.7") ;; set default headers for convenience (setq org-babel-default-header-args:matlab '((:results . "output replace") (:session . "matlab") (:kernel . "matlab") (:exports . "code") (:cache . "no") (:noweb . "no") (:hlines . "no") (:tangle . "no"))) (defalias 'org-babel-execute:matlab 'org-babel-execute:ipython) (defalias 'org-babel-prep-session:matlab 'org-babel-prep-session:ipython) (defalias 'org-babel-matlab-initiate-session 'org-babel-ipython-initiate-session) #+END_SRC Then use the following example #+begin_src matlab :results output latex :exports results :eval never-export :wrap latex x = [1, 2, 3, 4, 5]; fprintf('|%d', x) #+end_src And it works like charm. However and now comes the question: #+begin_src matlab :results output latex :exports code :eval never-export :wrap latex clear all close all t=[0:0.1:1]; y=sin(t); figure(1) plot(t,y) #+end_src The plot figure *does not* pop, while if I use the emacs matlab-shell it does. If somebody has a clue or hint I would be extremely grateful regards Uwe Brauer |
From: Uwe B. <ou...@ma...> - 2021-10-23 17:14:36
|
>>> "EL" == Eric Ludlam <eri...@gm...> writes: Hi Eric > Hi all, > There is a "mini-hack" contest going on over on MATLAB Central which you > can see here. > https://www.mathworks.com/matlabcentral/contests/20th-anniversary-matlab-minihack.html > The goal is to write a MATLAB script that is 280 chars or less that draws > something neat. > Attached find an Emacs script that works with the latest version of > MATLAB mode on git to display the number of characters in your > mode-line. Since the contest isn't counting all characters, but > instead all non-comment, non-indent characters, this script attempts > to do the same counting tricks so you can develop your verbosely > commented, and correctly indented code in Emacs before pasting into > the contest page. Thanks, first of all I like you short hack, why not including it in the repository? > And while your there, vote for my pumpkin script. :) I'd love to but, although I see it in https://de.mathworks.com/matlabcentral/communitycontests/contests/4/rankings?contributor_term=Eric Where is the bloody button to vote 😶?? Uwe |
From: Eric L. <eri...@gm...> - 2021-10-23 14:55:04
|
Hi all, There is a "mini-hack" contest going on over on MATLAB Central which you can see here. https://www.mathworks.com/matlabcentral/contests/20th-anniversary-matlab-minihack.html The goal is to write a MATLAB script that is 280 chars or less that draws something neat. Attached find an Emacs script that works with the latest version of MATLAB mode on git to display the number of characters in your mode-line. Since the contest isn't counting all characters, but instead all non-comment, non-indent characters, this script attempts to do the same counting tricks so you can develop your verbosely commented, and correctly indented code in Emacs before pasting into the contest page. And while your there, vote for my pumpkin script. :) Enjoy Eric |
From: Christian R. <chr...@gm...> - 2021-08-09 14:19:00
|
Hi, Is there a trick to "filling" a region in a .m-file when using matlab-mode? I created a .m-file with the following content: function foo() a = 1111111111111 + 222222222222 + 3333333333 + 444444444 + 5555555 + 666666 + 7777; end I thought I should then be able to go to the line starting with 'a = ...' and do some kind of fill operation to automatically change it into something like: function foo() a = 1111111111111 + 222222222222 + 3333333333 + 444444444 + ... 5555555 + 666666 + 7777; end However, instead I seem to get the message: Fill algorithm failed! Any idea what's going on here? Apologies if I should be creating e.g. an issue at sourceforge instead. cheers, Christian PS. It's been a number of years since I used matlab-mode and I've just installed it from MELPA on a Windows 10 machine. So I'm expecting the problem to be with my Emacs installation, even though it's just installed and hardly configured. -- Christian Ridderström, +46-70 687 39 44 |
From: Uwe B. <ou...@ma...> - 2021-07-26 09:01:07
|
>>> "KC" == Karthik Chikmagalur <kar...@gm...> writes: > Attached: Patch to copy all local functions to script. Thanks I applied your patch and will do some testing today before pushing, maybe you could provide a test case? Just a comment for the future, could you please provide the patch as a attachment in the future? That would make things a bit easier. Regards Uwe |
From: Karthik C. <kar...@gm...> - 2021-07-26 05:48:01
|
Attached: Patch to copy all local functions to script. - Karthik |
From: Uwe B. <ou...@ma...> - 2021-07-20 17:08:14
|
>>> "EL" == Eric Ludlam <eri...@gm...> writes: Hi Karthik and Eric > Hi Karthik and Uwe, > Nice find. I think the first solution Karthik suggests of just copying > over all local functions makes the most sense. Chasing down all the > dependencies would be tricky. > It might also make sense to check if there are any functions in the > file, and improve the auto-selector for which region command to use. > If local functions exist, it probably makes sense to always use the > script generator. Doing that check will be much easier once we merge > over the hairyblocks branch. I still owe that changelog, so I'll work > on that today. I did the merge some days ago, and it seems ok, no problems occurred so far. What do you think, shall we use Karthik first solution, or is it worth to generalise it a bit? If the first solution is fine (for me at least it is), Karthik, could you please pull the latest master and provide a patch? Thanks and regards Uwe |
From: Uwe B. <ou...@ma...> - 2021-07-20 16:55:05
|
>>> "JC" == Julien Claisse <jul...@mo...> writes: Hi Julien > Hi Uwe, > Sorry, this is my fault : this patch does not correct the fact that > matlab-shell-save-and-go can work with scripts from anywhere. It only > corrects that we can now run functions with 1 or more parameters. I am terrible sorry for the delay, but until now I was very busy. So the first thing after my courses finished was to merge the hairybranch written by Eric into master. Now concerning your example I can reproduce it, but it maybe because I used the merged version. > Here is an example : > 1 - Open matlab-shell > 2 - mkdir test-matlab-shell-save-and-go/ > 3 - Create a new file test.m under this new directory : > function test(p1) > disp(['hello ' num2str(p1) '!']) > 4 - Do a matlab-shell-save-and-go from this file. When I do this I see in the minibuffer what you described in 7!!! > 5 - Enter (5) in the minibuffer prompt and press enter > 6 - Without the patch you get one error: >>> run('/home/jc/test-matlab-shell-save-and-go/test') > Not enough input arguments. > Error in test (line 2) > disp(['hello ' num2str(p1) '!']) > Error in run (line 91) > evalin('caller', strcat(script, ';')); > 7 - Apply the patch, and do the same. It works : >>> addpath('/home/jc/test-matlab-shell-save-and-go/') >>> test(5) > hello 5! This is what I see. I don't recall having applied your patch, I searched the changelog and can't see anything. I also looked at your patch ,---- | | + (let ((cmd (concat "addpath('" dir "')"))) | + (matlab-shell-send-command cmd)) | + (let ((cmd (concat fn-name param))) | (matlab-shell-send-command cmd))) `---- are not applied. So may I ask you to pull the latest master and see whether you still run into a problem? Thanks and regards Uwe |
From: Eric L. <eri...@gm...> - 2021-07-11 19:06:37
|
Sounds good. Thanks Uwe! On Sun, Jul 11, 2021 at 3:02 PM Uwe Brauer <ou...@ma...> wrote: > >>> "EL" == Eric Ludlam <eri...@gm...> writes: > > > Hi Uwe, > > I updated the NEWS file, and submitted the change to the hairyblocks > branch. > > Great I could then merge into master and also include the two patches, > one by Julien Claisse the other by Karthik Chikmagalur. However I will > be very very busy the next week till Sunday. So I prefer to do this next > weekend just in case that there are complications. > > I hope that is ok with you > > Uwe > |
From: Uwe B. <ou...@ma...> - 2021-07-11 19:02:33
|
>>> "EL" == Eric Ludlam <eri...@gm...> writes: > Hi Uwe, > I updated the NEWS file, and submitted the change to the hairyblocks branch. Great I could then merge into master and also include the two patches, one by Julien Claisse the other by Karthik Chikmagalur. However I will be very very busy the next week till Sunday. So I prefer to do this next weekend just in case that there are complications. I hope that is ok with you Uwe |
From: Eric L. <eri...@gm...> - 2021-07-11 16:47:53
|
Hi Uwe, I updated the NEWS file, and submitted the change to the hairyblocks branch. Eric On Sun, Jun 20, 2021 at 11:27 AM Uwe Brauer <ou...@ma...> wrote: > >>> "EL" == Eric Ludlam <eri...@gm...> writes: > > > Hi Uwe, > > Yes, that makes sense. But also reminds me that way more than that > should > > be in the news file. Matlab mode used to do a lot of stuff that now has > > native support in emacs which changes how to configure things. Sadly I > > didn't think to build a news like file for them other than all the > check-in > > logs. I could work on that but it will be a day or two as I'm doing > family > > stuff this week. > > Sure no hurry. I am occupied with family business as well. ;-) > |
From: Eric L. <eri...@gm...> - 2021-07-11 15:17:52
|
Hi Karthik and Uwe, Nice find. I think the first solution Karthik suggests of just copying over all local functions makes the most sense. Chasing down all the dependencies would be tricky. It might also make sense to check if there are any functions in the file, and improve the auto-selector for which region command to use. If local functions exist, it probably makes sense to always use the script generator. Doing that check will be much easier once we merge over the hairyblocks branch. I still owe that changelog, so I'll work on that today. Eric On Wed, Jul 7, 2021 at 1:10 PM Karthik Chikmagalur < kar...@gm...> wrote: > An alternative to including all local functions in the temp file is > something like this: > > 1. Find the local function names referred to in the region being > evaluated. The current version of matlab-shell-region->script does this. > Let's call this list included-functions. > 2. Find function calls to other local functions for each function in this > list. Add these function names to included-functions. > 3. Repeat step 2 until included-functions doesn't change. We've now > traversed the dependency chain of local functions beginning with the region > to be evaluated. > 4. Insert all functions in included-functions at the end of the temp file. > > I can probably code this up but I'd like to know what Eric thinks first. > > Karthik > > Uwe Brauer <ou...@ma...> writes: > > >>>> "KC" == Karthik Chikmagalur <kar...@gm...> writes: > > > >> Hi, > > > >> I'm having trouble using matlab-shell-region->script when my script > >> is structured as follows, and I call > >> matlab-shell-run-region-or-line on the function call: > > > >> %---- 8< ---- > >> %% Function call > >> func2(x) > > > >> %% Local functions > >> function y = func1(x) > >> y = x * 2; > >> end > > > >> function z = func2(x) > >> y = func1(x); > >> z = y + 1; > >> end > >> %---- 8< ---- > > > >> When I call func2(x), matlab-shell-region->script copies over only > >> func2 to the temporary file, even though func2 requires func1 to be > >> defined. > > > > > > Thanks, I was not aware of that problem > > > >> This probably makes the call to matlab-shell more expensive, but I > >> think this should be the default behavior to avoid subtle failures > >> like this. > > > > It looks fine to me, but I only deal with relatively small files. What > > do others think, especially Eric, who provided the original code? > > > > Regards > > > > Uwe > > > _______________________________________________ > Matlab-emacs-discuss mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matlab-emacs-discuss > |
From: Karthik C. <kar...@gm...> - 2021-07-07 17:10:29
|
An alternative to including all local functions in the temp file is something like this: 1. Find the local function names referred to in the region being evaluated. The current version of matlab-shell-region->script does this. Let's call this list included-functions. 2. Find function calls to other local functions for each function in this list. Add these function names to included-functions. 3. Repeat step 2 until included-functions doesn't change. We've now traversed the dependency chain of local functions beginning with the region to be evaluated. 4. Insert all functions in included-functions at the end of the temp file. I can probably code this up but I'd like to know what Eric thinks first. Karthik Uwe Brauer <ou...@ma...> writes: >>>> "KC" == Karthik Chikmagalur <kar...@gm...> writes: > >> Hi, > >> I'm having trouble using matlab-shell-region->script when my script >> is structured as follows, and I call >> matlab-shell-run-region-or-line on the function call: > >> %---- 8< ---- >> %% Function call >> func2(x) > >> %% Local functions >> function y = func1(x) >> y = x * 2; >> end > >> function z = func2(x) >> y = func1(x); >> z = y + 1; >> end >> %---- 8< ---- > >> When I call func2(x), matlab-shell-region->script copies over only >> func2 to the temporary file, even though func2 requires func1 to be >> defined. > > > Thanks, I was not aware of that problem > >> This probably makes the call to matlab-shell more expensive, but I >> think this should be the default behavior to avoid subtle failures >> like this. > > It looks fine to me, but I only deal with relatively small files. What > do others think, especially Eric, who provided the original code? > > Regards > > Uwe |
From: Uwe B. <ou...@ma...> - 2021-07-07 06:37:30
|
>>> "KC" == Karthik Chikmagalur <kar...@gm...> writes: > Hi, > I'm having trouble using matlab-shell-region->script when my script > is structured as follows, and I call > matlab-shell-run-region-or-line on the function call: > %---- 8< ---- > %% Function call > func2(x) > %% Local functions > function y = func1(x) > y = x * 2; > end > function z = func2(x) > y = func1(x); > z = y + 1; > end > %---- 8< ---- > When I call func2(x), matlab-shell-region->script copies over only > func2 to the temporary file, even though func2 requires func1 to be > defined. Thanks, I was not aware of that problem > This probably makes the call to matlab-shell more expensive, but I > think this should be the default behavior to avoid subtle failures > like this. It looks fine to me, but I only deal with relatively small files. What do others think, especially Eric, who provided the original code? Regards Uwe |
From: Karthik C. <kar...@gm...> - 2021-07-06 22:36:37
|
Hi, I'm having trouble using matlab-shell-region->script when my script is structured as follows, and I call matlab-shell-run-region-or-line on the function call: %---- 8< ---- %% Function call func2(x) %% Local functions function y = func1(x) y = x * 2; end function z = func2(x) y = func1(x); z = y + 1; end %---- 8< ---- When I call func2(x), matlab-shell-region->script copies over only func2 to the temporary file, even though func2 requires func1 to be defined. The problem is that matlab-shell-region->script copies over only the functions that it finds in the region being evaluated. Since func1 is not part of this region, it's not copied over. From matlab-shell-region->script: (dolist (F functions) (save-excursion (when (re-search-forward (semantic-tag-name F) nil t) ;; Found, copy it in. (let ((ft (matlab-semantic-tag-text F orig))) (goto-char (point-max)) (insert "% Copy of " (semantic-tag-name F) "\n\n") (insert ft) (insert "\n%%\n"))))) The re-search-forward, which is run on the text being evaluated, is doing the filtering to func2 only. I got around this by simply copying over all local functions to the temp file: (dolist (F functions) (save-excursion (let ((ft (matlab-semantic-tag-text F orig))) ;; Copy over ALL local functions to the temp file. (goto-char (point-max)) (insert "% Copy of " (semantic-tag-name F) "\n\n") (insert ft) (insert "\n%%\n")))) This probably makes the call to matlab-shell more expensive, but I think this should be the default behavior to avoid subtle failures like this. Karthik |
From: Uwe B. <ou...@ma...> - 2021-06-20 15:27:18
|
>>> "EL" == Eric Ludlam <eri...@gm...> writes: > Hi Uwe, > Yes, that makes sense. But also reminds me that way more than that should > be in the news file. Matlab mode used to do a lot of stuff that now has > native support in emacs which changes how to configure things. Sadly I > didn't think to build a news like file for them other than all the check-in > logs. I could work on that but it will be a day or two as I'm doing family > stuff this week. Sure no hurry. I am occupied with family business as well. ;-) |
From: Eric L. <eri...@gm...> - 2021-06-20 13:28:18
|
Hi Uwe, Yes, that makes sense. But also reminds me that way more than that should be in the news file. Matlab mode used to do a lot of stuff that now has native support in emacs which changes how to configure things. Sadly I didn't think to build a news like file for them other than all the check-in logs. I could work on that but it will be a day or two as I'm doing family stuff this week. Some of the summary of changes is in an email I put together a month or so ago, but not at the right detail level. Eric On Sun, Jun 20, 2021, 9:06 AM Uwe Brauer <ou...@ma...> wrote: > >>> "EL" == Eric Ludlam <eri...@gm...> writes: > > > > Sounds like a fine idea to me. I posted a change to the hairyblocks > > branch that will use the function name, or text after the cell start > > as the 'defun' for add log. > > > The hairyblocks branch has been stable for a while with a lot of > > developers at MW using it. It should be ready to merge into the main > > branch whenever you are ready for it. > > > > I am just running into a problem with the hairyblocks branch. > > I want to insert an empty line, in a matlab.m file hitting > the return key, but I receive the following error > > ,---- > | Debugger entered--Lisp error: (void-function matlab-return) > | signal(void-function (matlab-return)) > | help-fns--analyze-function(matlab-return) > | help-fns-function-description-header(matlab-return) > | describe-function-1(matlab-return) > | describe-key((([return] . [return]))) > | funcall-interactively(describe-key (([return] . [return]))) > | call-interactively(describe-key nil nil) > | command-execute(describe-key) > `---- > > Indeed my personal binding had (I don't know for how long) > (local-set-key [return] 'matlab-return) > > > Eyeballing the changelog, I find > Remove matlab-comment-indent as a setting (use nil) > │ (matlab-return-function, matlab-return, matlab-plain-ret) > │ (matlab-indent-after-ret, matlab-indent-end-before-ret) > │ (matlab-semicolon-on-return, matlab-indent-before-ret) > │ (matlab-linefeed): > > Which I interpret that you removed matlab-return. > > So I suggest that before I merge that branch into master, we had into > the NEWS file and entry were we tell which functions have been removed > in order to avoid users complains. > > What do you think? > > Uwe > > |
From: Uwe B. <ou...@ma...> - 2021-06-20 13:06:36
|
>>> "EL" == Eric Ludlam <eri...@gm...> writes: > Sounds like a fine idea to me. I posted a change to the hairyblocks > branch that will use the function name, or text after the cell start > as the 'defun' for add log. > The hairyblocks branch has been stable for a while with a lot of > developers at MW using it. It should be ready to merge into the main > branch whenever you are ready for it. I am just running into a problem with the hairyblocks branch. I want to insert an empty line, in a matlab.m file hitting the return key, but I receive the following error ,---- | Debugger entered--Lisp error: (void-function matlab-return) | signal(void-function (matlab-return)) | help-fns--analyze-function(matlab-return) | help-fns-function-description-header(matlab-return) | describe-function-1(matlab-return) | describe-key((([return] . [return]))) | funcall-interactively(describe-key (([return] . [return]))) | call-interactively(describe-key nil nil) | command-execute(describe-key) `---- Indeed my personal binding had (I don't know for how long) (local-set-key [return] 'matlab-return) Eyeballing the changelog, I find Remove matlab-comment-indent as a setting (use nil) │ (matlab-return-function, matlab-return, matlab-plain-ret) │ (matlab-indent-after-ret, matlab-indent-end-before-ret) │ (matlab-semicolon-on-return, matlab-indent-before-ret) │ (matlab-linefeed): Which I interpret that you removed matlab-return. So I suggest that before I merge that branch into master, we had into the NEWS file and entry were we tell which functions have been removed in order to avoid users complains. What do you think? Uwe |
From: Uwe B. <ou...@ma...> - 2021-06-20 12:55:42
|
>>> "EL" == Eric Ludlam <eri...@gm...> writes: > Sounds like a fine idea to me. I posted a change to the hairyblocks > branch that will use the function name, or text after the cell start > as the 'defun' for add log. Great I just saw it, thanks! > The hairyblocks branch has been stable for a while with a lot of > developers at MW using it. It should be ready to merge into the main > branch whenever you are ready for it. Right, let me just pull, compile, and test it this afternoon. Then I will merge and push. |
From: Eric L. <eri...@gm...> - 2021-06-20 12:46:38
|
Sounds like a fine idea to me. I posted a change to the hairyblocks branch that will use the function name, or text after the cell start as the 'defun' for add log. The hairyblocks branch has been stable for a while with a lot of developers at MW using it. It should be ready to merge into the main branch whenever you are ready for it. Eric On 6/20/21 2:46 AM, Uwe Brauer wrote: >>>> "EL" == Eric Ludlam <eri...@gm...> writes: > Hi Eric, > > Thanks for he quick reply >> Hiya, >> matlab-mode has defined `add-log-current-defun-function' for a long time. > You are right, I did not test this carefully enough. > > However in lisp files, for examples defcustom is also recognised, so the > question is whether it would make sense to enhance the relevant matlab functionality. > > What I am thinking of is a good old script. > > I see two candidates here > > 1. A cell with a header > > Like > %% Test the implementation of Euler's method > > 2. A direct execution of a function like > [t,y] = ode45(f, intv, y0); > > > What do you think about it? > > Regards > > Uwe |
From: Uwe B. <ou...@ma...> - 2021-06-20 06:46:35
|
>>> "EL" == Eric Ludlam <eri...@gm...> writes: Hi Eric, Thanks for he quick reply > Hiya, > matlab-mode has defined `add-log-current-defun-function' for a long time. You are right, I did not test this carefully enough. However in lisp files, for examples defcustom is also recognised, so the question is whether it would make sense to enhance the relevant matlab functionality. What I am thinking of is a good old script. I see two candidates here 1. A cell with a header Like %% Test the implementation of Euler's method 2. A direct execution of a function like [t,y] = ode45(f, intv, y0); What do you think about it? Regards Uwe |
From: Eric L. <eri...@gm...> - 2021-06-20 00:06:07
|
Hiya, matlab-mode has defined `add-log-current-defun-function' for a long time. I'm using the hairyblocks branch, and tried the below command and it added the function name of a nested function to the record similar to below. While the implementation of add-log-current-defun-function has changed in my branch, how add-log it is integrated with in matlab-mode hasn't really changed. Eric On 6/18/21 4:22 PM, Uwe Brauer wrote: > Hi > > I use add-change-log-entry-other-window a lot. > > The nice thing about elisp files is that you get entries like > > * matlab_init.el (my-matlab-shell-mode-hook): 296 > > There is nothing similar for matlab. > > Does anybody have a hack for this feature? > > Regards > > Uwe > > > _______________________________________________ > Matlab-emacs-discuss mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matlab-emacs-discuss |