Commit Graph

666 Commits

Author SHA1 Message Date
Bastien Guerry 98cd4687a2 Update copyright years.
Happy new year!
2013-01-01 16:04:24 +01:00
Nicolas Goaziou 0421be2cee Merge branch 'maint' 2012-11-13 15:46:33 +01:00
Nicolas Goaziou 5dbccdb432 org-list: Fix infloop when inserting an item
* lisp/org-list.el (org-list-separating-blank-lines-number): When
  computing number of blank lines separating items, also count those
  in unparsed blocks, like example blocks.
* testing/lisp/test-org-list.el: Add tests.

In the following situation, with `org-blank-before-new-entry' set to
`auto' for `plain-list-item, a blank line should be inserted when
inserting the following item:

- item1
  #+BEGIN_EXAMPLE

  contents

  #+END_EXAMPLE
2012-11-13 15:45:09 +01:00
Carsten Dominik 651dfdfe33 Respect additional arguments to sorting functions
Without this patch, calls to the sorting functions from lisp did not
work as advertised.

* lisp/org-list.el (org-sort-list): Respect sorting-type and getkey-func when
they are specified in the call.

* lisp/org.el (org-sort-entries): Respect sorting-type and getkey-func when
they are specified in the call.
2012-10-09 08:27:17 +02:00
Bastien Guerry 655da8d1d3 Remove useless (t nil) sexps at the end of some (cond ...) constructs
* org.el (org-compute-latex-and-specials-regexp)
(org-paste-subtree, org-sort-entries, org-store-link)
(org-open-at-point, org-file-remote-p, org-add-log-setup)
(org-set-tags-to, org-fast-tag-selection)
(org-diary-sexp-entry): Ditto.

* org-agenda.el (org-agenda-get-blocks, org-cmp-priority)
(org-cmp-effort, org-cmp-todo-state, org-cmp-alpha)
(org-cmp-tag, org-cmp-time): Remove useless (t nil) sexps at
the end of (cond ...) constructs.

* org-mobile.el (org-mobile-create-index-file): Ditto.

* org-lparse.el (org-lparse-format-table-row): Ditto.

* org-list.el (org-sort-list): Ditto.

* org-id.el (org-id-get): Ditto.

* org-html.el (org-export-html-preprocess): Ditto.

* org-exp.el (org-default-export-plist)
(org-table-clean-before-export): Ditto.

(t nil) in (cond (...) (...) (t nil)) has no other meaning that to
remind the developer that the cond sexp returns nil in case no condition
is matched.  For several (cond ...) constructs this is obvious from reading
the code.  For others, the reminder might be useful and we leave it.

See the discussion about this on emacs-devel:
http://thread.gmane.org/gmane.emacs.devel/152664
2012-08-19 14:42:54 +02:00
Nicolas Goaziou ad94a9433b Addendum to 50a434bb9f
* lisp/org-element.el (org-element-item-parser): Do not remove tag
  from body if list isn't descriptive.
* lisp/org-list.el (org-insert-item): Only ask about a term for
  descriptive lists.
(org-list-struct, org-list-insert-item): Do not recognize a tag in an
ordered list.
* testing/lisp/test-org-element.el: Add test.
2012-08-18 13:13:31 +02:00
Nicolas Goaziou 50a434bb9f org-list: Fix list type with mixed constructs
* lisp/org-list.el (org-list-automatic-rules): Remove `bullet' rule,
  which is now hard-coded.
(org-cycle-list-bullet): Hard code `bullet' rule.
(org-list-get-list-type): Make sure a list with numbered bullets
cannot have `descriptive' type.
* testing/lisp/test-org-list.el: Add tests.
2012-08-18 09:30:33 +02:00
Bastien Guerry 70dd1196d2 Massive code clean-up.
Delete trailing whitespaces.
Indent all sexps correctly.
Sentences end with double spaces.
2012-08-11 19:10:44 +02:00
Bastien Guerry cbb7742d3b org-list.el (org-mark-list): Delete.
* org-list.el (org-mark-list): Delete.
2012-07-31 17:15:07 +02:00
Michael Brand 41f427f4bb Description list: improve regexp consistency
* lisp/org-list.el (org-at-item-description-p,
org-list-item-body-column): Make the inline regexp more consistent
with `org-list-full-item-re', the inline regexp "Description list
items" from `org-set-font-lock-defaults and others'.

This resolves some issues with M-q (org-fill-paragraph) on description
lists.
2012-06-12 14:35:05 +02:00
Nicolas Goaziou e5b5656aa2 org-list: Allow check-boxes in description lists
* lisp/org-list.el (org-list-automatic-rules): Allow check-boxes in
  description lists.
(org-list-struct-apply-struct, org-insert-item): Remove rule check.
2012-06-09 14:42:07 +02:00
Nicolas Goaziou 248d3fa76f Merge branch 'maint' 2012-05-08 09:01:47 +02:00
Nicolas Goaziou 56fe788c8f org-list: Fix visibility preservation
* lisp/org-list.el (org-list-struct): Fix white spaces.
(org-list-swap-items, org-list-send-item): Fix visibility
preservation.
2012-05-08 09:00:18 +02:00
Nicolas Goaziou 9cd8b88a40 Merge branch 'maint' 2012-05-07 22:36:34 +02:00
Nicolas Goaziou 200cf5efe1 org-list: Preserve visibility when moving items
* lisp/org-list.el (org-list-swap-items, org-list-send-item): Preserve
  visibility when moving items.
2012-05-07 22:35:41 +02:00
Bastien Guerry c465c7bdf0 org-list.el: Return an error when there is no list at point.
* org-list.el (org-mark-list): Return an error when there is
no list at point.
2012-05-05 10:52:57 +02:00
Nicolas Goaziou 97b0696212 org-list: Fix bugs relative to item indentation
* lisp/org-list.el (org-list-struct-indent): Follow
  `org-list-demote-modify-bullet' specifications for ordered bullets.
(org-list-indent-item-generic, org-indent-item-tree,
org-outdent-item-tree): Fix bug when operating on a region.
(org-outdent-item, org-indent-item): Allow to operate on a region.
* lisp/org.el (org-shiftmetaleft, org-shiftmetaright): Allow to
  operate on a region.
* testing/lisp/test-org-list.el: Add tests.
2012-04-21 12:13:49 +02:00
Nicolas Goaziou dbc6fd1ebf Merge branch 'hotfix' 2012-04-18 13:02:09 +02:00
Nicolas Goaziou 7d6309f132 org-list: Fix bugs relative to item indentation
* lisp/org-list.el (org-list-struct-indent): Follow
  `org-list-demote-modify-bullet' specifications for ordered bullets.
