emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Table formula format string doesn't recognize %
@ 2024-05-21  6:12 Daniel Clemente
  2024-05-21  9:11 ` Ihor Radchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Clemente @ 2024-05-21  6:12 UTC (permalink / raw)
  To: Org-mode Org-Mode

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

Hi, this stopped working, possibly after a related change
to org-table-eval-formula 2 days ago.

|  a |  b | percent of a in b |
|----+----+-------------------|
| 10 | 20 | #ERROR            |
| 20 | 30 | #ERROR            |
#+TBLFM: $3=($1/$2)*100;%.2f%%

A simpler format string like ;%.2f also fails.
It seems the regexp doesn't allow the leading %.

This leading % appears in the manual, so this syntax is correct.
 | =$1+$2;%.2f=       | Same, format result to two decimals              |

[-- Attachment #2: Type: text/html, Size: 684 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Table formula format string doesn't recognize %
  2024-05-21  6:12 Table formula format string doesn't recognize % Daniel Clemente
@ 2024-05-21  9:11 ` Ihor Radchenko
  2024-05-21 14:42   ` Daniel Clemente
  0 siblings, 1 reply; 3+ messages in thread
From: Ihor Radchenko @ 2024-05-21  9:11 UTC (permalink / raw)
  To: Daniel Clemente; +Cc: Org-mode Org-Mode

Daniel Clemente <n142857@gmail.com> writes:

> Hi, this stopped working, possibly after a related change
> to org-table-eval-formula 2 days ago.
>
> |  a |  b | percent of a in b |
> |----+----+-------------------|
> | 10 | 20 | #ERROR            |
> | 20 | 30 | #ERROR            |
> #+TBLFM: $3=($1/$2)*100;%.2f%%

Oops. Alas, that fix for
https://orgmode.org/list/87ply5v1gj.fsf@localhost did not work.
Fixed, on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=bae1b1fe7
I reverted the commit.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Table formula format string doesn't recognize %
  2024-05-21  9:11 ` Ihor Radchenko
@ 2024-05-21 14:42   ` Daniel Clemente
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Clemente @ 2024-05-21 14:42 UTC (permalink / raw)
  To: Org-mode Org-Mode

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

Thanks.

On Tue, 21 May 2024 at 09:10, Ihor Radchenko <yantar92@posteo.net> wrote:

> Daniel Clemente <n142857@gmail.com> writes:
>
> > Hi, this stopped working, possibly after a related change
> > to org-table-eval-formula 2 days ago.
> >
> > |  a |  b | percent of a in b |
> > |----+----+-------------------|
> > | 10 | 20 | #ERROR            |
> > | 20 | 30 | #ERROR            |
> > #+TBLFM: $3=($1/$2)*100;%.2f%%
>
> Oops. Alas, that fix for
> https://orgmode.org/list/87ply5v1gj.fsf@localhost did not work.
> Fixed, on main.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=bae1b1fe7
> I reverted the commit.
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>
>

[-- Attachment #2: Type: text/html, Size: 1784 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-05-21 14:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-21  6:12 Table formula format string doesn't recognize % Daniel Clemente
2024-05-21  9:11 ` Ihor Radchenko
2024-05-21 14:42   ` Daniel Clemente

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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).