From a9275d5fd1b0a461c278c4be9bdac6e2c46c0654 Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Mon, 22 Apr 2024 21:08:20 +0300 Subject: [PATCH] doc/org-manual.org: Fix description of switches in literal examples MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix erroneous assertion that switches are always at the end of "begin" line. Reported-by: João Pedro Link: https://orgmode.org/list/87zftm2ltt.fsf@ergo --- doc/org-manual.org | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/doc/org-manual.org b/doc/org-manual.org index db9d26e68..24bdc9fdb 100644 --- a/doc/org-manual.org +++ b/doc/org-manual.org @@ -11353,13 +11353,15 @@ see [[*Structure Templates]] for shortcuts to easily insert code blocks. #+end_example Both in =example= and in =src= snippets, you can add a =-n= switch to -the end of the =#+BEGIN= line, to get the lines of the example -numbered. The =-n= takes an optional numeric argument specifying the -starting line number of the block. If you use a =+n= switch, the -numbering from the previous numbered snippet is continued in the -current one. The =+n= switch can also take a numeric argument. This -adds the value of the argument to the last line of the previous block -to determine the starting line number. +the =#+BEGIN= line[fn::In the =src= snippets, switches must be placed +right after the language name and before the [[*Structure of Code +Blocks][header arguments]]], to get the lines of the example numbered. +The =-n= takes an optional numeric argument specifying the starting +line number of the block. If you use a =+n= switch, the numbering +from the previous numbered snippet is continued in the current one. +The =+n= switch can also take a numeric argument. This adds the value +of the argument to the last line of the previous block to determine +the starting line number. #+begin_example ,#+BEGIN_SRC emacs-lisp -n 20