0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-07-16 05:46:27 +00:00
Commit graph

6040 commits

Author SHA1 Message Date
Nicolas Goaziou eebd8eb022 Fixed bug in `org-in-item-p' with point at an heading just beyond list.
* org-list.el (org-in-item-p): Handle case when point is at an
  heading.
* org-list.el (org-list-make-subtree): Add protection when used
  outside of list
* org-list.el (org-insert-item): Removed useless hack now
  `org-in-item-p' is fixed.
* org-timer.el (org-timer-item): Removed useless hack now
  `org-in-item-p' is fixed.
2010-09-01 19:05:49 +02:00
Nicolas Goaziou 42f82d1bad Descriptions items shouldn't be numbered.
* org-list.el (org-cycle-list-bullet): prevent description items from
  being numbered. String argument is also recognized now, as long as
  it is a valid bullet.
2010-09-01 19:05:48 +02:00
Nicolas Goaziou 8241e9b652 Refactoring. 2010-09-01 19:05:48 +02:00
Nicolas Goaziou a42f8066d4 Can't insert new item after `org-list-bottom-point' anymore. 2010-09-01 19:05:48 +02:00
Nicolas Goaziou fb7183c619 Forgot a save-excursion' in org-apply-on-list'. 2010-09-01 19:05:48 +02:00
Nicolas Goaziou 9e3b3d023d List follows indentation of its top item.
* org-list.el (org-indent-item-tree): moving indentation of top list
  item will make the whole list move.
* org-list.el (org-apply-on-list): function is less sensitive to
  changes of indentation.

Before this patch, cycling indentation of top list item would just
break list. Now, it does something useful.
2010-09-01 19:05:48 +02:00
Nicolas Goaziou d22d58acf1 Allow cycling indentation at creation of description and checkboxed items.
* org-list.el (org-at-item-checkbox-p): add whitespaces at the end of
  the regexp.
* org-list.el (org-checkbox-blocked-p): use new checkbox regexp.
* org-list.el (org-cycle-item-indentation): allow cycling description
  items and checkbox items.
* org-list.el (org-toggle-checkbox): use new checkbox regexp.
* org-list.el (org-reset-checkbox-state-subtree): use new checkbox regexp.
2010-09-01 19:05:48 +02:00
Nicolas Goaziou 85868125c2 Fix cycling indentation. 2010-09-01 19:05:48 +02:00
Nicolas Goaziou 8597bb25ee Description item regexp was too strict. 2010-09-01 19:05:48 +02:00
Nicolas Goaziou 97f857c9b7 Minor refactoring. 2010-09-01 19:05:47 +02:00
Nicolas Goaziou abb490c572 Internal functions stay with org-list- prefix. 2010-09-01 19:05:47 +02:00
Nicolas Goaziou d830b4b3ee Refactoring 2010-09-01 19:05:47 +02:00
Nicolas Goaziou 8a215f56eb No checkboxes for description items. 2010-09-01 19:05:47 +02:00
Nicolas Goaziou 2b5b8cf8a2 Refactoring. 2010-09-01 19:05:47 +02:00
Nicolas Goaziou c3bbbc0926 Blank lines number is guessed locally when inserting item.
* org-list.el (org-insert-item-internal): guessing of blank lines
  number is made by looking at neighbours items, if any.
2010-09-01 19:05:47 +02:00
Nicolas Goaziou 905ad49e9a Fixed some corner-case when inserting item. 2010-09-01 19:05:47 +02:00
Nicolas Goaziou 3dfc889cce Refactoring. 2010-09-01 19:05:47 +02:00
Nicolas Goaziou 0229bcc054 Sort also timer lists.
* org-list.el (org-sort-list): add the possibility to sort timer lists
  with the ?t or ?T options.
2010-09-01 19:05:47 +02:00
Nicolas Goaziou 802a3d1b3f Refactoring.
* org-list.el (org-search-unenclosed-internal): new function to handle
  both `org-search-forward-unenclosed' and
  `org-search-backward-unenclosed'.
* org-list.el (org-search-backward-unenclosed): Can send errors now.
  Removed useless usage of COUNT.
* org-list.el (org-search-forward-unenclosed): Can send errors now.
  Removed useless usage of COUNT.
* org-list.el (org-update-checkbox-count): Use
  `org-search-forward-unenclosed' and `org-search-backward-unenclosed'
  instead of `re-search-forward' and `re-search-backward'.
* org-list.el (org-sort-list): Use
  `org-search-forward-unenclosed' and `org-search-backward-unenclosed'
  instead of `re-search-forward' and `re-search-backward'.