(org-list-indent-item-generic, org-indent-item-tree,
org-outdent-item-tree): Fix bug when operating on a region.
(org-outdent-item, org-indent-item): Allow to operate on a region.
* lisp/org.el (org-shiftmetaleft, org-shiftmetaright): Allow to
  operate on a region.
* testing/lisp/test-org-list.el: Add tests.
2012-04-18 13:01:44 +02:00
Bastien Guerry c19f5c3c0d Add :version to org-list.el options. 2012-04-03 13:32:23 +02:00
Bastien Guerry ecd0562c5f Fix the master branch.
I started from the 78ec8e commit then cherry-picked and squashed
commits that have been done in master since then, except the bad
commits that overwrote the tree (in master) with the tree in maint.

This commit also bumps the version number to 7.8.06.

The only "fix" that was made between 78ec8e and the previous commit
is e0072f which has been reported to break stuff.
2012-03-19 22:01:29 +01:00
Bastien Guerry 6e306f65ff Fix copyright years in maint. 2012-03-17 16:31:04 +01:00
Bastien Guerry de42649f7b Manually revert maint to e85080.
e85080 is the last correct commit in the maint branch
before releasing 7.8.04.  The 7.8.05 release should be
done from this commit.
2012-03-17 16:28:46 +01:00
Bastien Guerry 73bb18ba37 Manually revert to the Release 7.8.04 tag. 2012-03-17 15:52:24 +01:00
Bastien Guerry 38c5045725 Fix copyright years. 2012-03-17 14:36:25 +01:00
Bastien Guerry 6e534f9c61 Manually revert back to commit e85080.
This fixes a wrong merge that should not have happened:
commit 7e903a merges the master branch into the maint branch,
while we really want to keep the maint branch a bugfix-only
branch.

This commit reverts back the maint branch to its state before
merging the master branch.  From there, we will fix remaining
problems with the maint branch (e.g. copyright issues) then
release this maint branch as Org-mode 7.8.05.
2012-03-17 14:34:01 +01:00
Bastien Guerry b879590f3b Merge branch 'maint' 2012-03-08 13:50:51 +01:00
Adam Spiers 11e441e85f Fix typos 2012-03-08 13:50:19 +01:00
Nicolas Goaziou b2fb61cd56 Merge branch 'maint' 2012-02-29 21:04:52 +01:00
Nicolas Goaziou bdb66b4c61 org-list: Fix small bug
* lisp/org-list.el (org-list-struct): Fix small bug introduced by
  commit 8b7a3f2498.
* testing/lisp/test-org-list.el: Add test.
2012-02-29 21:04:15 +01:00
Nicolas Goaziou 3869bf1b0b org-list: Whitespace cleanup 2012-02-21 11:59:12 +01:00
Nicolas Goaziou 387bd87c73 org-list: Implement a function to return an item sequence number
* lisp/org-list.el (org-list-get-item-number): New function.
2012-02-20 16:07:14 +01:00
Nicolas Goaziou 8b7a3f2498 org-list: Remove two defcustoms
* lisp/org-list.el (org-list-ending-method, org-list-end-regexp):
  Removed variables.
(org-in-item-p, org-list-separating-blank-lines-number,
org-list-parse-list, org-list-struct): Apply changes.
* lisp/org-exp.el (org-export-mark-list-end,
  org-export-mark-list-properties): Apply changes.
* lisp/org-latex.el (org-export-latex-lists): Apply changes.
* doc/org.texi (Plain lists): Document removal.

Conflicts:

	lisp/org-list.el
2012-02-19 09:16:21 -07:00
Bastien Guerry d5ca0780f9 Fix typos and spelling mistakes.
Thanks to Paul Eggert for this fixes in Emacs trunk.
2012-02-19 08:23:42 -07:00
Nicolas Goaziou cf87d15483 org-list: Remove two defcustoms
* lisp/org-list.el (org-list-ending-method, org-list-end-regexp):
  Removed variables.
(org-in-item-p, org-list-separating-blank-lines-number,
org-list-parse-list, org-list-struct): Apply changes.
* lisp/org-exp.el (org-export-mark-list-end,
  org-export-mark-list-properties): Apply changes.
* lisp/org-latex.el (org-export-latex-lists): Apply changes.
* doc/org.texi (Plain lists): Document removal.
2012-02-17 00:04:34 +01:00
Bastien Guerry 04971de4b9 Add version tag "24.1" for options introduced since Emacs 23.4 (and <= 24.1)
* org-exp.el (org-export-kill-product-buffer-when-displayed)
(org-export-initial-scope, org-export-date-timestamp-format)
(org-export-with-tasks, org-export-email-info)
(org-export-table-remove-empty-lines): Add version tag.

* org-mobile.el (org-mobile-files-exclude-regexp)
(org-mobile-use-encryption, org-mobile-encryption-tempfile)
(org-mobile-encryption-password, org-mobile-agendas): Add
version tag.

* ob-plantuml.el (org-plantuml-jar-path): Add version tag.

* org.el (org-babel-load-languages, org-clone-delete-id)
(org-log-buffer-setup-hook)
(org-loop-over-headlines-in-active-region)
(org-use-sub-superscripts, org-startup-with-beamer-mode)
(org-startup-with-inline-images, org-ctrl-k-protect-subtree)
(org-catch-invisible-edits)
(org-link-search-must-match-exact-headline)
(org-confirm-shell-link-not-regexp)
(org-confirm-elisp-link-not-regexp, org-log-refile)
(org-refile-use-cache)
(org-refile-active-region-within-subtree)
(org-todo-repeat-to-state, org-get-priority-function)
(org-agenda-jump-prefer-future)
(org-read-date-force-compatible-dates)
(org-use-effective-time)
(org-complete-tags-always-offer-all-agenda-tags)
(org-properties-postprocess-alist)
(org-format-latex-signal-error)
(org-latex-to-mathml-jar-file)
(org-latex-to-mathml-convert-command)
(org-export-latex-default-packages-alist)
(org-hidden-keywords, org-pretty-entities)
(org-pretty-entities-include-sub-superscripts)
(org-src-fontify-natively, org-effort-durations)
(org-speed-command-hook): Add version tag.

* org-html.el (org-export-html-footnote-separator)
(org-export-html-mathjax-options)
(org-export-html-mathjax-template)
(org-export-html-headline-anchor-format)
(org-export-html-preamble-format)
(org-export-html-postamble-format)
(org-export-html-table-align-individual-fields)
(org-export-html-protect-char-alist, org-export-html-divs):
Add version tag.

* org-ctags.el (org-ctags-path-to-ctags)
(org-ctags-open-link-functions)
(org-ctags-new-topic-template): Add version tag.

* ob-exp.el (org-export-babel-evaluate): Add version tag.

