unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Hongyi Zhao <hongyi.zhao@gmail.com>
To: Thibaut Verron <thibaut.verron@gmail.com>
Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: Format code snippets of the wolfram language to improve readability.
Date: Tue, 26 Apr 2022 22:00:33 +0800	[thread overview]
Message-ID: <CAGP6POL8nGw-Sa0vdtnQb=ftZ+G3zfXvP-=tvN75PYFJG=f9GQ@mail.gmail.com> (raw)
In-Reply-To: <377659b8-dc92-b916-f406-831e1bb24ffb@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1671 bytes --]

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 #2: image.png --]
[-- Type: image/png, Size: 108812 bytes --]

  reply	other threads:[~2022-04-26 14:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-26  8:42 Format code snippets of the wolfram language to improve readability Hongyi Zhao
2022-04-26  8:53 ` Robert Pluim
2022-04-26  9:34   ` Hongyi Zhao
2022-04-26  9:40   ` Hongyi Zhao
2022-04-26 13:13     ` Thibaut Verron
2022-04-26 14:00       ` Hongyi Zhao [this message]
2022-04-26 14:31         ` Thibaut Verron
2022-04-27  0:32           ` Hongyi Zhao
2022-04-27  1:14             ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-04-27  7:59             ` Thibaut Verron
2022-04-27  8:33               ` Hongyi Zhao
2022-04-27  9:00                 ` thibaut.verron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAGP6POL8nGw-Sa0vdtnQb=ftZ+G3zfXvP-=tvN75PYFJG=f9GQ@mail.gmail.com' \
    --to=hongyi.zhao@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=thibaut.verron@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).