* org-list.el (org-list-make-subtree): Use
  `org-search-forward-unenclosed' and `org-search-backward-unenclosed'
  instead of `re-search-forward' and `re-search-backward'.
2010-09-01 19:05:47 +02:00
Nicolas Goaziou 7cf8ab06de Fix inserting item with point before first char of item's body.
* lisp/org-list.el (org-insert-item-internal): fixes the problem when
  point was before the first char of the item's body.
2010-09-01 19:05:47 +02:00
Nicolas Goaziou deb6b0c504 Some comments changes. 2010-09-01 19:05:47 +02:00
Nicolas Goaziou 53c4b53e8f Less latency in org-timer-item.
* org-timer.el (org-timer-item): Refactoring. Compute timer string
  before inserting it in the buffer
* org-timer.el (org-timer): added an optional argument to return timer
  string instead of inserting it.
2010-09-01 19:05:47 +02:00
Nicolas Goaziou 8eece59f9e Refactoring and increased protection on item insertion.
* org-list.el (org-insert-item-internal): New function to handle
  positionning and contents of an item being inserted at a specific
  pos. It is not possible anymore to split a term in a description
  list or a checkbox when inserting a new item.
* org-list.el (org-insert-item): Refactored by using the new
  `org-insert-item-internal' function.
* org-timer.el (org-timer-item): Refactored by using the new
  `org-insert-item-internal' function.
2010-09-01 19:05:46 +02:00
Nicolas Goaziou 472579fb96 Minor refactoring. 2010-09-01 19:05:46 +02:00
Nicolas Goaziou 1f41236014 Cycle lists properly.
* org-list.el (org-list-bottom-point): Be sure to check real
  ORG-OUTLINE-REGEXP and not outline-regexp, that might be modified.
* org.el (org-cycle-internal-local): cycle up to end of subtree or end
  of item if we are in a list.
2010-09-01 19:05:46 +02:00
Nicolas Goaziou 7a17a37580 Reverting info changes. 2010-09-01 19:05:46 +02:00
Nicolas Goaziou 430279f2cf Added information on timer lists. 2010-09-01 19:05:46 +02:00
Nicolas Goaziou 2dd3b8a2a8 Better support for timer lists. Trying to insert a new item with point
in a special block now move before block.

* org-list.el (org-insert-item): Move before any special block in a
  list prior to add a new item.
* org-timer.el (org-timer-item): When in a timer list, insert a new
  timer item like `org-insert-item'. If in another list, send an
  error. Otherwise, start a new timer list.
2010-09-01 19:05:46 +02:00
Nicolas Goaziou 2e4e05b3d6 Minor refactoring.
* lisp/org-list.el: Minor refactoring.
2010-09-01 19:05:46 +02:00
Nicolas Goaziou 2b8aa4c406 Position items with relative timer at the right place.
* org-timer.el (org-timer-item): Insert description list item at the
  right column.
* org-list.el (org-insert-item): Insert the right number of blank
  lines before a relative timer.
2010-09-01 19:05:46 +02:00
Nicolas Goaziou 292b52f596 Insert item even in LaTeX environments.
* org-list.el (org-insert-item): Remove restriction on latex blocks.
2010-09-01 19:05:46 +02:00
Nicolas Goaziou 47cd0c193d Make parsing of lists more powerful during export.
* org-list.el (org-search-backward-unenclosed): Do not stop in
  protected places.
* org-list.el (org-search-forward-unenclosed): Do not stop in
  protected places.
* org-latex.el (org-export-latex-lists): Use the fact that
  org-search-forward do not stop anymore at protected places.
2010-09-01 19:05:46 +02:00
Nicolas Goaziou 168a8b6007 Do not prevent list items from being inside LaTeX blocks.
* org-list.el (org-search-backward-unenclosed): Do not prevent list
  items from being inside LaTeX blocks.
* org-list.el (org-search-forward-unenclosed): Do not prevent list
  items from being inside LaTeX blocks.
2010-09-01 19:05:45 +02:00
Nicolas Goaziou 968fa927c4 Fix for org-list-send-list.
* org-list.el (org-in-item-p): Do not widen before checking if we are
  in item.
* org-list.el (org-list-send-list): We cannot count on
  `org-list-top-point' and `org-list-bottom-point' before buffer is
  narrowed. Find bounds of list otherwise.
2010-09-01 19:05:45 +02:00
Nicolas Goaziou b2433f9eb6 Changed default for end-list regexp.
* lisp/org-list.el (org-list-end-regexp): By default, list ending is
  exactly 2 blank lines.
2010-09-01 19:05:45 +02:00
Nicolas Goaziou 197ed8b273 Remove useless checks for `org-empty-line-terminates-plain-lists'.
* org-docbook.el (org-export-as-docbook): When we find an empty line,
  we do not need to check for `org-empty-line-terminates-plain-lists'
  because we would have found end-list marker before.
