People who code: we want your input. Take the Survey

# Tag Info

4

You are probably better off using Lisp formulas for things like this. As @db48x's answer points out, there are a couple of cooks in that kitchen and what they are doing is not always obvious. Formula debugging can help but it is not always effective (I presume that's how @db48x discovered the "(a)" thing, but that may not be the case). I find the ...

3

Not that I know of, but Org mode provides the ingredients to roll your own easily: (defun org-table-goto-beginning () (interactive) (goto-char (org-table-begin))) (defun org-table-goto-end () (interactive) (goto-char (org-table-end))) (define-key org-mode-map (kbd "C-c t b") #'org-table-goto-beginning) (define-key org-mode-map (kbd &...

3

You can use org-table-map-tables for iterating over the tables of an Org file. Example for the Shell command: emacs --batch table.org --eval '(org-table-map-tables (quote org-table-export))' You should give the file names for the exported tables and the export format in the org file like that: * First Section :PROPERTIES: :TABLE_EXPORT_FILE: first.csv :...

3

I don't know exactly what's going on here, but after doing a little debugging I found that this works: | a | | | b | | #+TBLFM: $2=if("$1"=="(a)", 1, 0) It looks to me like it's doing algebraic simplification in order to get an answer, and if that fails it can be left with a more complicated form than you expected. b = a ? 1 : 0 is a ...

3

The :splice argument appears to be meant for this purpose. When non-nil, it omits the environment from the table-receiver block, which gives you the opportunity to write it manually. For a minimal example: \documentclass{article} \usepackage{comment} \begin{document} \begin{tabular}{rlccp{3cm}} % BEGIN RECEIVE ORGTBL foo ipsum & curabitur & ...

3

The standard HTML table is not interactive, you need JavaScript to add these interactive features. The following uses the DataTables JS library to add search and filter. Save it to an org file then C-c C-e h o to view the HTML in browser. #+HTML_HEAD: <link rel="stylesheet" href="https://cdn.datatables.net/1.10.22/css/jquery.dataTables.min....

2

Check that: gnuplot is installed: just run it from the shell to make sure it's present and if so, just exit out of it (I have version 5 and that worked). gnuplot-mode is installed; checking e.g. with C-h f gnuplot-mode RET should be enough. make sure that there is a subdirectory img under the directory where the Org mode file lives: the options specify set:&...

2

I've found a solution. It's acceptable for me. I don't know if it's useful for you. Anyway I'm sharing it. I changed the format a bit (one column for the times, not two), I think it is more practical. Example: Workflow for a day: | work | workflow | single durations | sum | |------+------------------------------------+--------------...

2

I suggest this bind to `C-c y' (or whatever key you want) (bind-key (kbd "C-c y") (lambda()(interactive) (when (org-at-table-p) (kill-new (string-trim (substring-no-properties(org-table-get-field)))))) org-mode-map)

2

Here's a function I wrote, (defun org-table-collapse-cell () (interactive) (save-excursion ;; Save point (org-table-blank-field) ;; Blank the cell (while (progn ;; Swap blank cell with a cell under it until the blank is at the bottom. (org-table--move-cell 'down) (org-table-align) (org-table-check-inside-data-field)))) ...

1

Hope this will be useful to someone (have been searching for the solution for hours!). The function to use is #+TBLFM: $3='(org-lookup-first$2 '(remote(FOO,@2$1..@>$1)) '(remote(FOO,@2$2..@>$2))) Found it by reading this answer which links to the org lookup functions documentation, which in turn links to useful examples in Worg.

1

I am surprised that org-mark-element doesn't do what I would call "the right thing" here. This short function seems to copy a cell when your cursor is in a cell, and otherwise the element around the cursor. (defun copy-element () (interactive) (let* ((oec (org-element-context)) (begin (org-element-property :begin oec)) (end (org-...

1

You need to specify a NEWLINE as the row delimiter regexp: you do that by typing C-q C-j - the C-q quotes the subsequent character so that it loses its special meaning; C-j is a newline (the end-of-line delimited on Unix/Linux - you may have to do something different on Windows). This is explained in the "Inserting text" section of the Emacs manual:...

1

Hope this function will do the trick (defun generate-a-new-table-out-of-old-one-with-sorting (ref) " Inserts an Org table at point copied from an existing table REF. only first and last colums are copied and the table is sorted by following the last column " (interactive (list (read-from-minibuffer "Table name to proceed :" &...

1

The Org mode spreadsheet is not like Excel: you don't create formulas in one cell and then propagate them to other cells (well, you can - do C-h i g (org)Field and range formulas, but propagating them is basically a matter of cutting and pasting). You can instead use a #+TBLFM after the table to do all that: |------------+------------+------------+-----------...

1

You can either use the calc syntax or the elisp syntax. | x | calc syntax | elisp syntax | |---+-------------+--------------| | 1 | 0 | 0.0000 | | 2 | 0.6931 | 0.6931 | #+TBLFM: $2=log($1);n4::$3='(log$1);N%.4f Notice that the output format of the calc syntax depends on the ~/.emacs.d/calc.el parameters. (plist-put org-calc-...

1

The glyphs in your Bengali font are not the same width as the glyphs in the font you're using for everything else. In fact, your main font very likely doesn't have any Bengali glyphs in it at all, so Emacs is falling back to other fonts that you have installed on your system. With the glyph shaping that Bengali requires, it may not even be possible to have a ...

1

#+name: tbl1 | x | | 1 | | 2 | | 3 | #+name: tbl2 | y | | 1 | | 1 | | 1 | #+name: tbl3 | diff | | 0 | | 1 | | 2 | #+TBLFM: @2$1..@>$1=remote(tbl1,@@#$1) - remote(tbl2,@@#$1)

1

Could I suggest another approach: Prepare the text for easier conversion to a table. Look at the document string of org-table-convert-region to see what options and assumptions it has about field separator characters. First, select the table text and run interactively the query-replace-regexp command with arguments + → <tab>. That is "two or ...

1

Here's a proof of concept, along the lines described in the comments. There are several things that need to be done to it in order to turn it into a "real" solution, which I will describe at the end of the answer. In particular, it is NOT a complete solution: it's missing the part where Org mode produces the HTML that is needed for this ...

1

The code works for me: (org-table-time-seconds-to-string (apply '+ (mapcar 'string-to-number (mapcar 'org-table-time-string-to-seconds (org-lookup-all $1 '(remote(works,@2$2..@>$2)) '(remote(works,@2$3..@>$3)))))) 'hh:mm) org-... 1 For HTML, you can add CSS to hide borders completely. By default, I get a border width of 2 and a rules setting of group. You can override these like this: * foo #+ATTR_HTML: :border 0 :rules none | a | b | |---+---| | 1 | 2 | | 3 | 4 | For LaTeX/PDF, by default I get just an \hline corresponding to the hline that I have in the table separating the header ... 1 Defining Constant Values from Remote Org-Table Cell for Use in #+TBLFM: Initial Setup Create Named Table, e.g. other-table-name #+NAME: other-table-name | S | M | T | W | H | F | S | |---+---+---+---+---+---+---| | 0 | 1 | 2 | 3 | 4 | 5 | 6 | Method 1 - Dynamically Define #+CONSTANTS: using SRC Block Results In this example, the programming language used ... 1 What's probably happening is that your regular font is missing those glyphs, so they get filled in from another font, which uses a different width. Here's what M-x describe-char shows for me when the point is on the a: character: a (displayed as a) (codepoint 97, #o141, #x61) preferred charset: ascii (ASCII (ISO646 IRV)) code point in charset:... 1 In this particular situation, you could use a range formula to fill in rows 7 through the last row: #+TBLFM: @7$2..@>$2 =$3 + 58 Counting rows is probably not what you want to do though and is error-prone, so you could say #+TBLFM: $2 = if ($2 > 0, $2,$3+58) leaving the non-empty entries alone, and changing the empty entries (which in a numerical ...

1

After a bit of trial and error, it seems that something like this might work: | Element | $| |---------+------| | E1 | 35% | | E2 | 65% | |---------+------| | Total | 100% | #+TBLFM: @>$>=vsum(@I..II)*100;%.0f%% You always think of the entries as the corresponding decimal fraction (35% = 35/100 = 0.35 etc) and the result is the sum ...

1

The problem goes away with version 9.4 of Org.

1

Note: For everyday coding, I use code blocks to filter table data instead of Indexable Variable Values (IVV) because it is usually faster to write and explain the code block than it is to teach others or remember IVV syntax. Use : to select range of org-table columns when using Indexable Variable Values "Ranges of variable values can be referenced ...

1

Try valign. This package solves several aligning problems in org-mode, with one issue that currently incompatible with org-indent-mode.

1

You may well be right about the eager evaluation (which might be a bug). EDIT: Actually, there is no evaluation at all: the user error is precipitated just by pattern matching - while in row 2, it finds the @-14\$6 in the formula and proceeds to check it immediately; it does not matter at all that the formula would never hit that. Fixing that is probably ...

Only top voted, non community-wiki answers of a minimum length are eligible