Skip to content

company matlab shell mode doom emacs #59

@jclaisse

Description

@jclaisse

Hi,
I am using the doom emacs version and last matlab mode under matlab 2022b.
I have the company matlab shell mode completion which does not work.
Instead of pop-up me the completion into the company pop up buffer, I was output me:

>> emacsdocomplete('EEG.(cond')

and when I hit RETURN I get (the appropriate):

emacs_completions_output =
 java.lang.String[]:
   'cond'
   'condeig'

I use this snippet of code in my config:

;; https://sourceforge.net/p/matlab-emacs/mailman/matlab-emacs-discuss/thread/[email protected]
(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)))

I works but another issue came up...

error in process filter: run-hooks: Text is read-only
error in process filter: Text is read-only

when I enter next matlab commands into into the matlab shell buffer.
I understood that it is the '>' of HTML tag error char which triggers the error :

aaa
<ERRORTXT>
Unrecognized function or variable 'aaa'.
</ERRORTXT> 
>> 

Using this M-: command on the '>' :

(let ((inhibit-read-only t))
  (delete-char 1))

for deleting this char, remove error.
I don't know if there is a cleaner way to fix this general issue : but the char > is currently an issue for matlab-shell....

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions