Re: [Matlab-emacs-discuss] completion and goto-function in matlab-mode (Doom emacs)

2021-01-19 Thread Haik Silm
Hi Eric, I checked that `comint-prompt-read-only` is set to t, I guess that's it. In principle it is nice that you cannot delete the shell output, I remember long time ago when I was running shells in emacs I was annoyed that you could do it. Indeed, this problem can turn up in many places,

Re: [Matlab-emacs-discuss] completion and goto-function in matlab-mode (Doom emacs)

2021-01-18 Thread Uwe Brauer
>>> "KC" == Karthik Chikmagalur writes: >> Sorry for jumping into the discussion (and almost knowing nothing about >> xref), I do use org mode to execute matlab code via babel and I am sure >> other users as well. > Me too, that's why I put it there while I was testing the patch. >> Does this

Re: [Matlab-emacs-discuss] completion and goto-function in matlab-mode (Doom emacs)

2021-01-18 Thread Eric Ludlam
Thanks Karthik, I made that change too and pushed onto the branch. Eric On 1/17/21 11:53 PM, Karthik Chikmagalur wrote: Hi Eric, The `matlab-local-xref` backend is quite useful, thank you for taking the time to go through it. I did notice something in this function: (defun matlab-shell-xref

Re: [Matlab-emacs-discuss] completion and goto-function in matlab-mode (Doom emacs)

2021-01-18 Thread Jonathan Sahar
Thanks Haik! It works!! On Sun, 17 Jan 2021 at 21:35, Haik Silm wrote: > Dear Jonathan, > > I am running Doom Emacs and had the same issue. The problem is > that the temporary output should be removed, but the lines in the > shell-buffer have a special read-only mode. The work-around is to > s

Re: [Matlab-emacs-discuss] completion and goto-function in matlab-mode (Doom emacs)

2021-01-18 Thread Karthik Chikmagalur
> Sorry for jumping into the discussion (and almost knowing nothing about > xref), I do use org mode to execute matlab code via babel and I am sure > other users as well. Me too, that's why I put it there while I was testing the patch. > Does this in anyway influence the part > >> (and (me

Re: [Matlab-emacs-discuss] completion and goto-function in matlab-mode (Doom emacs)

2021-01-18 Thread Uwe Brauer
>>> "KC" == Karthik Chikmagalur writes: > Hi Eric, > The `matlab-local-xref` backend is quite useful, thank you for taking > the time to go through it. I did notice something in this function: > (defun matlab-shell-xref-activate () > "Function to activate xref backend. > Add this function to `

Re: [Matlab-emacs-discuss] completion and goto-function in matlab-mode (Doom emacs)

2021-01-17 Thread Karthik Chikmagalur
Hi Eric, The `matlab-local-xref` backend is quite useful, thank you for taking the time to go through it. I did notice something in this function: (defun matlab-shell-xref-activate () "Function to activate xref backend. Add this function to `xref-backend-functions' for matlab shell to use xref

Re: [Matlab-emacs-discuss] completion and goto-function in matlab-mode (Doom emacs)

2021-01-17 Thread Eric Ludlam
Thanks Haik. That implies a patch like this will fix the issue... ? Do you know what is being set to read-only and why?  A better patch might disable whatever that is since other code may need something similar, and it would be better to fix the source than add little patches like this around

Re: [Matlab-emacs-discuss] completion and goto-function in matlab-mode (Doom emacs)

2021-01-17 Thread Haik Silm
Dear Jonathan, I am running Doom Emacs and had the same issue. The problem is that the temporary output should be removed, but the lines in the shell-buffer have a special read-only mode. The work-around is to set `inhibit-read-only`. So what solved it: (defadvice! inhibit-real-only-a (old

Re: [Matlab-emacs-discuss] completion and goto-function in matlab-mode (Doom emacs)

2021-01-17 Thread Eric Ludlam
Hi Jonathan, I tried using: M-x matlab-shell RET M-x company-mode RET then @ matlab prompt: >> fo M-x company-matlab-shell RET to simulate what you have in your stack trace below.  I get a yellow popup with completions I expect in it.  I can pick one and it then inserts the completion corr

Re: [Matlab-emacs-discuss] completion and goto-function in matlab-mode (Doom emacs)

2021-01-17 Thread Eric Ludlam
Hi Karthik, Thanks for the update and explanation. I finally had some time to sit with your code, try it out in a few situations, and teach myself how xref works.  I haven't had much opportunity to learn all the new stuff in eieio that it uses, so that was nice. I created matlab-xref.el on

Re: [Matlab-emacs-discuss] completion and goto-function in matlab-mode (Doom emacs)

2020-12-23 Thread Karthik Chikmagalur
Hi Eric, > I did look at the elisp backend which it advertised as the prime > example.  That one is quite large compared to your patch.  Do you > think the below would expand out to be much larger?  I'm considering > if xref support would move into it's own file or not. The xref support for MATLA

Re: [Matlab-emacs-discuss] completion and goto-function in matlab-mode (Doom emacs)

2020-12-21 Thread Eric Ludlam
Hi Karthik, I finally had a moment to look at this.  Sorry for the delay. The way xref works is unfamiliar to me, as I haven't used some of the techniques it depends on, so I have questions but don't feel like I can provide any useful feedback. I did look at the elisp backend which it advert

Re: [Matlab-emacs-discuss] completion and goto-function in matlab-mode (Doom emacs)

2020-11-30 Thread Eric Ludlam
On 11/30/20 2:53 AM, Uwe Brauer wrote: We've been using a majority of those patches deployed at MW for a while, so they should be good to go.  If the completion bit seems too risky, feel free to leave it out. I compiled, is it ok to test it for one day before pushing? Is there anything specific

Re: [Matlab-emacs-discuss] completion and goto-function in matlab-mode (Doom emacs)

2020-11-30 Thread John Ciolfi
is process works. Thanks John From: Uwe Brauer Sent: Monday, November 30, 2020 11:29 AM To: John Ciolfi Cc: Eric Ludlam; Uwe Brauer; matlab-emacs-discuss@lists.sourceforge.net Subject: Re: [Matlab-emacs-discuss] completion and goto-function in matlab-mode (Doom emacs

Re: [Matlab-emacs-discuss] completion and goto-function in matlab-mode (Doom emacs)

2020-11-30 Thread Uwe Brauer
>>> "JC" == John Ciolfi writes: Hi John > Hi Uwe, > Some items to test: > * The handling of *.m files. matlab.el used to contain: > (add-to-list 'auto-mode-alist '("\\.m$" . matlab-mode)) > which overrides the Emacs default of associating *.m files with > objc-mode. This setting means it

Re: [Matlab-emacs-discuss] completion and goto-function in matlab-mode (Doom emacs)

2020-11-30 Thread John Ciolfi
anlding of "..." at EOF, mlint handling when mlint path is invalid, etc. Thanks John From: Uwe Brauer Sent: Monday, November 30, 2020 2:53 AM To: Eric Ludlam Cc: matlab-emacs-discuss@lists.sourceforge.net Subject: Re: [Matlab-emacs-discuss] c

Re: [Matlab-emacs-discuss] completion and goto-function in matlab-mode (Doom emacs)

2020-11-29 Thread Uwe Brauer
>>> "EL" == Eric Ludlam writes: > On 11/29/20 10:45 AM, Uwe Brauer wrote: > "EL" == Eric Ludlam writes: >>> Hi Uwe, >>> There are a bunch of old misc fixes over in the usage1 branch that we >>> should probably merge into master.  The save-and-go work I was doing >>> never became as robust as

Re: [Matlab-emacs-discuss] completion and goto-function in matlab-mode (Doom emacs)

2020-11-29 Thread Eric Ludlam
On 11/29/20 10:45 AM, Uwe Brauer wrote: "EL" == Eric Ludlam writes: Hi Uwe, There are a bunch of old misc fixes over in the usage1 branch that we should probably merge into master.  The save-and-go work I was doing never became as robust as I wanted, but it should be transparent if no one tries

Re: [Matlab-emacs-discuss] completion and goto-function in matlab-mode (Doom emacs)

2020-11-29 Thread Uwe Brauer
>>> "EL" == Eric Ludlam writes: > Hi Uwe, > There are a bunch of old misc fixes over in the usage1 branch that we > should probably merge into master.  The save-and-go work I was doing > never became as robust as I wanted, but it should be transparent if no > one tries to activate the feature. 

Re: [Matlab-emacs-discuss] completion and goto-function in matlab-mode (Doom emacs)

2020-11-29 Thread Uwe Brauer
>>> "EL" == Eric Ludlam writes: Hi Eric, > Hi Uwe, > There are a bunch of old misc fixes over in the usage1 branch that we > should probably merge into master.  The save-and-go work I was doing > never became as robust as I wanted, but it should be transparent if no > one tries to activate the

Re: [Matlab-emacs-discuss] completion and goto-function in matlab-mode (Doom emacs)

2020-11-29 Thread Eric Ludlam
Hi Uwe, There are a bunch of old misc fixes over in the usage1 branch that we should probably merge into master.  The save-and-go work I was doing never became as robust as I wanted, but it should be transparent if no one tries to activate the feature.  It also includes my patch for completio

Re: [Matlab-emacs-discuss] completion and goto-function in matlab-mode (Doom emacs)

2020-11-29 Thread Uwe Brauer
>>> "KC" == Karthik Chikmagalur writes: Hello > Hi, > Please ignore the patch in my previous email, it failed on some edge > cases. This one should work better and only use matlab-shell for > jumping to definitions when xref is invoked from matlab-mode or > matlab-shell-mode. Sorry for jumping

Re: [Matlab-emacs-discuss] completion and goto-function in matlab-mode (Doom emacs)

2020-11-29 Thread Karthik Chikmagalur
Hi, Please ignore the patch in my previous email, it failed on some edge cases. This one should work better and only use matlab-shell for jumping to definitions when xref is invoked from matlab-mode or matlab-shell-mode. Karthik diff -u /home/karthik/.local/share/git/matlab-emacs-src/matlab-sh

Re: [Matlab-emacs-discuss] completion and goto-function in matlab-mode (Doom emacs)

2020-11-28 Thread Karthik Chikmagalur
Hi Jonathan and Eric, Jon, to get help on the function at point you can do something like this: (defun matlab-shell-help-at-point () (interactive) (let ((fcn (matlab-read-word-at-point))) (if (and fcn (not (equal fcn ""))) (matlab-shell-describe-command fcn (define-key matlab-

Re: [Matlab-emacs-discuss] completion and goto-function in matlab-mode (Doom emacs)

2020-11-28 Thread Eric Ludlam
Hi, The existing matlab completion stuff should work with company .. or at least there is code in there referencing company completion engine.  I was never a fan so I don't use that particular package. In the MATLAB menu, you will find a "Locate MATLAB function" option which is similar to ju

Re: [Matlab-emacs-discuss] completion and goto-function in matlab-mode (Doom emacs)

2020-11-26 Thread Jonathan Sahar
Hi Eric, Thanks so much for taking the time to test it! It's not unique to that sturct. Is there anything that I need/can configure on terms of the completion engine? I'm using company for most other things, maybe there's some conflict, or some missing configuration? Thank you for the patch! I'll

Re: [Matlab-emacs-discuss] completion and goto-function in matlab-mode (Doom emacs)

2020-11-26 Thread Eric Ludlam
Hi Jonathan, I happened to have MATLAB 18a installed and was able to test using matlab.el, and matlab-shell.el from git, but could not replicate a completion problem.  Sorry. Is it special to the "EEG" data structure, or does this occur everywhere? You had some other questions too. Matlab m

Re: [Matlab-emacs-discuss] completion and goto-function in matlab-mode (Doom emacs)

2020-11-25 Thread Jonathan Sahar
Hi Eric, thanks for your reply! I'm running version '9.4.0.949201 (R2018a) Update 6'. I've installed matlab-mode through Doom emacs' (package! ...) directive, but I've looked at the changelog locally and on sourceforge, and the latest commit is the same one... Best, Jonathan On Wed, 25 Nov

Re: [Matlab-emacs-discuss] completion and goto-function in matlab-mode (Doom emacs)

2020-11-25 Thread Eric Ludlam
Hi Jonathan, As new version of MATLAB come out, the text that comes out for errors, completions, and all sorts of things change which can break the shell. What version of MATLAB are you using, and which version of the matlab mode code are you using? We made a bunch of updates last winter to

[Matlab-emacs-discuss] completion and goto-function in matlab-mode (Doom emacs)

2020-11-18 Thread Jonathan Sahar
I've been working with matlab-mode and matlab-shell for the last few days, and I'm really digging it so far. The only two things I can't get to work properly are completion - neither in shell, nor in .m files - and jumping to function definitions, and I would really appreciate some help with these.