emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: nicholas.dokos@hp.com
Cc: =?us-ascii?Q?=3D=3FISO-8859-1=3FQ=3FAndr=3DE1s=5FMajor=3F=3D?=
	<andras.g.major@gmail.com>, emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Bug: named columns in tables not working if name contains "_"
Date: Tue, 23 Aug 2011 16:49:33 +0200	[thread overview]
Message-ID: <21E3246E-EA8B-4361-8420-56DD06C830ED@gmail.com> (raw)
In-Reply-To: <13154.1314109925@alphaville.dokosmarshall.org>


On Aug 23, 2011, at 4:32 PM, Nick Dokos wrote:

> Carsten Dominik <carsten.dominik@gmail.com> wrote:
> 
>> 
>> On Aug 23, 2011, at 3:53 PM, Nick Dokos wrote:
>> 
>>> András Major <andras.g.major@gmail.com> wrote:
>>> 
>>> 
>>>> Yet another one I just stumbled across: if I create a table and use
>>>> "!" in the first column to assign names to the columns, I can only
>>>> reference those columns by name in #+TBLFM: if the names don't contain
>>>> a "_" character.  This isn't mentioned in the docs and shouldn't be
>>>> so, IMHO.  I haven't checked for other common characters that are
>>>> prohibited, but the "_" bites me quite a bit.
>>>> 
>>> 
>>> Try adding an underscore to the regexp on line 2179 of org-table.el -
>>> something like this (untested):
>>> 
>>>         ...
>>> 	  (if (string-match "^[a-zA-Z][a-zA-Z0-9_]*$" name)
>>> 	      (push (cons name (int-to-string cnt)) org-table-column-names))))
>>> 
>>> 
>>> The only characters permitted are alphanumerics. That can probably be
>>> easily relaxed.
>> 
>> Hi Nick, I don't think it can be easily relaxed.  Many other characters are
>> operators in Calc and would lead to confusion.
>> 
> 
> So add more syntax: formulas can use {this+is-a*/strange\@name}.
> 
> OK, ok - just kidding.
> 
> Thanks,
> Nick
> 
> PS. This is a paraphrase of the indirection principle: Any problem can
>    be solved by adding yet another layer of syntax...

:) Yes, true!
- Carsten

  reply	other threads:[~2011-08-23 14:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-23 13:20 Bug: named columns in tables not working if name contains "_" András Major
2011-08-23 13:53 ` Nick Dokos
2011-08-23 13:58   ` Bug: named columns in tables not working if name contains András Major
2011-08-23 14:34     ` Bastien
2011-08-23 14:08   ` Bug: named columns in tables not working if name contains "_" Carsten Dominik
2011-08-23 14:32     ` Nick Dokos
2011-08-23 14:49       ` Carsten Dominik [this message]
2011-08-23 16:20     ` Bastien
2011-08-23 16:47       ` Carsten Dominik
2011-08-23 18:29       ` Carsten Dominik
2011-08-23 18:54         ` Bastien
2011-08-24 20:15         ` Michael Brand
2011-08-24 20:39           ` Nick Dokos
2011-08-23 14:35   ` Bastien
2011-08-23 16:24   ` Achim Gratz
2011-08-24 20:32     ` Michael Brand
2011-08-24 20:46       ` Nick Dokos

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=21E3246E-EA8B-4361-8420-56DD06C830ED@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=andras.g.major@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=nicholas.dokos@hp.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.
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).