From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Huchler Subject: Re: how to force org-mode to interpret number as string Date: Wed, 05 Mar 2014 22:06:41 +0100 Message-ID: <87ha7c9xdn.fsf@mars.lan> References: <87siqx9um0.fsf@mars.lan> <871tygptqa.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33790) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLJ1s-0003GW-V8 for emacs-orgmode@gnu.org; Wed, 05 Mar 2014 16:07:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WLJ1l-0008P0-Sg for emacs-orgmode@gnu.org; Wed, 05 Mar 2014 16:07:04 -0500 Received: from plane.gmane.org ([80.91.229.3]:38576) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLJ1l-0008Ot-KU for emacs-orgmode@gnu.org; Wed, 05 Mar 2014 16:06:57 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WLJ1g-0000NM-5N for emacs-orgmode@gnu.org; Wed, 05 Mar 2014 22:06:52 +0100 Received: from hsi-kbw-109-193-108-156.hsi7.kabel-badenwuerttemberg.de ([109.193.108.156]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 05 Mar 2014 22:06:52 +0100 Received: from stefan.huchler by hsi-kbw-109-193-108-156.hsi7.kabel-badenwuerttemberg.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 05 Mar 2014 22:06:52 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Bastien writes: > Hi Stefan, > > Stefan Huchler writes: > >> The Problem is that that org-mode seems to auto-format the salary column >> as a number. > > That a problem here, but I guess this is handy in many circumstances. > > Why don't use just turn the number into a string in your code? if I could do that, without loosing the numbers behind the point I would be ok with that, but I dont want a fixed system for 1 table, but for a random table. I wrote something similar in python: https://github.com/spiderbit/mmailer I just wanted to migrate it into org-mode/emacs because I have not to deal with csv files and because I can use the email-ability from emacs/gnus. Its just stupid to have a seperate smtp-client-code and smtp-auth-settings in such tool. Its around 500 lines of code in emacs I would get that done in maybe 20 lines of code. If that problem would not occur. If there is something in elisp that is like that: if is-that-a-number(column): column = number-to-string(give-the-complete-number(column)) I would be happy to use that ^^. But If he saves it as number I think he will not save how many zeros were behind the point. So basicly there is no solution to it that will satisfy me. I really struggle to use the org-mode structures its always a little bit off, it sounds all good but fails in small details. Sorry whining but it is frustrating when you have 99% and you need to get the 1% problem out of the way but it will not happen except writing seperate 1000 lines of code in R or something like that (that was the workaround for my last problem with my last "group-by" problem, with org-mode tables. That then makes the 99% just worthless because it is useless if its static code that is not dynamic and works for this kind of problems but only for this one example of the problem. I dont want to repreat myself. Maybe I even could make that code a seperate small emacs-package. Because there seems that there is no serial-mail tool for emacs right now. Maybe I am wrong here, but I searched long and did not find one. Maybe you or somebody else can point me to it, then I maybe dont need that to work anymore. It´s just so stupid that seems for me very general problems, that you maybe have a implizit declaration of a variable but you should still have a way to define it manually there is even a way to do this, to force a field to be a number but not to force it to be a string. Something like that: tblfm: $4 = ($4);N or was it \N why is there no \S and good. ok its not in the information gathering and a seperate process but in the table you have at least the full number there. Hope there is one emacs-way to do that. That dont need learning another programming language like R and works for any strings. I am a bit disapointed in org-tables because they never work like I need them too. I think the only alterantive would be to save the org-capture data in a csv-file so I have to write thousends of lines of code to manage paths and projects and whatever like I have in python. Then because csv works better in not converting without me saying it to convert a string to a number. and then use file-open blabla. But nice that you did answer that fast ;)