[PATCH] org-table-to-lisp enhanced

2024-02-25 Thread tbanelwebmin
Here is a new version of `org-table-to-lisp'. Why a new version? - Because it is more than 3x faster than the current one.   Bench-marked on a 3822 rows by 16 columns Org table   - current: 0.405 seconds   - new one: 0.122 seconds   on Emacs 30.0.50 with native compilation   The speedup is

Re: How to use mpirun with C or C++ Org-babel?

2023-12-08 Thread tbanelwebmin
On 23-12-08 00:10, Edgar Lux wrote: Hello, I found [1][2] that it is possible to change the compiler for C and C++ source blocks. I would like to know if there is a way to add =mpirun -np 2= (where 2 can be any other number) to run the resulting

Re: [ANN] orgtbl-fit

2023-03-05 Thread tbanelwebmin
On 3/3/23 16:13, Ihor Radchenko wrote: BTW, the dollar replacement is something org-table can benefit from---a number of people are confused because "$" is treated specially by Calc. I'm not sure what you mean. The dollar in spreadsheet formulas? Like: #+TBLFM: $6=$5+1 Which

Re: [ANN] orgtbl-fit

2023-03-01 Thread tbanelwebmin
On 2/20/23 11:50, Ihor Radchenko wrote: tbanelwebmin writes: Examples & documentation can be read here: https://github.com/tbanel/orgtblfit/blob/main/README.org Interesting. Could it be som

Re: [ANN] orgtbl-fit

2023-01-26 Thread tbanelwebmin
On 1/26/23 11:35, Ihor Radchenko wrote: tbanelwebmin writes: Actually, orgtbl-fit is a bridge between Org Mode tables and Calc. By the way, Org Mode table spreadsheet capabilities are also a bridge with Calc. Examples & documentation can be read here: https://github.com/tbanel/orgtb

Re: [ANN] orgtbl-fit

2023-01-25 Thread tbanelwebmin
Org Mode table spreadsheet capabilities are also a bridge with Calc. Examples & documentation can be read here: https://github.com/tbanel/orgtblfit/blob/main/README.org Have fun! On 1/24/23 20:55, Ihor Radchenko wrote: tbanelwebmin writes: The new orgtbl-fit package has just been

[ANN] orgtbl-fit

2023-01-16 Thread tbanelwebmin
Hi the List! The new orgtbl-fit package has just been released on Melpa. It does regression fitting on Org Mode tables. Example. We suspect that `obs' depends on `x' and `y'. |  x | y |  obs | |+---+--| | 32 | 7 | 38.3 | | 18 | 3 | 11.4 | | 43 | 9 | 47.3 | | 11 | 2 |  8.9 | | 35 | 8 |

Re: [PATCH] Unit-test for Please add support for dlangs packagemanager to ob-C.el

2022-10-18 Thread tbanelwebmin
For unit-testing Dlang, we could mock the «dub» command (compiler+packager). For instance, we could replace it by the «cat» Linux command, just while running the unit-test. But the «cat» command introduces a new dependency on Linux. Is there a portable

Re: Compiling a C++ source block

2022-09-29 Thread tbanelwebmin
Good point Ihor! I will change that Le 29/09/2022 à 04:25, Ihor Radchenko a écrit : tbanelwebmin writes: You may try: #+header: :includes '("" "") I notice that https://orgmode.org/worg/org-con

Re: Please add support for dlangs packagemanager to ob-C.el

2022-09-29 Thread tbanelwebmin
Thanks Christian. Your TINYCHANGE fits into the 15 lines limit. I will review it. As Bastien said, we follow as much as we can a predefined format for commit messages: https://orgmode.org/worg/org-contribute.html#commit-messages You may also

Re: Compiling a C++ source block

2022-09-26 Thread tbanelwebmin
You may try: #+header: :includes '("" "") Also, you have this commented line: # #+header: :var table= It seems to break the #+header: chain Just remove it. By the way, to figure out future compilation problems, you may click on the error:

Re: Babel C-mode corrupts double-quoted strings in output

2022-09-02 Thread tbanelwebmin
) to:   results Have fun Le 02/09/2022 à 13:02, tbanelwebmin a écrit : This looks like a bug in ob-C.el Around line 196 we should replace   (org-babel-read results t) with   results

Re: Babel C-mode corrupts double-quoted strings in output

2022-09-02 Thread tbanelwebmin
This looks like a bug in ob-C.el Around line 196 we should replace   (org-babel-read results t) with   results In this way, ob-C.el will look more like ob-shell.el Let me see what are the consequences with such a fix. Thanks

Re: how to transpose a table but not deleting the horizontal lines

2022-05-10 Thread tbanelwebmin
The orgtbl-arggregate package (on Melpa and GitHub) does that. Horizontal lines are converted to empty columns. Transposing again recreates the original horizontal lines. Beware, as opposed to org-table-transpose-table-at-point, it does not modify the source table,

Re: Please add support for dlangs packagemanager to ob-C.el

2022-03-10 Thread tbanelwebmin
Thanks Christian for this contribution. Easily adding DLang dependencies while keeping a single code block seems quite useful. I will take a deeper look at your proposal. Also, you marked your patch as TINYCHANGE, which imply it is less than 15 lines long. However your patch is 24 lines long.

Re: [PATCH] bad table formula recorded in some cases

2021-07-21 Thread tbanelwebmin
Ok, Timothy, fair enough Le 21/07/2021 à 17:07, Timothy a écrit : > Hi Thierry, > > tbanelwebmin writes: >> I don't know the intention. But the answer may lie in the comment 4 >> lines above: >>;; Don't overwrite TBLFM, we might use text properties to >>;

Re: [PATCH] bad table formula recorded in some cases

2021-07-21 Thread tbanelwebmin
écrit : > Hi Thierry, > > Thanks for this! Looking at the change you suggest, do you know why the > (match-string 2) bit might have been added in the first place? I'm just > wondering if there might be some edge-case adversely affected by this --- > hence trading one bug for another :P >

[PATCH] bad table formula recorded in some cases

2021-07-08 Thread tbanelwebmin
Small bug, small fix. Suppose we have a table embedded in a begin-end block. #+begin: aaa :param value | a | b | | a | b | #+end: Suppose we want to add a formula, with C-c = We end up with an incorrect result: #+begin: aaa :param value | a | 33 | | a |  b |  :param value $2=33 #+end: The

Re: convert subtree or nested list to table

2021-07-08 Thread tbanelwebmin
#+RESULTS: > #+begin_src emacs-lisp > | (("Category" | > #+end_src > - > On Wed, Jul 7, 2021 at 6:29 AM tbanelwebmin <mailto:tbanelweb...@free.fr>> wrote: > > Hi Matt > > Le 05/07/2021 à 21:44, Matt Price a écrit : > > I have

Re: convert subtree or nested list to table

2021-07-07 Thread tbanelwebmin
Hi Matt Le 05/07/2021 à 21:44, Matt Price a écrit : > I have to write a number of text-heavy documents which need to be > delivered as tables with wrapped paragraphs in most cells. Working > directly in table format is pretty arduous and uncomfortable.  Has > anyone ever written a function to

Re: table: problem with nan and if

2021-06-22 Thread tbanelwebmin
About the E format setting, you may look at documentation here: [[info:org#Formula syntax for Calc]] Le 22/06/2021 à 09:44, Eric S Fraga a écrit : > Uwe, > > what if you change the E in each equation with N? You'll get 0 entries > when the calculations involve all empty cells which might not be

Re: On using to-do lists efficiently

2021-04-27 Thread tbanelwebmin
 Todo lists...  Of course it resonates. You describe the errors I do.  I keep moving from to-do-list, to agenda, to notes, and back again.    You say it is not about a tool or a process,  but rather about discipline.  Right!    Discipline may be connected to habits.  From 8:00 to 8:30 I (should)

Re: Bug: Incompatible return type in org-babel C when using a table of doubles with a header as a variable [9.4.4 (release_9.4.4-272-ga9f38b @ /home/richard/.emacs.d/straight/build/org/)]

2021-04-22 Thread tbanelwebmin
I just pushed a patch. Your example works now. (Don't forget to change stdio.h into ).While waiting for the patch to be released, you can load this Lisp file: https://code.orgmode.org/bzg/org-mode/src/maint/lisp/ob-C.el Cheers Le 02/04/2021 à 19:40, Richard Sent via General discussions about

Re: Bug: Incompatible return type in org-babel C when using a table of doubles with a header as a variable [9.4.4 (release_9.4.4-272-ga9f38b @ /home/richard/.emacs.d/straight/build/org/)]

2021-04-06 Thread tbanelwebmin
Richard, yourbug submission uncovered 3 problems. From minor to major: 1. Missing delimitersin your example change   :includes stdio.h to   :includes 2. The function strcmp() is undefined A patch has already been committed to fix that, in early January. 3. A mess between char* and double

Re: c-y inserts after entry

2020-07-18 Thread tbanelwebmin
I get the expected behavior in Emacs 27.0.90 * x asd fnjkasn dkfjan ksdjfn kajsdfn * kill this whole header line and insert before caret ^ajsdf kasdn kfjasnd jkfan ksdfn what i expect is that it is inserted above caret what occurs is it gets inserted below * z Le 18/07/2020 à 01:18,

Re: [join rows] (was: join tables from different files)

2020-06-08 Thread tbanelwebmin
Le 07/06/2020 à 17:09, Uwe Brauer a écrit : > "t" == tbanelwebmin writes: > > Yes you can. > Use an org-id > > Thanks! Nice! > > > I have a another question in this context: > can I join, say 4 tables, but row wise? > Say I have

Re: join tables from different files

2020-06-07 Thread tbanelwebmin
Yes you can. Use an org-id Suppose you have a table in file x.org, under some title: - x.org -- * title | a | b | |+| | aa | 5 | | bb | 7 | | aa | 11 | -- Add an ID by calling: M-x org-id-get-create. You end up with:

Re: org table: one column of random numbers (but natural ones)

2020-05-28 Thread tbanelwebmin
Le 27/05/2020 à 22:40, Uwe Brauer a écrit : > Hi > > > I have a org table and want to add a new colum, which natural numbers > which are randomly ordered > > So I tried > > #+TBLFM: $1=@#-1::$4=random($1@4);f1 > > But the column contains real numbers > > What can I do > > Uwe Brauer > > What

Re: (Feature to Potentially Upstream) extending org-plot.el

2020-05-19 Thread tbanelwebmin
+1 Le 18/05/2020 à 09:23, Timothy a écrit : Good news! This is the last of my "things I want to contact the mailing list about" backlog  So, I recently wanted to be able to create a radar chart in org, using #+PLOT 

Re: [PATCH] faster org-table-align

2020-05-08 Thread tbanelwebmin
Le 08/05/2020 à 15:44, Nicolas Goaziou a écrit : > Hello, > > tbanelwebmin writes: > >> `org-table-align' may benefit from recent `org-table-to-lisp' >> speed-up. >> >> The current code contains the following lines in org-table.el. They >> pa