* org-beamer.el (org-beamer-use-parts)
(org-beamer-frame-level, org-beamer-frame-default-options)
(org-beamer-column-view-format, org-beamer-themes)
(org-beamer-environments-extra, org-beamer-fragile-re)
(org-beamer-outline-frame-title)
(org-beamer-outline-frame-options): Add version tag.

* org-wl.el (org-wl-link-remove-filter)
(org-wl-shimbun-prefer-web-links)
(org-wl-nntp-prefer-web-links, org-wl-disable-folder-check)
(org-wl-namazu-default-index): Add version tag.

* org-clock.el (org-task-overrun-text)
(org-clocktable-defaults, org-clock-clocktable-formatter)
(org-clock-clocktable-language-setup)
(org-clock-report-include-clocking-task)
(org-clock-resolve-expert): Add version tag.

* ob-lob.el (org-babel-lob-files): Add version tag.

* org-freemind.el (org-freemind-node-css-style): Add version
tag.

* org-archive.el (org-archive-reversed-order)
(org-archive-subtree-add-inherited-tags): Add version tag.

* org-bibtex.el (org-bibtex-autogen-keys, org-bibtex-prefix)
(org-bibtex-treat-headline-as-title)
(org-bibtex-export-arbitrary-fields)
(org-bibtex-key-property, org-bibtex-tags)
(org-bibtex-tags-are-keywords, org-bibtex-no-export-tags)
(org-bibtex-type-property-name): Add version tag.

* org-timer.el (org-timer-default-timer): Add version tag.

* org-taskjuggler.el (org-export-taskjuggler-extension)
(org-export-taskjuggler-project-tag)
(org-export-taskjuggler-resource-tag)
(org-export-taskjuggler-target-version)
(org-export-taskjuggler-default-project-version)
(org-export-taskjuggler-default-project-duration)
(org-export-taskjuggler-default-reports)
(org-export-taskjuggler-default-global-properties): Add
version tag.

* org-habit.el (org-habit-today-glyph)
(org-habit-completed-glyph): Add version tag.

* org-list.el (org-alphabetical-lists)
(org-list-ending-method, org-list-end-regexp)
(org-list-automatic-rules, org-list-use-circular-motion)
(org-list-indent-offset): Add version tag.

* ob-picolisp.el (org-babel-picolisp-cmd): Add version tag.

* org-icalendar.el (org-icalendar-alarm-time)
(org-icalendar-combined-description)
(org-icalendar-honor-noexport-tag)
(org-icalendar-date-time-format): Add version tag.

* org-src.el (org-src-tab-acts-natively): Add version tag.

* org-exp-blocks.el (org-export-blocks-postblock-hook): Add
version tag.

* org-table.el (org-table-exit-follow-field-mode-when-leaving-table)
(org-table-fix-formulas-confirm)
(org-table-duration-custom-format)
(org-table-formula-field-format): Add version tag.

* org-publish.el (org-publish-sitemap-sort-files)
(org-publish-sitemap-sort-folders)
(org-publish-sitemap-sort-ignore-case)
(org-publish-sitemap-date-format)
(org-publish-sitemap-file-entry-format): Add version tag.

* ob-js.el (org-babel-js-cmd): Add version tag.

* org-docbook.el (org-export-docbook-footnote-separator)
(org-export-docbook-xslt-stylesheet): Add version tag.

* org-entities.el (org-entities-ascii-explanatory)
(org-entities-user): Add version tag.

* ob.el (org-confirm-babel-evaluate)
(org-babel-no-eval-on-ctrl-c-ctrl-c): Add version tag.

* ob-tangle.el (org-babel-tangle-lang-exts)
(org-babel-post-tangle-hook, org-babel-pre-tangle-hook)
(org-babel-tangle-body-hook)
(org-babel-tangle-comment-format-beg)
(org-babel-tangle-comment-format-end)
(org-babel-process-comment-text): Add version tag.

* org-gnus.el (org-gnus-nnimap-query-article-no-from-file):
Add version tag.

* org-crypt.el (org-crypt-disable-auto-save): Add version tag.

* org-inlinetask.el (org-inlinetask-default-state): Add
version tag.

* ob-scheme.el (org-babel-scheme-cmd): Add version tag.

* ob-lisp.el (org-babel-lisp-dir-fmt): Add version tag.

* org-attach.el (org-attach-store-link-p): Add version tag.

* org-capture.el (org-capture-templates)
(org-capture-before-finalize-hook)
(org-capture-after-finalize-hook): Add version tag.

* org-agenda.el (org-agenda-skip-deadline-prewarning-if-scheduled)
(org-agenda-time-leading-zero, org-agenda-follow-indirect)
(org-agenda-menu-two-column, org-agenda-menu-show-matcher)
(org-agenda-timegrid-use-ampm)
(org-agenda-remove-timeranges-from-blocks)
(org-agenda-inactive-leader, org-agenda-current-time-string)
(org-agenda-show-current-time-in-grid)
(org-agenda-search-view-force-full-words)
(org-agenda-search-view-always-boolean)
(org-agenda-clock-consistency-checks)
(org-agenda-include-deadlines)
(org-agenda-move-date-from-past-immediately-to-today)
(org-agenda-day-face-function)
(org-agenda-category-icon-alist)
(org-agenda-bulk-custom-functions)
(org-agenda-insert-diary-extract-time): Add version tag.

* org-latex.el (org-export-latex-inputenc-alist)
(org-export-latex-tag-markup)
(org-export-latex-timestamp-inactive-markup)
(org-export-latex-href-format)
(org-export-latex-hyperref-format)
(org-export-latex-footnote-separator)
(org-export-latex-quotes)
(org-export-latex-table-caption-above)
(org-export-latex-listings-w-names)
(org-export-latex-minted-langs)
(org-export-latex-listings-options)
(org-export-latex-minted-options)
(org-latex-default-figure-position, org-export-pdf-logfiles):
Add version tag.

* org-faces.el (org-faces-easy-properties)
(org-fontify-quote-and-verse-blocks, org-cycle-level-faces):
Add version tag.

* ob-ditaa.el (org-ditaa-jar-option): Add version tag.

Thanks to Glenn Morris for reporting this.
2012-02-13 15:49:28 +01:00
Bastien Guerry aee6f9008a New function `org-mark-list' bound to `C-c C-@'.
* org-list.el (org-mark-list): New function.

