Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Hot answers tagged

30

org-table-blank-field, bound to C-c SPC and present in the “Tbl” menu. It's been around at least since version 6.01 in 2008, but for some reason it was only added to the manual as a consequence of this question.


15

org-mode has 2 table formats, the default org-table and the other is table.el. Cell wrapping is available for tables in table.el format. Try this Remove the extra row with <10> so your table will look similar to the example below: | Verse No | Verse | | 1 | Line1 Line1 Line1 | | 2 | Line2 Line2 Line2 | Tip: Add a ...


13

org-table-blank-field as already said, but also if you move to the cell with TAB, then typing will clear the cell content and replace it with what you type.


12

You are looking for remote table references: #+TBLNAME: tab1 | Nº | Description | Value | |-----+-------------+-------| | | TOTAL | 1 | ... #+TBLNAME: tab10 | Nº | Description | Value | |----+-------------+-------| | | TOTAL | 2 | tab-summary | Description | Value | |-------------------+-------| | Total of Table 1 | ...


12

With csv-mode I can see some lags with your file, but only with syntax highlighting enabled. After disabling fontification with M-x font-lock-mode it works without problems. To disable it permanently for csv-mode add to your config: (add-hook 'csv-mode-hook (lambda () (font-lock-mode -1)) Or if you are a use-package user: (use-package csv-mode :mode ("\...


8

First, you need to be sure that the buffer is in Text mode: M-x text-mode Once in text mode, C-- M-x align (which invokes the text-dollar-figure alignment rule) will align the first decimal vertically. But it fails to align the second decimal column. Plus it fails to align numbers that don't have an explicit decimal point (such as wolfram-mathematica's ...


7

You can specify the target cells for the formula to avoid overwriting the first column. One way is the following: #+TBLFM: @4$<<..@4$>=vmean(@2..@3) Where $<< refers to the second column, and $> to the last.


7

This should give you a chance to try out Org tables with virtually no learning curve. Place the following code in your init file and run it: (defun my-export-to-parent () "Exports the table in the current buffer back to its parent DSV file and then closes this buffer." (let ((buf (current-buffer))) (org-table-export parent-file export-func) (...


6

I am new to the Org API and I would be glad if you could give a look to the code and share some comments. As for the proposed solution, consider the following table: |---+--------------------------------+---| | 1 | one | a | | 2 | two | b | | 3 | This is a long chunk of text | c | | 4 | four ...


6

PDF export is handled by LaTeX, which provides endless ways to customize your document presentation. A relatively simple way to apply side-by-side formatting to tables in org-mode is to wrap them in minipage environments: #+ATTR_LATEX: :options {0.4\textwidth} #+begin_minipage | one | two | three | |-----+-----+-------| | cat | dog | fish | |-----+-----+---...


5

Move the point to the region of interest and enter C-u C-x =, ie the extended what-cursor-position that includes all the describe-char information, which includes the current active face for that character. position: 52052 of 94583 (55%), column: 3 character: f (displayed as f) (codepoint 102, #o146, #x66) preferred charset: ...


5

Below are two examples. The simple one requires more manual labor, but is easier to understand. The advanced one is more generic, but may be more difficult to understand. Simple | | 1 | 2 | 3 | |--------+----+---+------| | a.b | 4 | 6 | etc. | | a | 1 | 2 | etc. | | b | 3 | 4 | etc. | |--------+----+---+------| | ...


5

I wouldn't use align-regexp but the wonderful orgtbl-mode for this: if you enable this minor mode, it will automatically recognize the table, and change its size as needed (use tab to move around in the table).


4

You're using a proportional font; switch to using a monospaced font and the columns will line up.


4

Once you follow along the accepted answer and fixed the size of a long column in an existing table, toggling table-fixed-width-mode by M-x table-fixed-width-mode seems to do the trick of automatically wrapping (future) long lines of text in a column in table edit mode. You enter table edit mode by keying C-c ' Tested on: Emacs 25.2.2, Org-Mode 9.1.6


4

Adjust Column Width with Wrap Around Here is a solution adapted for org-mode 9.1.13, Spacemacs (0.200.13), emacs 26.1 for convenience. Starting with the following content at a buffer in org-mode: | Verse No | Verse | | 1 | Line1 Line1 Line1 | | 2 | Line2 Line2 Line2 | must leave a NEWLINE on top of the above table to avoid the ...


4

Following is a method using an elisp formula: | hex | comment | |------+---------| | 0x00 | | | 0x01 | | | 0x02 | | | 0x03 | | | 0x04 | | | 0x05 | | | 0x06 | | | 0x07 | | | 0x08 | | | 0x09 | | | 0x0A | | | 0x0B | | | 0x0C | | #+TBLFM: $1='(format "0x%02X"...


4

quickly calculating If you're just using constants, like your example 13*57, and not referring to other cells in the org table, you can use quick-calc to do this calculation. M-x quick-calc reads an expression from the minibuffer, calculates it, and displays the result in the minibuffer. inserting at point With a prefix argument, it will also insert the ...


4

What I've found so far is this. The "simplest" way is, as described in this stackoverflow answer and this gist, and as hinted by @Constantine in a comment, is to create a converter function and then use it. I went a tad further in laziness (this might already exist somewhere, but hey, I've only got the one use case right now). So here's what I have: The ...


4

Try org-mode version 9.1.5-10 release 2018-01-02. I had a similar problem and it seems that it was caused by a bug in one of the recent small updates to org-mode. The latest update from 02/01/2018 seems to have sorted this problem out. M-x list-packages RET choose org 20180102. A per the comment below, I have this in .emacs file as well (add-to-list '...


3

You are almost there. You just have to apply backquotes instead of single-quote for quoting and comma-operators where you want to insert the variable values. That is not org-mode specific but standard-lisp stuff. ** test elisp make a table #+name: make-table #+BEGIN_SRC emacs-lisp :results value (setq tol 0.1) (setq alpha 1.38) (setq alpha_1 (- 90 alpha)) `(...


3

You also need to specify the range on the left hand side: | Student | Bertrand | Henri | Arnold | |---------+----------+-------+--------| | Maths | 13 | 15 | 17 | | Physics | 09 | 14 | 13 | |---------+----------+-------+--------| | Total | 11 | 14.5 | 15 | #+TBLFM: @4$2..@$4=vmean(@2..@3) If I understood you ...


3

According to emacs wiki table.el is provided with emacs since version 22... I get the same kind of error by trying the sourceforge version, but the bundled version works fine. It is documented in emacs manual.


3

Try this #+name: mytable | p | q | |---+---| | a | 5 | | b | 2 | | c | 3 | #+begin_src emacs-lisp :var table=mytable :colnames yes (let* ((total (apply '+ (mapcar 'car (mapcar 'cdr table)))) ) (append table `(hline ("" ,total)))) #+end_src #+RESULTS: | p | q | |---+----| | a | 5 | | b | 2 | | c | 3 | |---+----| | | 10 | Tip: To keep ...


3

You have to mark them as dates: <2018-09-11>. See Dates and times. You can change the increment in the usual way, by customizing org-table-copy-increment which in the case of dates is in units of days. EDIT: Here's an example as requested: | Date | what | |------------------+------| | <2018-10-01> | foo | | X | ...


2

If I understand your questions & concerns correctly, you want to: Transpose an org-mode table Use the #+TBLFM: @4=vmean(@2..@3) formula but this overwrites the word Total with (Maths + Physics) / 2 which is unacceptable. Leave the #+TBLFM: @4=vmean(@2..@3) line as-is but have org-mode ignore first column in the table when applying the formula. There is ...


2

This is an answer to question 1 based on keyboard macros and calc. Prepare Calc Set calc to display in radix 16. C-x * c d r 16 q Record a suitable Macro f3 f3 M-b C-x * w C-x * w C-e RET f4 Use the Macro f4 f4 ... Beautification Use e.g. search and replace to change the format of the list.


2

I'm not sure whether the following will help in your case, but I hope it will be of some use (and it may be useful to others). You can control the width of a column with cookies. The Tables/Column width and alignment section of the manual describes this as follows (and contains additional useful information): Sometimes a single field or a few fields need ...


2

What @JohnKitchin shows is a typical way to return something different from (but associated with) the candidate string that is chosen by the user. In your case, it sounds like you might want the completion candidates (possible choices) to show more information than what is returned after choosing. E.g., you display a bunch of text describing something, and ...


2

You don't really want to use rectangles for this, because the desired end result is not aligned as rectangles. Either use a keyboard macro. e.g.: <f3> - start recording C-kC-ySPC=SPCC-y - transform the first line <right><f4> - move to the next line, and stop recording <f4><f4><f4> - replay for the remaining lines Or query-replace-regexp: ...


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