org-mode/lisp
Andrew Burgess 587280ea68 org-capture: Better indentation when creating a new list
lisp/org-capture.el (org-capture-place-item): When starting a new list
use org-indent-line to establish the correct indentation rather than
just using 0.

Creating an entry in org-capture-templates of type item adds entries
into a list, however, currently, if the list is empty then the first
list item will always be indented to depth 0 (so hard on the left),
which looks like this:

  * Top Level
  ** Second Level
  - item #1
  - item #2
  - item #3

This is fine if org-adapt-indentation is nil, however, with the
default value of t lists should be indented more like this:

  * Top Level
  ** Second Level
     - item #1
     - item #2
     - item #3

The patch below changes org-capture-place-item so that, when starting
a new list, the items are indented as above.

Care is taken to preserve two features of the existing behaviour,
first, when adding to an existing list, new items are indented to
match the items already in the list.  And secondly, when there is some
introductory text before the list new items are inserted after the
text, like this:

  * Top Level
  ** Second Level
     This is some introductory text:
     - item #1
     - item #2
     - item #3

TINYCHANGE
2014-10-14 22:24:30 +02:00
..
Makefile Makefile (clean-install): Also remove ox*.el* files 2013-04-18 14:43:45 +02:00
ob-C.el Enable multiple files in :includes header 2014-10-12 14:00:51 +02:00
ob-J.el ob-J: adapt to new `org-babel-process-params' 2014-08-26 09:16:28 +02:00
ob-R.el ob-R: fix interaction with ESS for new sessions 2014-10-10 12:35:57 -04:00
ob-abc.el improve handling of output file types 2013-09-25 09:12:42 -06:00
ob-asymptote.el Update copyright years again. 2014-01-07 14:18:17 +01:00
ob-awk.el awk code blocks handle tabular input 2014-06-07 11:16:55 -04:00
ob-calc.el Update copyright years again. 2014-01-07 14:18:17 +01:00
ob-clojure.el ob-clojure: Silence byte-compiler 2014-10-13 22:05:12 +02:00
ob-comint.el ob-comint.el: Fix bug. 2014-09-01 00:52:13 -04:00
ob-coq.el ob-coq.el: Declare external functions 2014-03-05 15:38:48 +01:00
ob-core.el ob-core: Preserve inline-ness of source blocks when inserting results 2014-08-22 14:39:39 +02:00
ob-css.el Update copyright years again. 2014-01-07 14:18:17 +01:00
ob-ditaa.el un-duplicate ditaa eps file name generation 2014-06-06 12:21:56 -04:00
ob-dot.el ob-dot.el: Substitute variables literally 2014-04-16 17:37:00 +02:00
ob-ebnf.el ob-ebnf: Fix copyright and style 2013-10-29 15:18:24 +01:00
ob-emacs-lisp.el Merge branch 'maint' 2014-01-07 14:19:03 +01:00
ob-eval.el ob-eval: Do not use read-only mode, switch to compilation mode only once 2014-09-10 11:22:43 +02:00
ob-exp.el ob: Support for exporting inline source code 2014-08-22 14:39:38 +02:00
ob-forth.el ob-forth: Silence byte-compiler 2014-08-14 11:15:37 +02:00
ob-fortran.el Merge branch 'maint' 2014-01-07 14:19:03 +01:00
ob-gnuplot.el ob-gnuplot: Fix error when table contains dates 2014-09-15 13:47:20 +02:00
ob-groovy.el Make C, C++, D, Java, Groovy compilers customizable 2014-06-16 11:05:01 -04:00
ob-haskell.el ob-core, ob-exp, ob-haskell, ob-python: declarations for org-src-preserve-indentations 2014-05-28 14:52:14 +02:00
ob-io.el Update copyright years again. 2014-01-07 14:18:17 +01:00
ob-java.el Make C, C++, D, Java, Groovy compilers customizable 2014-06-16 11:05:01 -04:00
ob-js.el slightly smarter result parsing for js 2014-08-23 23:49:37 -04:00
ob-keys.el Org babel: Add function and keybinding to remove result blocks 2014-04-17 08:41:05 +02:00
ob-latex.el ob-latex: fixes and improvements 2014-08-16 00:43:37 -04:00
ob-ledger.el Update copyright years again. 2014-01-07 14:18:17 +01:00
ob-lilypond.el ob-lilypond: Code cleanup 2014-08-20 22:24:01 +02:00
ob-lisp.el protect lisp code blocks from ending comments 2014-08-03 21:33:13 -04:00
ob-lob.el ob-lob: do not use cl at runtime 2014-03-25 18:59:59 +01:00
ob-makefile.el Backport Emacs changes from r116063 2014-01-18 09:17:14 +01:00
ob-matlab.el Update copyright years again. 2014-01-07 14:18:17 +01:00
ob-maxima.el babel: fixes for commit 08e2596 2014-05-15 23:26:30 -04:00
ob-mscgen.el Update copyright years again. 2014-01-07 14:18:17 +01:00
ob-ocaml.el ob-ocaml.el (org-babel-execute:ocaml): Code cleanup 2014-04-18 14:47:46 +02:00
ob-octave.el babel: fixes for commit 08e2596 2014-05-15 23:26:30 -04:00
ob-org.el Update copyright years again. 2014-01-07 14:18:17 +01:00
ob-perl.el Update copyright years again. 2014-01-07 14:18:17 +01:00
ob-picolisp.el Update copyright years again. 2014-01-07 14:18:17 +01:00
ob-plantuml.el Update copyright years again. 2014-01-07 14:18:17 +01:00
ob-python.el Merge branch 'maint' 2014-05-28 16:23:08 +02:00
ob-ref.el ob-ref: Properly resolve references in ":post" arguments 2014-03-19 21:34:56 +01:00
ob-ruby.el ob-ruby: clean up the session code some more and work around an I/O sync problem in comint 2014-09-21 17:59:49 +02:00
ob-sass.el Update copyright years again. 2014-01-07 14:18:17 +01:00
ob-scala.el Update copyright years again. 2014-01-07 14:18:17 +01:00
ob-scheme.el lisp/ob-scheme.el: Fix scheme code blocks execution error in batch mode 2014-05-22 13:14:30 +02:00
ob-screen.el ob-screen, use unpredictable temp file name 2014-05-08 12:19:30 -06:00
ob-shell.el Merge branch 'maint' 2014-09-19 11:53:46 +02:00
ob-shen.el Update copyright years again. 2014-01-07 14:18:17 +01:00
ob-sql.el ob-sql.el: Clean mysql parameters generation 2014-09-20 23:06:40 +02:00
ob-sqlite.el Update copyright years again. 2014-01-07 14:18:17 +01:00
ob-table.el ob-table: Updated documentation. 2014-10-04 12:10:49 +02:00
ob-tangle.el tangle option to not post-process tangle comments 2014-06-07 11:29:03 -04:00
ob.el Update copyright years again. 2014-01-07 14:18:17 +01:00
org-agenda.el [PATCH] Fix: Emacs 25 fancy diary inclusion in agenda 2014-10-11 18:16:36 +02:00
org-archive.el Complete commit 07158e 2014-03-13 11:28:07 +01:00
org-attach.el Merge branch 'maint' 2014-05-21 19:47:29 +02:00
org-bbdb.el Fix BBDB link completion 2014-04-29 11:36:16 +02:00
org-bibtex.el Merge branch 'maint' 2014-06-23 09:45:48 +02:00
org-capture.el org-capture: Better indentation when creating a new list 2014-10-14 22:24:30 +02:00
org-clock.el Use `org-clock-string' whenever possible 2014-08-27 10:10:24 +02:00
org-colview.el Fix COMMENT keyword when stacked with a regular keyword 2014-04-10 22:51:16 +02:00
org-compat.el org-compat: Provide compatibility definition for font-lock-ensure 2014-06-01 14:22:42 +02:00
org-crypt.el Update copyright years again. 2014-01-07 14:18:17 +01:00
org-ctags.el Update copyright years again. 2014-01-07 14:18:17 +01:00
org-datetree.el Update copyright years again. 2014-01-07 14:18:17 +01:00
org-docview.el Fix `org-open-at-point' on "docview"-type links 2014-03-05 11:39:48 +01:00
org-element.el Parsing and exporting special blocks preserve case 2014-09-17 20:52:54 +02:00
org-entities.el Merge branch 'maint' 2014-05-28 16:23:08 +02:00
org-eshell.el Update copyright years again. 2014-01-07 14:18:17 +01:00
org-faces.el org-faces: remove org-copy-face 2014-09-27 23:36:37 -04:00
org-feed.el org-feed.el: Allow current buffer to be indirect 2014-02-18 20:33:34 +01:00
org-footnote.el Reverting "org-footnote: forward declare functions" 2014-06-01 14:28:13 +02:00
org-gnus.el org-gnus.el: silent compiler 2014-06-13 12:26:10 +02:00
org-habit.el org-habit.el (org-habit-insert-consistency-graphs): Don't remove filter overlays 2014-05-22 14:34:46 +02:00
org-id.el Update copyright years again. 2014-01-07 14:18:17 +01:00
org-indent.el Update copyright years again. 2014-01-07 14:18:17 +01:00
org-info.el Update copyright years again. 2014-01-07 14:18:17 +01:00
org-inlinetask.el Merge branch 'maint' 2014-01-07 14:19:03 +01:00
org-install.el org-install.el: Do not warn users. 2013-01-22 14:08:39 +01:00
org-irc.el Backport typo fixes from Emacs revno r115923 2014-01-09 00:47:40 +01:00
org-list.el Fix indentation in lists 2014-10-13 19:03:14 +02:00
org-macro.el Warn about unexpanded macros on export 2014-10-12 16:47:09 +01:00
org-macs.el Make org-get-limited-outline-regexp usable outside of org. 2014-07-28 16:14:39 +02:00
org-mhe.el Update copyright years again. 2014-01-07 14:18:17 +01:00
org-mobile.el Merge branch 'maint' 2014-06-11 17:46:40 +02:00
org-mouse.el Merge branch 'maint' 2014-05-23 13:12:37 +02:00
org-pcomplete.el Merge branch 'maint' 2014-01-07 14:19:03 +01:00
org-plot.el Revert "org-plot: Handle explicit date/time index" 2014-03-25 09:18:25 +01:00
org-protocol.el Update copyright years again. 2014-01-07 14:18:17 +01:00
org-rmail.el org-agenda.el (org-agenda-format-item): Don't add the 'effort and 'effort-minutes text properties 2014-05-23 16:51:55 +02:00
org-src.el Merge branch 'maint' 2014-09-11 18:27:22 +02:00
org-table.el Ascii and Gnuplot key-bindings 2014-10-12 11:25:51 +02:00
org-timer.el Small refactoring and fix a bug in `org-timer-set-timer' 2014-05-28 10:47:05 +02:00
org-w3m.el Update copyright years again. 2014-01-07 14:18:17 +01:00
org.el Fix indentation in lists 2014-10-13 19:03:14 +02:00
ox-ascii.el ox: Support unnumbered headlines via property 2014-10-03 22:06:34 +02:00
ox-beamer.el Revert "Merge export and special blocks within back-ends" 2014-09-08 11:57:27 +02:00
ox-html.el Fix 464cd96 2014-10-03 22:23:25 +02:00
ox-icalendar.el ox-icalendar: Small fix 2014-08-28 11:23:50 +02:00
ox-latex.el ox: Support unnumbered headlines via property 2014-10-03 22:06:34 +02:00
ox-man.el Parsing and exporting special blocks preserve case 2014-09-17 20:52:54 +02:00
ox-md.el Fix 464cd96 2014-10-03 22:23:25 +02:00
ox-odt.el ox: Support unnumbered headlines via property 2014-10-03 22:06:34 +02:00
ox-org.el ox-org: Update wrt `org-element-block-name-alist' change 2014-08-08 10:34:34 +02:00
ox-publish.el Merge branch 'maint' 2014-10-12 22:55:38 +02:00
ox-texinfo.el ox-texinfo: fix bug in 3432681fbe 2014-09-19 10:39:02 +02:00
ox.el Merge branch 'maint' 2014-10-12 22:55:38 +02:00