* org.el (org-mode-map): Add a keybinding for the new function.
2012-01-25 13:52:20 +01:00
Bastien Guerry fadca5e8eb Fix typos and spelling mistakes.
Thanks to Paul Eggert for this fixes in Emacs trunk.
2012-01-10 11:56:15 +01:00
Bastien Guerry e44d2975ff Fix copyright (to 2012) year and Org version (to 7.8.03). 2012-01-03 18:47:01 +01:00
Bastien Guerry b73075a8d2 Code cleanup up: rename org-on-*-p to org-at-*-p.
Rename `org-on-heading-p' and `org-on-target-p' to
`org-at-heading-p' and `org-at-target-p' to be more
consistent with the org-at-*-p family.

Also define two aliases.
2012-01-02 19:52:35 +01:00
Nicolas Goaziou 8c19c76d2e org-list: Change behaviour of C-c C-c at a list item with an argument
* lisp/org-list.el (org-list-write-struct): Add an optional argument
  for structure changes happening outside the function.
* lisp/org.el (org-ctrl-c-ctrl-c): Now, C-u C-c C-c on the first item
  of a sub-list should toggle check-box presence of every item in the
  same sub-list.  Also fix check-box insertion on a single item.
2011-12-31 17:35:37 +01:00
Nicolas Goaziou 809318dd5b Better handling of ill-formed lists
* lisp/org-list.el (org-list-parents-alist): When no parent is found
  for an item, set it as the closest less indented item above.  If
  none is found, make it a top level item.
(org-list-write-struct): Externalize code.
(org-list-struct-fix-item-end): New function.
(org-list-struct): Remove a now useless fix.
* lisp/org.el (org-ctrl-c-ctrl-c): Use new function.
2011-10-02 23:17:11 +02:00
Nicolas Goaziou 0019b6f193 org-list: fix code typo 2011-08-24 02:11:36 +02:00
Nicolas Goaziou 08ca5be491 org-list: tiny code change
* lisp/org-list.el (org-list-struct-apply-struct): don't
  use (copy-marker (point)) instead of (point-marker).
2011-08-23 22:20:55 +02:00
Nicolas Goaziou 8bb1a0c57f org-list: forgot a double space 2011-08-23 22:19:14 +02:00
Nicolas Goaziou 969baac557 org-list: corrections to commentary section and add linefeed 2011-08-23 22:17:20 +02:00
Nicolas Goaziou 065c5c3241 Make some files pass checkdoc test 2011-08-23 21:43:30 +02:00
Nicolas Goaziou 405ebb43df org-list: remove dependency on `org-back-over-empty-lines'
* lisp/org-list.el (org-list-separating-blank-lines-number): the
  behaviour of `org-back-over-empty-lines' depends on the associated
  value of `headline' in `org-blank-before-new-entry', which is out of
  context in a list.
2011-08-21 21:39:56 +02:00
Bastien Guerry 58f1dbccf8 Remove the "Version" header in Org libraries (leave it in org.el).
Also remove blank lines before the ";;; org*el ends here" declarations.

Having a "Version" header forced us to update every file when releasing a
new version of Org; it also forced us to update every file when merging Org
with Emacs trunk, thus cluttering the diffs between the previously merged
version and the new one with useless information.

Glenn Morris suggested this in emacs-devel:
http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00322.html
2011-08-17 14:42:34 +02:00
Nicolas Goaziou b6fab3770b org-list: remove left-over commented code and clean white space 2011-08-16 10:23:04 +02:00
Bastien Guerry ad23b7d173 Fix bzg email address (s/altern/gnu). 2011-08-15 21:22:30 +02:00
Bastien Guerry 7a18799e25 Remove arch-tag at the bottom of files. 2011-08-15 20:04:38 +02:00
Nicolas Goaziou dfda5fc8b4 org-list: get correct structure with empty items
* lisp/org-list.el (org-list-full-item-re): when an item has only
  a bullet and no space after it, list structure would not be
  recognized correctly.
2011-08-15 18:29:37 +02:00
Bastien Guerry 904ed18bc2 Fix copyright years for elisp files in core and contrib.
Also add "This file is not part of GNU Emacs." when this is the case.
2011-08-15 15:23:11 +02:00
Bastien Guerry d9b7afd835 org-list.el: Allow the generic list exporter to trim line breaks in items.
* org-list.el (org-list-item-trim-br): New function.
(org-list-to-generic): New parameter :nobr to use the new
function.
2011-08-14 16:38:55 +02:00
John Wiegley d24a141d96 Renamed unnecessary use of sort* to sort 2011-08-13 16:43:22 -05:00
Nicolas Goaziou 1bbfec57af org-list: don't clear marker while still in use
* lisp/org-list.el (org-toggle-checkbox): don't clear lim-down while
  used in the while loop.
2011-08-12 15:17:48 +02:00
Nicolas Goaziou b4aee73ef1 org-list: fix bug in `org-toggle-checkbox' on current item
* lisp/org-list.el (org-toggle-checkbox): lim-down must be a marker.
2011-08-12 15:11:19 +02:00
emacs 7340cee33a Update website to show 7.7 as current release 2011-07-28 10:33:35 +00:00
Nicolas Goaziou 4f85aa21c6 org-list: fix a small error when guessing blank lines before items
* lisp/org-list.el: search blank lines down to the end of the item
  instead of stopping at the item, in order to possibly match such
  lines within the item.
2011-07-26 17:46:55 +02:00
Nicolas Goaziou ba092ec08d Do not add an extraneous blank lines when parsing lists
* lisp/org-exp.el (org-export-mark-list-end,
  org-export-mark-list-properties): don't remove the ending regexp
  when it consists in blank lines.
* lisp/org-list.el (org-list-parse-list): ditto, but remove it
  completely when it isn't made of blank lines (i.e. during export process).
2011-07-24 20:03:30 +02:00
Bastien Guerry 5c53026d32 Fix (a lot of) compiler warnings.
Also introduce `org-pop-to-buffer-same-window' as a compatibility
function for Emacs =>24.1.
2011-07-18 19:25:10 +02:00
Nicolas Goaziou a161ecfd6a org-list: move point after asking for new term when inserting an item
* lisp/org-list.el (org-list-insert-item): actualize code comments.
(org-insert-item): for consistency, point cannot be moved at
a surprising place when the user is being asked to choose a new
description term to insert in the list. Point should stay where the
user called the command.
2011-07-18 13:51:15 +02:00
Nicolas Goaziou f7f2394448 org-list: clean left-over markers
* lisp/org-list.el (org-list-send-item, org-list-struct-apply-struct,
  org-apply-on-list, org-toggle-checkbox): make markers point nowhere
  when they have become useless.
2011-07-18 00:57:01 +02:00
Nicolas Goaziou 054230b138 org-list: never add useless blank lines when inserting an item
* lisp/org-list.el (org-list-insert-item): when insertion point is in
  some white line after the end of the list, remove all unnecessary
  white lines there before proceeding. Also refactor a snippet of
  code.
