emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Thierry Banel <tbanelwebmin@free.fr>
To: Org-Mode mailing list <emacs-orgmode@gnu.org>
Subject: fix bug in ascii plot
Date: Mon, 14 Dec 2015 22:38:19 +0100	[thread overview]
Message-ID: <566F36CB.2060702@free.fr> (raw)

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

The 16c7594 commit (found by bisecting) revealeda bug in ascii-plot.
Attached is a fix.

To test, consider this table:
| 1 |
| 2 |
| 3 |

The cursor being in the table, type C-c " a


Result with the bug:
| 1 |   |
| 2 |   |
| 3 |   |
#+TBLFM:  2='(orgtbl-ascii-draw $1 1 3 12)


Result with the fix:
| 1 |              |
| 2 | WWWWWW       |
| 3 | WWWWWWWWWWWW |
#+TBLFM: $2='(orgtbl-ascii-draw $1 1 3 12)



[-- Attachment #2: 0001-Fix-missing-dollar-bug-revealed-by-commit-16c7594.patch --]
[-- Type: text/x-diff, Size: 846 bytes --]

From 19f0712d8bdefb76f54218068599b5abce6b18b9 Mon Sep 17 00:00:00 2001
From: Thierry Banel <tbanelwebmin@free.fr>
Date: Mon, 14 Dec 2015 22:22:03 +0100
Subject: [PATCH] Fix missing dollar bug revealed by commit 16c7594

* org-table.el (orgtbl-ascii-plot):
add missing dollar in formula
---
 lisp/org-table.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org-table.el b/lisp/org-table.el
index 474a44f..265e74b 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -5295,7 +5295,7 @@ characters width of the plot.  ASK may also be the
     (org-table-store-formulas
      (cons
       (cons
-       (number-to-string (1+ col))
+       (concat "$" (number-to-string (1+ col)))
        (format "'(%s $%s %s %s %s)"
 	       "orgtbl-ascii-draw" col min max length))
       (org-table-get-stored-formulas)))
-- 
2.1.4


             reply	other threads:[~2015-12-14 21:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-14 21:38 Thierry Banel [this message]
2015-12-14 23:13 ` fix bug in ascii plot Nicolas Goaziou

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.orgmode.org/

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

  git send-email \
    --in-reply-to=566F36CB.2060702@free.fr \
    --to=tbanelwebmin@free.fr \
    --cc=emacs-orgmode@gnu.org \
    /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.
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).