* org-html.el (org-export-as-html): Same.
2010-09-01 19:05:45 +02:00
Nicolas Goaziou 0c4770e661 Refactoring.
* org-list.el (org-insert-item): Simplify count of blank lines to insert.
2010-09-01 19:05:45 +02:00
Nicolas Goaziou 37733b77a4 List ending is now customizable.
* org-list.el (org-list-end-regexp): New customizable variable to
  define what string should end lists.
* org-list.el (org-list-end-re): Function is now aware of
  `org-list-end-regexp'.
2010-09-01 19:05:45 +02:00
Nicolas Goaziou 27cfeefc3b Code cleanup.
* org-html.el (org-export-as-html): Code cleanup.
2010-09-01 19:05:45 +02:00
Nicolas Goaziou 07eb3308c1 Docbook exporter now handles new list definition.
* org-docbook.el (org-export-as-docbook): Properly close any open list
  when seeing ORG-LIST-END. Removed any reference to now unneeded
  DIDCLOSE variable.
2010-09-01 19:05:45 +02:00
Nicolas Goaziou a63ecfa89b Better handling of non-blank-lines types of list enders.
* org-exp.el (org-export-mark-list-ending): fix number of blank lines
  inserted after a list.
* org-list.el (org-list-parse-list): fix case when `org-list-end-re'
  would have an indentation greater than current list.
2010-09-01 19:05:45 +02:00
Nicolas Goaziou fe42a5e83e Export supports any list ender. Export to ascii has been fixed.
* org-exp.el (org-export-mark-list-ending): Differentiate between
  export backends, and replace `org-list-end-re' by a blank line upon
  exporting.
2010-09-01 19:05:45 +02:00
Nicolas Goaziou 4c2bc51c52 Remove the no longer needed didclose variable.
* org-html.el (org-export-as-html): Delete didclose and everything
  related to it, as it is no longer needed.
2010-09-01 19:05:45 +02:00
Nicolas Goaziou 99306969b0 Both latex and html should now export correctly.
* org-html.el (org-export-html-preprocess): Remove unneeded insertion
  of list end marker, as it is now handled by
  `org-export-mark-list-ending'.
* org-html.el (org-export-as-html): Cleaner termination of lists.
* org-exp.el (org-export-mark-list-ending): New function to insert
  specific markers at the end of lists when exporting to a backend not
  using `org-list-parse-list'.
  This function is called early in `org-export-preprocess-string',
  while it is still able to recognize lists.
* org-latex.el (org-export-latex-lists): Better search for lists. It
  now only finds items not enclosed and not protected.
2010-09-01 19:05:45 +02:00
Nicolas Goaziou f677013276 Use org-search-forward-unenclosed' instead of re-search-forward'.
* lisp/org-list.el: Replaced `re-search-forward' by
  `org-search-forward-unenclosed' where it made sense.
2010-09-01 19:05:45 +02:00
Nicolas Goaziou ecd5a4b0f1 Make `org-apply-to-list' more functional.
* lisp/org-list.el (org-apply-to-list): Now a return value is handed
  at each new call of the function applied.
* lisp/org-list.el (org-fix-bullet-type): Use the new
  `org-apply-to-list' format.
* lisp/org-list.el (org-renumber-ordered-list): Use the new
  `org-apply-to-list' format.
2010-09-01 19:05:44 +02:00
Nicolas Goaziou fb5cab814e Better regexps in searches unenclosed.
* lisp/org.el (org-in-regexps-block-p): minor fix: limit wasn't
  correctly used.
* lisp/org-list.el (org-search-forward-unenclosed): Better regexp
  used.
* lisp/org-list.el (org-search-backward-unenclosed): Better regexp
  used.
2010-09-01 19:05:44 +02:00
Nicolas Goaziou 2dec9eb473 Fix regression in `org-sort-list'.
* lisp/org-list.el (org-sort-list): end-rec function was ill-defined.
2010-09-01 19:05:44 +02:00
Nicolas Goaziou f7f07198dd Fix for org-search-forward-unenclosed' and org-search-backward-unenclosed'.
* lisp/org-list.el (org-search-forward-unenclosed): fix behavior when
  last occurence was enclosed.
* lisp/org-list.el (org-search-backward-unenclosed): fix behavior when
  last occurence was enclosed.
2010-09-01 19:05:44 +02:00
Nicolas Goaziou 30fb7a570a Fix documentation.
* lisp/org.el (org-in-regexps-block-p): Fix documentation.
2010-09-01 19:05:44 +02:00