2011-07-17 22:54:21 +02:00
Nicolas Goaziou 108bd48e25 org-list: introduce a variable to distinguish sub-items better
* lisp/org-list.el (org-list-indent-offset): new variable.
(org-list-struct-fix-ind): make use of the new variable.
2011-07-12 09:12:19 +02:00
Nicolas Goaziou aad4a7d4d3 Complete default values for check-boxes in LaTeX exporter
* lisp/org-latex.el (org-export-latex-list-parameters): complete
  default value with cbtrans option.
* lisp/org-list.el (org-list-to-latex): set a more consistent default
  value.
2011-07-12 09:12:19 +02:00
Nicolas Goaziou 90ef02a02b org-list: move and rename org-list-exchange-items
* lisp/org-list.el (org-list-swap-items): move it to a meaningful
  position in source code (i.e. before any function using it), and
  rename it to an easier name.
2011-07-12 09:12:19 +02:00
Nicolas Goaziou 688a29c0d6 org-list: change heuristics for number of lines separating items
* lisp/org-list.el (org-list-separating-blank-lines-number): if there
  are blank lines already in the whole list, add a blank line.
2011-07-12 09:12:19 +02:00
Nicolas Goaziou 41355053e6 org-list: introduce a variable to consider lists as rings
* lisp/org-list.el (org-list-use-circular-move): new variable.
(org-previous-item, org-next-item): make use of the new variable.
(org-move-item-down, org-move-item-up): make use of the new
variable. Simplify code.
2011-07-12 09:12:13 +02:00
Nicolas Goaziou 6338eb72a6 org-list: add a new method on lists (org-list-send-item)
* lisp/org-list.el (org-list-delete-item, org-list-send-item): new
  functions.
2011-07-12 09:09:34 +02:00
Nicolas Goaziou ecabda5603 org-list: docstring update
* lisp/org-list.el (org-plain-list-ordered-item-terminator): remove
  incorrect assumption.
2011-07-10 10:40:03 +02:00
Nicolas Goaziou dc85f45194 More forbidden blocks for lists and footnotes
* lisp/org-footnote.el (org-footnote-forbidden-blocks): add missing
  exporter specific blocks.
* lisp/org-list.el (org-list-forbidden-blocks): ditto.
2011-07-10 10:33:25 +02:00
Nicolas Goaziou d29fcc50ea org-list: make use of new `org-in-block-p' function
* lisp/org-list.el (org-list-in-valid-context-p): use `org-in-block-p'.
2011-07-08 18:08:34 +02:00
Bastien Guerry 9c05a7c781 Bump to version 7.6 2011-07-06 21:06:03 +02:00
Nicolas Goaziou 934aae8812 Allow white spaces between the counter and the check-box in an item
* lisp/org-list.el (org-list-full-item-re): allow counter and
  check-box to be separated by white spaces.
(org-list-struct-apply-struct): reflect changes made to
`org-list-full-item-re'.
* lisp/org-html.el (org-html-export-list-line): recognize spaces
  between counter and check-boxes as valid.
* lisp/org-docbook.el (org-export-docbook-list-line): ditto.
2011-06-30 22:57:18 +02:00
Nicolas Goaziou e070ebe6b0 org-list: org-list-insert-item respects its POS argument value
* lisp/org-list.el (org-list-insert-item): make sure point is moved
  to the specified POS before starting the function.
2011-06-30 20:35:56 +02:00
Nicolas Goaziou cc76e76509 org-list: fix bug with item cycling
* lisp/org-list.el (org-cycle-item-indentation): cycling back to
  original position deleted any additional information in the item,
  like a counter or a tag.
2011-06-28 20:26:49 +02:00
Nicolas Goaziou c4086ad1e4 org-list: doc-strings white-spaces fixes 2011-06-28 20:26:49 +02:00
Carsten Dominik 67893d3158 Declare a function to keep compiler happy 2011-06-24 06:47:32 +02:00
Nicolas Goaziou a0bc3bdebc org-list: fix update of check-boxes cookies in whole trees
* lisp/org-list.el (org-reset-checkbox-state-subtree): make the
  command more robust, and correctly update check-boxes in the whole
  sub-tree.
(org-update-checkbox-count): fix bug accumulating count of checkboxes
when walking a subtree.
(org-update-checkbox-count-maybe): add an optional argument passed to
org-update-checkbox-count.

Thanks to Paul Mead for the report.
2011-06-20 21:59:58 +02:00
Nicolas Goaziou 432c53a474 org-list: add a way to configure transitional check-boxes export
* lisp/org-list.el (org-list-parse-list): replace transitional
check-boxes with "[CBTRANS]" string during parsing.
(org-list-to-generic): use the new property `:cbtrans' to configure
export string for transitional check-boxes.
2011-06-17 15:11:49 +02:00
Nicolas Goaziou 889a487ae4 org-list: fix item's start number in LaTeX exporter
* lisp/org-list.el (org-list-to-latex): the enumerate environment in
latex increments the counter before using it. Therefore, org-mode
should set the enumeration counter to the desired value minus one.

Patch from Darlan Cavalcante Moreira
TINYCHANGE
2011-06-10 15:50:51 +02:00
Nicolas Goaziou 51946c36d7 Keep byte-compiler happy 2011-06-06 20:46:31 +02:00
Nicolas Goaziou ddeab1a8af Changes automatically made to cookies shouldn't move tags
* lisp/org.el (org-auto-align-tags): change docstring.
(org-update-parent-todo-statistics): keep tags aligned even when
statistics cookies are shifting them.
* lisp/org-list.el (org-update-checkbox-count): keep tags aligned even
when statistics cookies are shifting them.
2011-06-05 18:55:25 +02:00
Nicolas Goaziou b39a271fcb Keep byte-compiler happy 2011-05-28 18:16:34 +02:00
Nicolas Goaziou ddc2467387 Fix list before first heading conversion to odd levels subtree
* lisp/org-list.el (org-list-to-subtree): if the list is before first
  heading and `org-odd-levels-only' is non-nil, the first item gets
  two stars instead of one.
* lisp/org.el (org-reduced-level): a level of 0 was reduced to 1 with
  `org-odd-levels-only' non-nil.
