From: Pascal Wittmann <PascalWittmann@gmx.net>
To: emacs-orgmode@gnu.org
Subject: orgtbl-insert-radio-table forbid blanks in the table name
Date: Tue, 09 Oct 2012 09:05:01 +0200 [thread overview]
Message-ID: <5073CC9D.8030100@gmx.net> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 648 bytes --]
Hi,
I noticed that its possible to enter a name containing blanks when
calling orgtbl-insert-radio-table. I don't think that this is intended,
because blanks are used as separators in the "#+ORGTBL" line.
Entering a the name "first table" will result in the following error
message:
"No such transformation function table"
For me (as a novice) it was at first not obvious what I did wrong. My
suggestion is to chose an other input method that forbids blanks.
I fixed this locally with the attached patch, but I'm sure there are
better solutions (I find it unintuitive that blanks terminate the input).
Best Regards
Pascal
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: orgtbl-insert-radio-table-no-blanks.diff --]
[-- Type: text/x-patch; name="orgtbl-insert-radio-table-no-blanks.diff", Size: 529 bytes --]
diff --git a/lisp/org-table.el b/lisp/org-table.el
index 0555041..a8d2826 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -4437,7 +4437,7 @@ First element has index 0, or I0 if given."
(txt (nth 1 e))
name pos)
(unless e (error "No radio table setup defined for %s" major-mode))
- (setq name (read-string "Table name: "))
+ (setq name (read-no-blanks-input "Table name: "))
(while (string-match "%n" txt)
(setq txt (replace-match name t t txt)))
(or (bolp) (insert "\n"))
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next reply other threads:[~2012-10-09 7:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-09 7:05 Pascal Wittmann [this message]
2012-10-11 12:35 ` orgtbl-insert-radio-table forbid blanks in the table name 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5073CC9D.8030100@gmx.net \
--to=pascalwittmann@gmx.net \
--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 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.