* Prevent multi-line reformatting of embedded calc results
@ 2020-11-05 8:43 Eric S Fraga
2020-11-05 10:43 ` Robert Pluim
0 siblings, 1 reply; 4+ messages in thread
From: Eric S Fraga @ 2020-11-05 8:43 UTC (permalink / raw)
To: help-gnu-emacs
Hello all,
TL;DR: how do I control (or prevent) the formatting of the evaluated
embedded Calc lines?
I use embedded Calc quite a bit. In one of my use cases, I have a
specific format expected for the lines as the resulting document is
post-processed. In this case, I want all individual Calc expressions,
including with the => results, to be constrained to a single line each.
If the overall line ends up longer than the window is wide, Calc
reformats to use multiple lines, breaking at obvious points. Normally,
this would be quite desirable but, in my use case, it breaks the
post-processing.
I can make the window wider (I do have a very wide screen) but this is
fragile as equations & results get updated automatically and I may not
notice.
Thank you,
eric
--
Eric S Fraga via Emacs 28.0.50 & org 9.4 on Debian bullseye/sid
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Prevent multi-line reformatting of embedded calc results
2020-11-05 8:43 Prevent multi-line reformatting of embedded calc results Eric S Fraga
@ 2020-11-05 10:43 ` Robert Pluim
2020-11-05 14:08 ` Eric S Fraga
0 siblings, 1 reply; 4+ messages in thread
From: Robert Pluim @ 2020-11-05 10:43 UTC (permalink / raw)
To: Eric S Fraga; +Cc: help-gnu-emacs
Eric S Fraga <e.fraga@ucl.ac.uk> writes:
> Hello all,
>
> TL;DR: how do I control (or prevent) the formatting of the evaluated
> embedded Calc lines?
>
> I use embedded Calc quite a bit. In one of my use cases, I have a
> specific format expected for the lines as the resulting document is
> post-processed. In this case, I want all individual Calc expressions,
> including with the => results, to be constrained to a single line each.
>
> If the overall line ends up longer than the window is wide, Calc
> reformats to use multiple lines, breaking at obvious points. Normally,
> this would be quite desirable but, in my use case, it breaks the
> post-processing.
>
> I can make the window wider (I do have a very wide screen) but this is
> fragile as equations & results get updated automatically and I may not
> notice.
You could override 'math-format-nice-expr' to not do that.
Robert
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Prevent multi-line reformatting of embedded calc results
2020-11-05 10:43 ` Robert Pluim
@ 2020-11-05 14:08 ` Eric S Fraga
2020-11-05 14:36 ` Robert Pluim
0 siblings, 1 reply; 4+ messages in thread
From: Eric S Fraga @ 2020-11-05 14:08 UTC (permalink / raw)
To: help-gnu-emacs
On Thursday, 5 Nov 2020 at 11:43, Robert Pluim wrote:
> You could override 'math-format-nice-expr' to not do that.
Hi Robert,
Thank you for this suggestion. It did not work but it did send me down
a very interesting rabbit hole. :-) Calc code is, shall we say, somewhat
terse at times.
I eventually got out of the rabbit hole and did so with a very simple
solution:
% [calc-mode: break: nil]
I should have known that Calc would have what I want; it's just that
there's so much that it's difficult to find what you need at times. The
key, for embedded mode, is the variable calc-embedded-mode-vars which
tells you what mode settings are possible/understood.
Thanks again,
eric
--
Eric S Fraga via Emacs 28.0.50 & org 9.4 on Debian bullseye/sid
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Prevent multi-line reformatting of embedded calc results
2020-11-05 14:08 ` Eric S Fraga
@ 2020-11-05 14:36 ` Robert Pluim
0 siblings, 0 replies; 4+ messages in thread
From: Robert Pluim @ 2020-11-05 14:36 UTC (permalink / raw)
To: Eric S Fraga; +Cc: help-gnu-emacs
Eric S Fraga <e.fraga@ucl.ac.uk> writes:
> On Thursday, 5 Nov 2020 at 11:43, Robert Pluim wrote:
>> You could override 'math-format-nice-expr' to not do that.
>
> Hi Robert,
>
> Thank you for this suggestion. It did not work but it did send me down
> a very interesting rabbit hole. :-) Calc code is, shall we say, somewhat
> terse at times.
>
Thatʼs one way to put it :-)
> I eventually got out of the rabbit hole and did so with a very simple
> solution:
>
> % [calc-mode: break: nil]
>
> I should have known that Calc would have what I want; it's just that
> there's so much that it's difficult to find what you need at times. The
> key, for embedded mode, is the variable calc-embedded-mode-vars which
> tells you what mode settings are possible/understood.
That tells me I looked at completely the wrong part of the code :-)
(hey, itʼs even documented, kind of)
Robert
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-11-05 14:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-05 8:43 Prevent multi-line reformatting of embedded calc results Eric S Fraga
2020-11-05 10:43 ` Robert Pluim
2020-11-05 14:08 ` Eric S Fraga
2020-11-05 14:36 ` Robert Pluim
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.