2011-05-28 14:13:11 +02:00
Nicolas Goaziou 8f0ea16167 Ignore lists within exporters specific blocks
* lisp/org-exp.el (org-export-mark-list-properties): even if context
  is invalid, mark list item with `list-context' property.
* lisp/org-list.el (org-list-forbidden-blocks): add exporters specific
  blocks to the list of forbidden blocks.

Thanks to Jai Bharat Patel for reporting this.
2011-05-27 16:53:54 +02:00
Nicolas Goaziou f194eb1719 org-list: fix bug when sorting a list with a custom function
* lisp/org-list.el (org-sort-list): function tries to intern
  getkey-func before it is defined, so it's always nil.

Based on a patch from Le Wang.
2011-05-26 17:48:25 +02:00
Nicolas Goaziou 2500c6b1c8 org-list: fix heuristics for number of lines to insert with a new item
* lisp/org-list.el (org-list-separating-blank-lines-number): fix
  confusion between point and item beginning. Now, if no information
  is avalaible, truly follow user preference when it inserts blank
  lines manually.
  (org-list-insert-item): send correct argument to the preceding
  function.
2011-05-15 22:38:56 +02:00
Nicolas Goaziou 946640d84d org-list: correctly identify description lists
* lisp/org-list.el (org-list-full-item-re): allow description term to
  have a newline character after the colons.
2011-05-07 02:33:13 +02:00
Nicolas Goaziou 073ab7de83 org-list: check with-case argument when sorting a list alphabetically
* lisp/org-list.el (org-sort-list): no longer ignore with-case
  argument: the function sorted case-sensitively, regardless of
  argument.
2011-05-07 02:17:19 +02:00
Nicolas Goaziou 7327b483f1 org-list: small docstring fix 2011-04-24 11:25:40 +02:00
Nicolas Goaziou fc91845fa5 org-list: fix bug with structure and blocks/drawers indentation
* lisp/org-list.el (org-list-struct): when walking down the list, the
  function would not pay attention to drawers or blocks indentation.
  Thus, such constructs couldn't consistently end an item or a list.
  This patch ensures line indentation is stored (if applicable) before
  skipping them. Also fixed doc-string and comments.
2011-04-24 11:23:01 +02:00
Nicolas Goaziou a7a4693f66 org-list: don't forget to allow alphabetical counters 2011-04-09 16:09:32 +02:00
Nicolas Goaziou abad1b4994 Auto-fill shouldn't insert new items
* lisp/org-list.el (org-list-in-valid-context-p): renamed from
  org-list-in-valid-block-p.
  (org-at-item-p,org-list-search-generic): use renamed function.

* lisp/org.el (org-fill-item-nobreak-p): new function.
  (org-set-autofill-regexps): modify `fill-nobreak-predicate' to
  prevent auto-fill from breaking line just before an item regexp.
2011-04-09 13:20:37 +02:00
Nicolas Goaziou 2f72b3efcb org-list: fix cookie updating
* lisp/org-list.el: move org-update-checkbox-count-maybe call outside
  of save-excursion to get back to original position.
2011-03-30 19:00:45 +02:00
Nicolas Goaziou d9c5b384f8 org-list: org-keyword-time-regexp might be nil in other major modes
* lisp/org-list.el (org-toggle-checkbox): build value of
  org-keyword-time-regexp instead of using it directly, as it's
  buffer-local, and function might be called outside Org.
2011-03-23 21:02:38 +01:00
Nicolas Goaziou 051b5b291c org-list: fix infinite loop on erroneous block and drawer constructs
* lisp/org-list.el (org-list-struct,org-in-item-p): don't assume end
  of blocks or drawers necessarily start somewhere. It it isn't the
  case, treat them as normal text.
2011-03-23 18:33:05 +01:00
Nicolas Goaziou 06ca884162 org-list: fix bug with org-toggle-checkbox
* lisp/org-list.el (org-list-checkbox): when called from an headline,
  function would normally skip drawers, but not if a SCHEDULED or
  DEADLINE keyword is standing before the drawer. Also avoid problems
  if function is called in buffers not is Org mode.
2011-03-23 17:38:16 +01:00
Nicolas Goaziou 74169a8029 org-list: org-drawer-regexp is nil outside Org buffers
* lisp/org-list.el (org-in-item-p): re-build org-drawer-regexp,
  whatever the major mode is.
