필터 지우기
필터 지우기

Any way to automatically save my LiveScript .mlx file as a Text-based .m file?

조회 수: 25 (최근 30일)
As given here, LiveScript is rather unhelpful for source control in terms of tractability and interpretation.
I like using LiveScript, but want the ease of source control of a text-based file, such as .m files.
Sometimes, I manually save (a copy of) the LiveScript as a .m file, so that the latest changes may be interpreted in git. Is there a way to automatically copy/save a .m file every time I save the .mlx file?, instead of manually clicking some menu options? This is one way I hope I can access the ease of writing in LiveScript while not compromising on the ease of source control.
  댓글 수: 3
Aryan Ritwajeet Jha
Aryan Ritwajeet Jha 2024년 2월 28일
편집: Aryan Ritwajeet Jha 2024년 2월 28일
@Paul I'm not sure if I can use any of these APIs to do the needful.
snip of the doc file generated by running the line of code
Paul
Paul 2024년 2월 28일
You'll have to keep exploring to determine if this is even feasible. For example,
doc matlab.desktop.editor.Document
should show somehting about about addListener in the popup window. Maybe you can attach a listener to a Document to catch when the document is being saved. I don't use listner/event and also don't use matlab.desktop.editor so can't be of any help. I was just aware that matlab.desktop.editor is an API that might be worth exploring. Too bad it doesn't have formal doc pages as previously discussed here, so you'll have to do some clicking through links and such in pop-up windows. Maybe opening a new question specifcally related to matlab.desktop.editor or using it to solve this problem will get more traction. Also, try searching the mathworks.com for "matlab.desktop.editor" as it does come up in some discussions and blog posts.

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2024년 2월 27일
No, there is not.
  댓글 수: 4
Aryan Ritwajeet Jha
Aryan Ritwajeet Jha 2024년 7월 6일 23:09
Thank you Hamid for this great update! Will wait for the full release for 2024b to test it out!
Hamid Farshi
Hamid Farshi 2024년 7월 6일 23:13
no problem. just make sure you use the "new MATLAB Desktop". The option is only available if you use the new desktop.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by