1 #+TITLE: ELBB - Example of page with code
2 #+STARTUP: odd hidestars unfold
3 #+AUTHOR: Emacs Community
4 #+EMAIL: bzg AT gnu DOT org
6 #+OPTIONS: skip:nil toc:nil
8 [Back to the [[file:index.org][index]] page.]
10 This page contain some blocks of code and some samples of Org-mode's syntax.
12 * Fixed-width sections of code
14 : (substring "abcdefg" 0 3)
16 : (substring "abcdefg" -3 -1)
22 (substring "abcdefg" 0 3)
24 (substring "abcdefg" -3 -1)
30 #+BEGIN_SRC emacs-lisp
33 (let ((s (if (symbolp str)(symbol-name str) str)))
36 (not (null (string-match "^\\( \\|\f\\|\t\\|\n\\)" s)))
37 (> (length s) (string-match "^\\( \\|\f\\|\t\\|\n\\)" s)))
38 (setq s (replace-match "" t nil s)))
40 (not (null (string-match "\\( \\|\f\\|\t\\|\n\\)$" s)))
41 (> (length s) (string-match "\\( \\|\f\\|\t\\|\n\\)$" s)))
42 (setq s (replace-match "" t nil s))))
47 Read more on [[http://orgmode.org/manual/Literal-examples.html][Org's manual]].