[PATCH] faster org-table-align

2020-05-08 Thread tbanelwebmin
`org-table-align' may benefit from recent `org-table-to-lisp' speed-up. The current code contains the following lines in org-table.el. They parse the table into a Lisp structure, which is precisely what `org-table-to-lisp' is supposed to do. (fields (mapcar (lambda (l)

Re: [ANN] faster org-table-to-lisp

2020-05-02 Thread tbanelwebmin
Le 01/05/2020 à 15:11, Nicolas Goaziou a écrit : > Indeed. I also realized this, and fixed it a couple of hours ago. You > will notice I shamelessly used your "\\="© trick! :) This kind of shamelessness builds great communities :) > Great. I removed the check and added an entry in ORG-NEWS. It

Re: [ANN] faster org-table-to-lisp

2020-05-01 Thread tbanelwebmin
Le 01/05/2020 à 12:15, Nicolas Goaziou a écrit : > Hello, > > tbanelwebmin writes: > >> Nicolas, how did you do that? Your version is 25% faster than mine, >> and the code is 33% shorter! Very elegant. > Thank you. There's nothing fancy, really. > > The main di

Re: [ANN] faster org-table-to-lisp

2020-05-01 Thread tbanelwebmin
Nicolas, how did you do that? Your version is 25% faster than mine, and the code is 33% shorter! Very elegant. Le 01/05/2020 à 00:35, Nicolas Goaziou a écrit : > tbanelwebmin writes: > >> I found a way to ensure full backward compatibility. I keep the same >> signature. Whe

Re: [ANN] faster org-table-to-lisp

2020-04-30 Thread tbanelwebmin
Better, thanks Daniele Let's go for "handling very large tables" Regards Thierry Le 30/04/2020 à 22:47, Daniele Nicolodi a écrit : > Hello, > > On 30-04-2020 14:28, tbanelwebmin wrote: >> * Version 9.4 (not yet released) >> ** Miscellaneous >> *** F

Re: [ANN] faster org-table-to-lisp

2020-04-30 Thread tbanelwebmin
Le 30/04/2020 à 10:09, Nicolas Goaziou a écrit : > Hello, > > tbanelwebmin writes: > >> Here is an alternative, faster version of org-table-to-lisp. It can be >> more than 100 times faster. > Great! Thank you! > >> #+BEGIN_SRC elisp >> (defun org-

[ANN] faster org-table-to-lisp

2020-04-30 Thread tbanelwebmin
Hi The List. Here is an alternative, faster version of org-table-to-lisp. It can be more than 100 times faster. #+BEGIN_SRC elisp (defun org-table-to-lisp-faster ( org-table-at-p-done)   "Convert the table at point to a Lisp structure. The structure will be a list.  Each item is either the

Re: [Idea] Org Collections

2019-12-15 Thread tbanelwebmin
Interesting idea! Is everyone aware of Emacs Projectile? https://github.com/bbatsov/projectile Not exactly the Org Collections you talks about, Gustav, but somehow related. Projectile manages collections of files that belong

Re: [O] html-email in org-mode

2016-10-30 Thread tbanelwebmin
* Awesome This is awesome! * Simple I followed your instructions, and in 2 minutes I was able to send a /1st/ mail from Org Mode * Thanks Thanks John for showing that.