Commit Graph

611 Commits

Author SHA1 Message Date
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