I created a TSV file (full file at bottom) using Emacs org mode and its table feature in order to import into Anki. The first (non-commented line was:
C-b Send the prefix key (C-b) through to the application.
Anki correctly detected this as TSV format and selected TAB as the delimiter. Further down in the same file I had my org-mode table which was used to generate the TSV:
| C-b | Send the prefix key (C-b) through to the application. |
| C-o | Rotate the panes in the current window forwards. |
And so on ...
I figured it was ok to have these in the same file because the org table uses pipe characters (|) as delimiters and would have the wrong number of fields. As the manual states:
Anki determines the number of fields in the file by looking at the first (non-commented) line. Any lines in the file which have a different number of fields will be ignored.
The first line also defines the separating character – if Anki finds a ';' on the first line it will use that, if it finds a comma it’ll use that, etc.
In the end, no harm was done. I just ended up with a few nonsensical cards which I deleted. Just thought I’d let you know that either the new CSV importing code needs fixing or the manual needs updating.
Thanks.
My full csv file I was importing:
# The code at the bottom of this file can convert an org-mode table (has a | separator) to a TSV table which Anki can import.
#+RESULTS: org table to TSV for Anki
#+begin_example
C-b Send the prefix key (C-b) through to the application.
C-o Rotate the panes in the current window forwards.
C-z Suspend the tmux client.
! Break the current pane out of the window.
\" Split the current pane into two, top and bottom.
# List all paste buffers.
$ Rename the current session.
% Split the current pane into two, left and right.
& Kill the current window.
' Prompt for a window index to select.
( Switch the attached client to the previous session.
) Switch the attached client to the next session.
, Rename the current window.
- Delete the most recently copied buffer of text.
. Prompt for an index to move the current window.
0 to 9 Select windows 0 to 9.
: Enter the tmux command prompt.
; Move to the previously active pane.
= Choose which buffer to paste interactively from a list.
? List all key bindings.
D Choose a client to detach.
L Switch the attached client back to the last session.
[ Enter copy mode to copy text or view the history.
] Paste the most recently copied buffer of text.
c Create a new window.
d Detach the current client.
f Prompt to search for text in open windows.
i Display some information about the current window.
l Move to the previously selected window.
m Mark the current pane (see select-pane -m).
M Clear the marked pane.
n Change to the next window.
o Select the next pane in the current window.
p Change to the previous window.
q Briefly display pane indexes.
r Force redraw of the attached client.
s Select a new session for the attached client interactively.
t Show the time.
w Choose the current window interactively.
x Kill the current pane.
z Toggle zoom state of the current pane.
{ Swap the current pane with the previous pane.
} Swap the current pane with the next pane.
~ Show previous messages from tmux, if any.
Page Up Enter copy mode and scroll one page up.
Up, Down, Left, Right Change to the pane above, below, to the left, or to the right of the current pane.
M-1 to M-5 Arrange panes in one of the five preset layouts: even-horizontal, even-vertical, main-horizontal, main-vertical, or tiled.
Space Arrange the current window in the next preset layout.
M-n Move to the next window with a bell or activity marker.
M-o Rotate the panes in the current window backwards.
M-p Move to the previous window with a bell or activity marker.
C-Up, C-Down, C-Left, C-Right Resize the current pane in steps of one cell.
M-Up, M-Down, M-Left, M-Right Resize the current pane in steps of five cells.
#+end_example
#+name: notes
| C-b | Send the prefix key (C-b) through to the application. |
| C-o | Rotate the panes in the current window forwards. |
| C-z | Suspend the tmux client. |
| ! | Break the current pane out of the window. |
| \" | Split the current pane into two, top and bottom. |
| # | List all paste buffers. |
| $ | Rename the current session. |
| % | Split the current pane into two, left and right. |
| & | Kill the current window. |
| ' | Prompt for a window index to select. |
| ( | Switch the attached client to the previous session. |
| ) | Switch the attached client to the next session. |
| , | Rename the current window. |
| - | Delete the most recently copied buffer of text. |
| . | Prompt for an index to move the current window. |
| 0 to 9 | Select windows 0 to 9. |
| : | Enter the tmux command prompt. |
| ; | Move to the previously active pane. |
| = | Choose which buffer to paste interactively from a list. |
| ? | List all key bindings. |
| D | Choose a client to detach. |
| L | Switch the attached client back to the last session. |
| [ | Enter copy mode to copy text or view the history. |
| ] | Paste the most recently copied buffer of text. |
| c | Create a new window. |
| d | Detach the current client. |
| f | Prompt to search for text in open windows. |
| i | Display some information about the current window. |
| l | Move to the previously selected window. |
| m | Mark the current pane (see select-pane -m). |
| M | Clear the marked pane. |
| n | Change to the next window. |
| o | Select the next pane in the current window. |
| p | Change to the previous window. |
| q | Briefly display pane indexes. |
| r | Force redraw of the attached client. |
| s | Select a new session for the attached client interactively. |
| t | Show the time. |
| w | Choose the current window interactively. |
| x | Kill the current pane. |
| z | Toggle zoom state of the current pane. |
| { | Swap the current pane with the previous pane. |
| } | Swap the current pane with the next pane. |
| ~ | Show previous messages from tmux, if any. |
| Page Up | Enter copy mode and scroll one page up. |
| Up, Down, Left, Right | Change to the pane above, below, to the left, or to the right of the current pane. |
| M-1 to M-5 | Arrange panes in one of the five preset layouts: even-horizontal, even-vertical, main-horizontal, main-vertical, or tiled. |
| Space | Arrange the current window in the next preset layout. |
| M-n | Move to the next window with a bell or activity marker. |
| M-o | Rotate the panes in the current window backwards. |
| M-p | Move to the previous window with a bell or activity marker. |
| C-Up, C-Down, C-Left, C-Right | Resize the current pane in steps of one cell. |
| M-Up, M-Down, M-Left, M-Right | Resize the current pane in steps of five cells. |
# If an entry in the table begins with double parenthesis ("), it needs to be escaped (\"). Otherwise you'll get an EOF error.
#+name: org table to TSV for Anki
#+BEGIN_SRC elisp :var x=notes :wrap example :results raw :colnames no
(orgtbl-to-tsv x nil)
#+END_SRC