Thanks Haik! It works!!
On Sun, 17 Jan 2021 at 21:35, Haik Silm <haik.s...@kuleuven.be> 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 > set `inhibit-read-only`. > > So what solved it: > > (defadvice! inhibit-real-only-a (oldfun &rest r) > "Temporary remove read-only lines in shell buffer" > :around#'matlab-shell-collect-command-output > (let ((inhibit-read-only t)) (apply oldfun r))) > > Best regards, > Haik > > 17.01.2021 20:20 Eric Ludlam <ericlud...@gmail.com> kirjutas: > > 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 correctly. > > > > I tried this in Emacs 26.3 as installed by Ubuntu, and also > > 28.0.50 as > > downloaded from git yesterday morning. > > > > I tend to run my Emacs as stock as possible so I don't > > accidentally > > create dependencies on random tools, so I'm not familiar with a > > more > > complex company mode setup. > > > > Due to the nature of using MATLAB Shell, I recommend looking at > > the > > value of `comint-prompt-read-only' to see if that might be > > involved. It > > is nil by default in my Emacsen, and matlab-shell doesn't set it > > because > > I do a lot of fiddling with the buffer in the background. If it > > were t, > > I would imagine a range of other things not working either > > though. > > > > That's pretty much all I can think of. Sorry I can't be more > > helpful. :( > > Eric > > > > On 1/6/21 5:50 AM, Jonathan Sahar wrote: > >> Hi, > >> I'm still getting the same error message with the updated > >> version of > >> the repository... > >> the stack trace I get is: > >> ``` > >> Debugger entered--Lisp error: (error "Company: backend > >> company-matlab-shell error \"Text is read-only\" with args > >> (prefix)") > >> signal(error ("Company: backend company-matlab-shell error > >> \"Text is > >> read-only\" with args (prefix)")) > >> error("Company: backend %s error \"%s\" with args %s" > >> company-matlab-shell "Text is read-only" (prefix)) > >> company-call-backend-raw(prefix) > >> apply(company-call-backend-raw prefix) > >> company--force-sync(company-call-backend-raw (prefix) > >> company-matlab-shell) > >> company-call-backend(prefix) > >> company--begin-new() > >> company--perform() > >> company-auto-begin() > >> company-manual-begin() > >> #f(compiled-function (backend &optional callback) "Start a > >> completion at point using BACKEND." (interactive > >> #f(compiled-function > >> () #<bytecode 0x27b2831>)) #<bytecode > >> 0x36c7e49>)(company-matlab-shell) > >> apply(#f(compiled-function (backend &optional callback) > >> "Start a > >> completion at point using BACKEND." (interactive > >> #f(compiled-function > >> () #<bytecode 0x29caa1d>)) #<bytecode 0x36c7e49>) > >> company-matlab-shell) > >> company-begin-backend(company-matlab-shell) > >> company-matlab-shell(interactive) > >> funcall-interactively(company-matlab-shell interactive) > >> ``` > >> > >> and the output in the console is: > >> > >> ``` > >> >> emacsdocomplete('all') > >> > >> emacs_completions_output = > >> > >> java.lang.String[]: > >> > >> 'all' > >> 'allchild' > >> 'allElectrodes' > >> 'allfeasible' > >> 'allMuPADNotebooks' > >> > >> ``` > >> > >> which is the same output that I get by running M-x > >> matlab-complete-symbol, if that helps to make sense of things. > >> > >> Thanks, > >> Jonathan > > > > > > > > _______________________________________________ > > Matlab-emacs-discuss mailing list > > Matlab-emacs-discuss@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/matlab-emacs-discuss >
_______________________________________________ Matlab-emacs-discuss mailing list Matlab-emacs-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matlab-emacs-discuss