2011-03-20 09:10:53 +01:00
Nicolas Goaziou b6fc03b70c org-list: enhance list transformations and fix glitches
* lisp/org-list.el (org-list-to-generic): set a default term for
  ill-formed description lists. Do not insert newline characters
  unless told to.
  (org-list-to-texinfo,org-list-to-html): apply changes to
  `org-list-parse-liste'.
2011-03-17 16:11:04 +01:00
Nicolas Goaziou f8c627a44b org-list: fix parsing of counters
* lisp/org-list.el (org-list-parse-list): fixed regexp.
2011-03-14 23:36:19 +01:00
Nicolas Goaziou df26ae8e69 Checkboxes should progress from intermediate state to checked
Thanks to Matt Lundin for pointing that out.
2011-03-12 16:40:37 +01:00
Nicolas Goaziou f8ca5d85ba org-list: small refactoring
* lisp/org-list.el (org-list-in-valid-block-p): new function.
(org-at-item-p,org-list-search-generic): use new function.
2011-03-09 20:30:18 +01:00
Nicolas Goaziou 4090006ab1 org-list: fix confusion due to indent-tabs-mode 2011-03-08 23:49:39 +01:00
emacs 11a10bdfe7 Update website to show 7.5 as current release 2011-03-07 14:27:39 +00:00
Nicolas Goaziou 38877e6cf9 org-list: update statistical cookies with check-boxes in an hidden subtree
* lisp/org-list.el (org-update-checkbox-count): Ensure cookies on an
  heading are correctly updated when checkboxes are hidden. It allows,
  for example, to use C-c C-x C-b on a collapsed tree and still get
  the update.
2011-03-06 21:34:35 +01:00
Nicolas Goaziou 1ecee90f47 org-list: slight speed-up for org-list-context 2011-03-06 16:00:34 +01:00
Nicolas Goaziou b65280ae2b org-list: fix infinite loop introduced by last refactoring 2011-03-01 12:22:13 +01:00
Nicolas Goaziou fcf66e74c6 org-list: refactor code 2011-02-28 22:33:31 +01:00
Nicolas Goaziou 7b211c86e7 org-list: fix insertion of item with indent-tabs-mode is non-nil
* lisp/org-list.el (org-list-insert-item): when computing size of item
  being inserted, function has to take into account that indentation
  may not only be made of spaces.
2011-02-25 20:48:27 +01:00
Nicolas Goaziou 7745ad28c3 org-list: fix checkbox toggling
* lisp/org-list.el (org-toggle-checkbox): fix bug where top item in
  list was omitted when checking boxes.

Patch from Nick Dokos.
2011-02-25 18:16:24 +01:00
Nicolas Goaziou 6489346093 Make byte-compiler happy 2011-02-22 20:55:41 +01:00
Nicolas Goaziou 90ad814703 org-list: indentation has precedence over visibility cycling
* lisp/org-list (org-cycle-item-indentation): do not break an
  indentation cycle because visibility cycling is requested. This
  happens when an item becomes a parent, due to indentation change.
  Not considered empty anymore, the function cannot change its
  indentation again.
2011-02-22 18:57:57 +01:00
Nicolas Goaziou 9dc1ac5660 org-list: refactor code 2011-02-22 18:46:33 +01:00
Nicolas Goaziou 99aa57fb20 org-list: cycling indentation must not add white spaces at eol
* lisp/org-list.el (org-cycle-item-indentation): each time the
  function moves item back to child position, a white space is added
  to the line.
2011-02-20 17:38:26 +01:00
Nicolas Goaziou fde7e150bb org-list: docstrings changes 2011-02-18 13:43:49 +01:00
Nicolas Goaziou 19ea827cd7 org-list: unwrap org-entry-get from ignore-errors
* lisp/org-list.el (org-toggle-checkbox, org-update-checkbox-count):
  no need to wrap org-entry-get in ignore-errors since commit
  7dd425cc5d
2011-02-18 13:43:49 +01:00
Nicolas Goaziou f6bbdaf7cc org-list: minor fix in regexp 2011-02-18 12:45:13 +01:00
Nicolas Goaziou b43ad47ad1 Insert a newline character before <\li> when exporting lists
* lisp/org-html.el (org-html-export-list-line): insert a newline
  character before ending an item, as anchor could be on a line
  going to be deleted, like a drawer ending string.
* lisp/org-list.el (org-list-to-html): same.
2011-02-18 12:45:13 +01:00
Nicolas Goaziou 2de0a87f7d org-list: apply removal of org-invisible-p 2011-02-18 12:45:12 +01:00
Nicolas Goaziou 5adafe0c8d Changes to filling in items
* lisp/org.el (org-set-autofill-regexps): use `org-item-re' in
  `paragraph-start' to recognize alphabetical lists.
(org-fill-paragraph): enforce a pre-computed fill-prefix before
  calling fill-paragraph when point in in an item. Also prevent
  paragraphs getting merged into an adjacent list upon filling.
(org-adaptive-fill-function): make sure to determine real fill-prefix
  for auto-fill.
(org-auto-fill-function): use a pre-computed fill-prefix before
  calling do-auto-fill.
* lisp/org-list.el (org-list-item-body-column): new function
2011-02-18 12:45:12 +01:00
Nicolas Goaziou b7f6a916b3 Fix toggling and cycling visibility for items and inline tasks
* lisp/org-inlinetask.el (org-inlinetask-at-task-p,
org-inlinetask-toggle-visibility): new functions.
* lisp/org-list.el (org-list-set-item-visibility): new function.
* lisp/org.el (org-cycle, org-cycle-internal-local): separate lists
  and inline tasks from headlines.
(org-outline-level): do not consider lists as headlines.
  Cycling visibility is using different tools.
2011-02-18 12:45:12 +01:00
Nicolas Goaziou 69cc51fa43 C-c C-c also repairs ill-formed lists
* lisp/org-list.el (org-list-struct): mark items less indented than
  top item of the list, so that they will be modified.
(org-list-struct-apply-struct): compare struct's indentation with
  line's indentation instead of old-struct's. This is needed because
  `org-list-struct' automatically fixes indentation so changes might not
  be seen otherwise.
* lisp/org.el (org-ctrl-c-ctrl-c): small refactoring.
2011-02-18 12:45:12 +01:00
Nicolas Goaziou e5a61ab260 org-list: update cookies in special contexts
* lisp/org-list.el (org-update-checkbox-count): when a part of the
  buffer is processed to count checkboxes, lists are read from top to
  bottom, but inside lists (in drawers, blocks, or inline tasks) are
  skipped. Thus, cookies cannot be updated. This patch enforces
  reading of such lists if counter is itself in a special context.
2011-02-18 12:45:12 +01:00
Nicolas Goaziou f7ebd6bcf0 org-list: ignore inline tasks when shifting an item, and fix indentation
* lisp/org-list.el (org-list-struct-apply-struct): inline tasks along
  with their content must stay at column 0 even if the item is gaining
  indentation. Moreover, fix indentation of text in an inline task,
  now it can be in such a task within a list.
2011-02-18 12:45:12 +01:00
Nicolas Goaziou 349196def4 org-list: forgot a default case in org-list-struct 2011-02-18 12:45:12 +01:00
Nicolas Goaziou 7ce76a7acc org-list: refactor org-list-struct 2011-02-18 12:45:12 +01:00
Nicolas Goaziou 0148fac717 org-list: make org-at-item-p less permissive
* lisp/org-list.el (org-at-item-p): also verify context is valid.
  Otherwise it would recognize valid items where org-in-item-p
  wouldn't.
(org-in-item-p, org-list-struct-apply-struct): use shorter version of
org-at-item-p.
(org-cycle-list-bullet): fix typo.
(org-list-parse-list): avoid calling org-at-item-p two times by using
an appropriate regexp
* lisp/org.el (org-indent-line-function): use an appropriate regexp
  instead of calling org-at-item-p two times.
2011-02-18 12:45:12 +01:00
Nicolas Goaziou 0bec47e9ab org-list: keep byte-compiler happy 2011-02-18 12:45:12 +01:00
Nicolas Goaziou 3017425c48 org-list: fix org-in-item-p when point is just after an ending regexp
* lisp/org-list.el (org-in-item-p): When point was just after
  org-list-end-re, check wouldn't be done for starting line. So, if
  the first line was an item, it wouln't be noticed and function would
  return nil. Simplify and comment code.
2011-02-18 12:45:12 +01:00
Nicolas Goaziou 0850948dea org-list: small bug fix in org-list-struct-apply-struct
* lisp/org-list.el (org-list-struct-apply-struct): if end of list was
  at eol, for example, with list inside a block, the last list
  wouldn't be shifted. Thus, the patch ensures no blank lines is
  skipped.
2011-02-18 12:45:12 +01:00
Nicolas Goaziou dcf23c416f org-list: ignore lines with org-example property when creating structure
* lisp/org-list.el (org-list-struct): when a line has org-example
  property, skip the entire block. This is needed during export, for
  example when src blocks in org markup contain lists, and are
  returned verbatim because org isn't in the list of interpreted
  languages.
