help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Format code snippets of the wolfram language to improve readability.


From: Thibaut Verron
Subject: Re: Format code snippets of the wolfram language to improve readability.
Date: Tue, 26 Apr 2022 15:13:29 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0

Hi,

Once the mode is activated, introducing newlines at key places should make the formula readable. You can also use sexp-navigation commands to quickly navigate the parentheses and find those key points.

I'm not aware of any language mode which offers to automatically introduce line breaks in a long one-liner.

Best wishes,

Thibaut

On 26/04/2022 11:40, Hongyi Zhao wrote:
On Tue, Apr 26, 2022 at 4:53 PM Robert Pluim <rpluim@gmail.com> wrote:
On Tue, 26 Apr 2022 16:42:26 +0800, Hongyi Zhao <hongyi.zhao@gmail.com> said:
     Hongyi> I've the following code snippets of the wolfram language:
     Hongyi> ```
     Hongyi> Hold[ReplaceRepeated[List[A, B, IA, A, B, IA, A, B, IA, A, B, IA, 
A,
     Hongyi> B, IA], RuleDelayed[Condition[List[Pattern[x, BlankNullSequence[]],
     Hongyi> Pattern[y, Blank[]], Pattern[z, Blank[]], Pattern[t,
     Hongyi> BlankNullSequence[]]], Simplify[Equal[Dot[y, z], 
IdentityMatrix[3]]]],
     Hongyi> List[x, t]]]]
     Hongyi> ```

     Hongyi> I want to format it in Emacs to improve readability. Any hints for
     Hongyi> achieving this purpose?

Install wolfram-mode?
BTW, here [1] is a more recent and alternative version of
wolfram-mode, but it does not have the functions required for the
issues discussed here.

[1] https://github.com/xahlee/xah-wolfram-mode

HZ

Attachment: Screenshot_20220426_151253.png
Description: PNG image


reply via email to

[Prev in Thread] Current Thread [Next in Thread]