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: Hongyi Zhao
Subject: Re: Format code snippets of the wolfram language to improve readability.
Date: Tue, 26 Apr 2022 22:00:33 +0800

On Tue, Apr 26, 2022 at 9:17 PM Thibaut Verron <thibaut.verron@gmail.com> wrote:
>
> Hi,
>
> Once the mode is activated, introducing newlines at key places should
> make the formula readable.

Yes. It works. But this method needs to hit many times on <RET> to
achieve the goal.

> You can also use sexp-navigation commands to
> quickly navigate the parentheses and find those key points.

I don't have this command, as shown in the attachment.

> 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: image.png
Description: PNG image


reply via email to

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