2011-02-18 12:45:11 +01:00
Nicolas Goaziou d309256aff org-list: fix corner cases in org-in-item-p
* lisp/org-list.el (org-in-item-p): handle special cases when function
  is called with cursor amidst `org-list-end-re' or at an inline task.
2011-02-18 12:45:11 +01:00
Nicolas Goaziou 12de47aa5a org-list: code cleanup 2011-02-18 12:45:11 +01:00
Nicolas Goaziou bd68169b4b org-list: reorder file, rename functions, improve comments
* lisp/ob.el (org-babel-result-end): apply renaming.
* lisp/org-exp.el (org-export-mark-list-properties): apply renaming.
* lisp/org-list.el (org-list-prevs-alist): renamed from
  org-list-struct-prev-alist.
(org-list-parents-alist): renamed from org-list-struct-parent-alist.
(org-list-write-struct): renamed from org-list-struct-fix-struct.
(org-list-parse-list, org-sort-list, org-list-indent-item-generic,
org-toggle-checkbox, org-update-checkbox-count, org-cycle-list-bullet,
org-list-repair, org-insert-item, org-move-item-up, org-move-item-up,
org-move-item-down, org-next-item, org-previous-item,
org-end-of-item-list, org-beginning-of-item-list, org-apply-on-list):
apply renaming.
(org-get-bullet): removed function, as it is not needed anymore.
2011-02-18 12:45:11 +01:00
Nicolas Goaziou a02d2ad13e org-list: separate tasks needed to insert a new item more clearly
* lisp/org-list.el (org-list-insert-item-generic): change arguments.
  The function now accepts structure and previous items alist. This
  allow to insert an item programmatically more easily.
(org-insert-item): Apply changes to org-list-insert-item-generic. The
  function now takes care about repairing structure and updating
  checkboxes.
* lisp/org-timer.el (org-timer-item): Apply changes to
  org-list-insert-item-generic. The function now takes care about
  repairing structure.
2011-02-18 12:45:11 +01:00
Nicolas Goaziou e7ca7c98dd org-list: modifications to org-list-to-generic
* lisp/org-list.el (org-list-make-subtree): function now uses
  org-list-parse-list mechanism.
(org-list-make-subtrees): removed function.
(org-list-to-generic): added a parameter and every parameter can be a
  sexp returning a string, for finer control.
(org-list-to-html, org-list-to-latex, org-list-to-texinfo): slight
  modifications to apply changes to org-list-to-generic.
(org-list-to-subtree): new function.
2011-02-18 12:45:11 +01:00
Nicolas Goaziou 3e274d0290 org-list: small refactoring and comments improvements 2011-02-18 12:45:11 +01:00
Nicolas Goaziou 212828c556 org-list: correctly handle counters in `org-list-parse-list'
* lisp/org-list.el (org-at-item-counter-p): new function.
(org-list-parse-list): handle counters and list depth.
(org-list-to-generic): a special string is used when an item has a
counter.
(org-list-to-latex): use new special string for counters. This fixes
the counter bug in LaTeX export, as the enumi counter was the only one
modified.
* lisp/org-latex.el (org-export-latex-lists): use new
`org-list-parse-list' output.
2011-02-18 12:45:11 +01:00
Nicolas Goaziou cddea8c542 org-list: new accessor returning type of list
* lisp/org-list.el (org-list-get-list-type): new function.
(org-list-parse-list): use new function.
* lisp/org-html.el (org-html-export-list-line): use new function.
* lisp/org-docbook.el (org-export-docbook-list-line): use new function.
2011-02-18 12:45:10 +01:00
Nicolas Goaziou 781228183a org-list: implement alphabetical lists
* lisp/org-list.el (org-alphabetical-lists): new variable
(org-item-re, org-list-full-item, org-cycle-list-bullet,
org-list-struct-fix-bul, org-list-inc-bullet-maybe): reflect
introduction of the new variable.
(org-item-beginning-re): changed into a function, so any modification
of `org-alphabetical-lists' will not require reloading Org.
(org-at-item-p, org-toggle-checkbox, org-update-checkbox-count,
org-list-parse-list, org-list-send-list): reflect changes to
`org-item-beginning-re'.
(org-list-use-alpha-bul-p): new function.
* lisp/org.el (org-check-for-hidden): reflect changes to
`org-item-beginning-re'.
* lisp/org-capture.el (org-capture-place-item): reflect changes to
`org-item-beginning-re'.
* lisp/org-docbook.el (org-export-docbook-list-line): handle new type
of items.
* lisp/org-exp.el (org-export-mark-list-end,
org-export-mark-list-properties): reflect changes to
`org-item-beginning-re'.
* lisp/org-html.el (org-html-export-list-line): handle new type of
items.
* lisp/org-latex.el (org-export-latex-lists): handle new type of items
and reflect changes to `org-item-beginning-re'.
* lisp/org-ascii.el (org-export-ascii-preprocess): handle new counters.

Modified from a patch by Nathaniel Flath.
2011-02-18 12:45:10 +01:00
Nicolas Goaziou e5293ba347 org-list: checkbox count code cleanup 2011-02-18 12:45:10 +01:00
Nicolas Goaziou 2c79244687 Change function org-list-end-re into a variable
* lisp/org-list.el (org-list-end-re): removed function and made it a
  variable. There's no need for the overhead of calling the function
  every at every line in a list. User will have to reload Org if he
  change value of either `org-list-end-regexp' or
  `org-empty-line-terminates-plain-lists'.
(org-in-item-p,org-list-struct,org-list-parse-list): apply change.
* lisp/org-exp.el (org-export-mark-list-end,
  org-export-mark-list-properties): apply change
* lisp/org-latex.el (org-export-latex-lists): apply change. Also
  prevent items with org-example property to be considered as real
  items.
2011-02-18 12:45:10 +01:00
Nicolas Goaziou 215d3fa030 Improve usage of `org-in-item-p'
When the function needs to know if cursor is in a plain list and move
to item beginning if it is the case, a fast way is to ignore errors on
(goto-char (org-in-item-p)).
2011-02-18 12:45:10 +01:00
Nicolas Goaziou d7a799cc86 org-inlinetask: fix export of inline tasks within lists
* lisp/org-inlinetask.el (org-inlinetask-export-templates): slightly
  modify templates so environment boundaries don't interfere with
  content of task. Unprotect content of task so it might benefit from
  further transformations. Set original-indentation property to a high
  value to ensure that task is always in the last item of the list.
  Also, apply templates later in export process.
* lisp/org-list.el (org-list-struct): fix inline task skipping.
2011-02-18 12:45:10 +01:00
Nicolas Goaziou 79553c4764 org-list: fixes for incorrect number of arguments 2011-02-18 12:45:10 +01:00
Nicolas Goaziou c82805fc57 org-list: small fixes for org-list-struct 2011-02-18 12:45:10 +01:00
Nicolas Goaziou fc6c418726 org-list: remove code preventing insertion of an item in a block
* lisp/org-list.el (org-list-automatic-rules): removed insert rule.
(org-list-insert-item-generic): removed code preventing user to insert
another item in a block within a list. It is because new list context
make it impossible to see if a point in a block is also in a list.
2011-02-18 12:45:10 +01:00