Commit Graph

4080 Commits

Author SHA1 Message Date
Kyle Meyer 0d3683f2cd Merge branch 'maint' 2017-01-05 20:23:58 -05:00
Kyle Meyer 713f785017 Update copyright years 2017-01-05 20:19:37 -05:00
Bastien d0d05e5df1 Delete org-bullets.el from the contrib/ directory
* lisp/org.el (org-modules): Don't mention org-bullets.el,
which is now deleted from the contrib/ directory.

See https://github.com/sabof/org-bullets/issues/18
2017-01-03 12:22:38 +01:00
Nicolas Goaziou 1fac906174 Fix `org-N-empty-lines-before-current'
* lisp/org.el (org-N-empty-lines-before-current): Preserve point when
  calling the function from the beginning of a line.

* testing/lisp/test-org.el (test-org/insert-heading): Add tests.
2017-01-02 23:21:53 +01:00
Nicolas Goaziou 6f6c2ea8d9 Merge branch 'maint' 2016-12-29 16:39:07 +01:00
Alexey Lebedeff 3e68d01bdd Reveal tags after setting them
* lisp/org.el (org-set-tags): Reveal newly inserted tags.
* testing/lisp/test-org.el (test-org/set-tags): New test.

Sometimes freshly added tags can be sucked into invisible outline
region (denoted by ellipsis) - and to see them you need to do the full
global visibilty cycle.
2016-12-29 16:38:38 +01:00
Nicolas Goaziou 517fed8d4d Merge branch 'maint' 2016-12-26 10:32:42 +01:00
Nicolas Goaziou 4cf56e6e89 Fix following links starting with square brackets
* lisp/org.el (org-link-search): Improve regexp.
* testing/lisp/test-org.el (test-org/fuzzy-links): Add tests.
2016-12-26 10:32:26 +01:00
Bastien c98a343f8d Fix commit 1c89082.
* lisp/org.el (org-speed-command-hook): Do not use removed alias name.
2016-12-24 12:21:42 +01:00
Nicolas Goaziou 709dad2f3a Fix last commit
* lisp/org.el (org-speed-command-hook): Do not use removed alias name.
2016-12-24 11:30:19 +01:00
Nicolas Goaziou 1ddadefd37 Merge branch 'maint' 2016-12-22 13:13:08 +01:00
Nicolas Goaziou 820d1eb617 Fix `org-compile-file'
* lisp/org.el (org-compile-file): Ensure `out-dir' is always a string.
2016-12-22 13:12:19 +01:00
Nicolas Goaziou 901d2470dd Merge branch 'maint' 2016-12-15 14:24:46 +01:00
Nicolas Goaziou 51227cff94 Fix C-c C-c on inline tasks
* lisp/org.el (org-ctrl-c-ctrl-c): Properly recognize inlinetasks as
  a valid context.
2016-12-15 14:24:01 +01:00
Nicolas Goaziou f5b7de222d Fix level of newly inserted headlines
* lisp/org.el (org-insert-heading): Fix level of new headline when
  creating it from a regular text line.

* testing/lisp/test-org.el (test-org/insert-heading): Add tests.

Reported-by: swflint@flintfam.org (Samuel W. Flint)
<http://permalink.gmane.org/gmane.emacs.orgmode/110842>
2016-12-15 00:15:12 +01:00
Nicolas Goaziou 23a9492055 Fix bold emphasis around headlines
* lisp/org.el (org-do-emphasis-faces): Fix bold emphasis around
  headlines.  In particular, stars at the beginning of a headline are
  not bold markup, and bold markup cannot end with stars at the
  beginning of a headline.

Reported-by: Ian Dunn <dunni@gnu.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/110814>
2016-12-14 11:14:29 +01:00
Nicolas Goaziou 9fb2e047d2 Split `org-emph-re' and `org-verbatim-re'
* lisp/org.el (org-set-emph-re): Refactor code.  Rip "~" and "="
  markers off `org-emph-re'.
(org-do-emphasis-faces):
(org-sort-remove-invisible): Handle both `org-emph-re' and
`org-verbatim-re'.
(org-in-verbatim-emphasis): Use `org-verbatim-re' instead of
`org-emph-re'.

* lisp/org-element.el (org-element-code-parser):
(org-element-verbatim-parser): Use `org-verbatim-re' instead of
`org-emph-re'.
* testing/lisp/test-org-element.el (test-org-element/bold-parser):

(test-org-element/code-parser):
(test-org-element/italic-parser):
(test-org-element/strike-through-parser):
(test-org-element/underline-parser):
(test-org-element/verbatim-parser): Update tests, which no longer need
to bind `org-emph-re'.
2016-12-12 22:21:17 +01:00
Nicolas Goaziou c8da8529f5 `org-insert-heading' doesn't create items anymore
* lisp/org.el (org-insert-heading): Specialize function for headlines,
  not items.
(org-meta-return): Update according to new specifications above.
* lisp/org-list.el (org-insert-item): Add interactive spec.
* doc/org.texi (Structure editing): Update documentation.

* testing/lisp/test-org.el (test-org/insert-heading): Remove tests.
* testing/lisp/test-org-list.el (test-org-list/insert-item): Add test.
2016-12-10 00:32:15 +01:00
Nicolas Goaziou 68d8f860cd Improve blank line handling in `org-insert-heading'
* lisp/org.el (org--blank-before-heading-p): New function.
(org-insert-heading): Use previous function.  Major refactoring.

* testing/lisp/test-org.el (test-org/insert-heading):
(test-org/insert-todo-heading-respect-content): Update tests.
2016-12-10 00:32:14 +01:00
Nicolas Goaziou 64efc0cd45 Remove Org Timeline
* lisp/org-agenda.el (org-timeline-show-empty-dates):
(org-agenda-only-exact-dates): Remove variables.
(org-timeline):
(org-get-all-dates): Remove functions.

(org-agenda): Remove reference to `org-timeline'

* lisp/org-mouse.el (org-mouse-popup-global-menu): Remove reference to
  `org-timeline'.
* lisp/org.el (org-org-menu): Likewise.
2016-12-09 22:19:13 +01:00
Nicolas Goaziou e32aca36a4 Simplify matching headlines in `org-link-search'
* lisp/org.el (org-link-search): Simplify matching headlines.
2016-12-08 22:40:18 +01:00
Nicolas Goaziou 6ed3fc8010 Fix SCHEDULED removal when repeating a task
* lisp/org.el (org-auto-repeat-maybe): Fix bug where repeating a task
  containing a timestamp without a repeater would remove the scheduled
  date.

Reported-by: 毛晓伟 <maoweirm@126.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/110633>
2016-12-07 00:10:29 +01:00
Nicolas Goaziou e336f39ce7 Fix dpi calculation when previewing LaTeX snippets
* lisp/org.el (org--get-display-dpi): Fix docstring.
(org-create-formula-image): Use function above.

Reported-by: Scott Otterson <scotto@sharpleaf.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/110526>
2016-11-30 21:55:45 +01:00
Lixin Chin f5916c4fbb Relax the match criteria for MathML header line
* lisp/org.el (org-create-math-formula): Allow the xmlns attribute to
  be preceded by any other mathml header attribute.

The problem here was that the match criteria for MathML assumed that
the xmlns attribute is the first listed in the top level MathML <math>
element.  Some LaTeX -> MathML converters (e.g., pandoc) will add
attributes before xmlns, which is still valid MathML.
2016-11-29 09:28:06 +01:00
Kyle Meyer 6983f8e8bf Issue user-error when trying to drag before first element
* lisp/org.el (org-drag-element-backward):
(org-drag-element-forward): Check that org-element-at-point returns a
non-nil value to avoid a type-error when called before first element.

* testing/lisp/test-org.el (test-org/drag-element-backward):
(test-org/drag-element-forward): Add test for when point is before
first element.  Adjust existing should-error calls to specify
user-error.
2016-11-28 18:40:43 -05:00
Nicolas Goaziou 2998a139c4 Tiny fix
* lisp/org.el (org-at-clock-log-p): Use `beginning-of-line' instead of
  `move-beginning-of-line'.
2016-11-27 23:09:15 +01:00
Nicolas Goaziou 7fc980f75e Tiny docstring fix
* lisp/org.el (org-compile-file): Fix docstring.
2016-11-27 12:20:01 +01:00
Nicolas Goaziou 289363d510 Fix LaTeX preview
* lisp/org.el (org-compile-file): Introduce new %O placeholder.
(org-preview-latex-process-alist): Use it.

* lisp/ox-latex.el (org-latex-pdf-process):
* lisp/ox-man.el (org-man-pdf-process):
* lisp/ox-texinfo.el (org-texinfo-info-process): Document it.

Reported-by: Scott Otterson <scotto@sharpleaf.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/110464>
2016-11-27 12:07:11 +01:00
Nicolas Goaziou 69ec6258b6 org-agenda: Fix scheduled dates display
* lisp/org.el (org-time-string-to-absolute): Change signature.
* lisp/org-agenda.el (org-agenda-get-scheduled): Fix various glitches
  in scheduled dates display.  Also fix such dates when
  `org-agenda-repeating-timestamp-show-all' is nil.  Apply signature
  change.

Reported-by: Samuel Wales <samologist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/110116>
2016-11-25 01:51:42 +01:00
Paul Eggert ad5e2aed21 Backport commit dc152c5 from Emacs
Apple changed the spelling of its operating system again, to "macOS",
effective with macOS 10.12 Sierra (2016-09-20).  Change Emacs
documentation and comments to match this.  Stick with older OS
spellings ("OS X", "Mac OS X") when talking about older releases where
the older names are more correct.

Modernize usage of 'macOS' in doc and comments
dc152c54f4e44f5f2040883b03f71ff6aa66c893
Paul Eggert
Sun Nov 6 00:42:03 2016 -0700
2016-11-19 16:49:15 -05:00
Nicolas Goaziou 8a5e54f1cc Small fix to documentation
* doc/org.texi (Setting tags): Remove misleading information.
* lisp/org.el (org-tag-alist): Fix consistency with
  `org-tag-persistent-alist'.
2016-11-13 18:08:15 +01:00
Nicolas Goaziou cec084584d Fix docstring
* lisp/org.el (org-link-search-must-match-exact-headline): Fix
  docstring.  Add :safe keyword.
2016-11-13 11:37:53 +01:00
Nicolas Goaziou ebbc675bd9 Fix TODO keywords case sensitivity
* lisp/org.el (org-todo-regexp):
(org-not-done-regexp):
(org-not-done-heading-regexp):
(org-todo-line-regexp):
(org-complex-heading-regexp): Improve docstrings.

(org-insert-todo-heading):
(org-fix-position-after-promote):
(org-link-search):
(org-block-todo-from-children-or-siblings-or-parent):
(org-get-todo-state):
(org-priority):
(org-point-at-end-of-empty-headline):
* lisp/org-agenda.el (org-fix-agenda-info):
(org-agenda-get-todos):
(org-cmp-alpha):
* lisp/org-archive.el (org-archive-subtree):
(org-archive-all-done):
* lisp/org-list.el (org-toggle-item):
* lisp/org-pcomplete.el (pcomplete/org-mode/searchhead): Bind
`case-fold-search' to nil when matching aginst one of the regexp
above.

* testing/lisp/test-org.el (test-org/fuzzy-links): Add tests.
2016-11-13 11:26:17 +01:00
Nicolas Goaziou ff0748beac Small documentation fixes
* doc/org.texi (The very busy C-c C-c key):
* lisp/org.el (org-startup-folded): Documentation fixes.
2016-11-12 01:45:05 +01:00
Nicolas Goaziou 393f490386 Remove dependency on "gs" for preview LaTeX
* lisp/org.el (org-preview-latex-process-alist): Remove "gs"
  requirement.

Reported-by: Frederick Giasson <fred@fgiasson.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/110216>
2016-11-12 01:21:25 +01:00
Nicolas Goaziou 004bd64948 Fix docstring
* lisp/org.el (org-compile-file): Fix docstring.
2016-11-08 17:53:22 +01:00
Nicolas Goaziou 120f8c09f4 Fix file compilation in a different directory than current one
* lisp/org.el (org-compile-file): Do not set default directory.
(org-preview-latex-process-alist): Update since base-name may no be
located in current directory.
* lisp/ox-latex.el (org-latex-compile): Remove auxiliary files in
  default directory instead of ".tex" file directory.

Reported-by: Alex Fenton <alex.fenton@pressure.to>
<http://permalink.gmane.org/gmane.emacs.orgmode/110078>
2016-11-08 11:44:28 +01:00
Nicolas Goaziou 13dbea95af Fix documentation
* doc/org.texi (Installation):
(Feedback):
(Handling links):
(Setting tags):
(Matching tags and properties):
(Storing searches):
(The very busy C-c C-c key):
(org-crypt):
(Adding hyperlink types):
* lisp/org-agenda.el (org-agenda-todo-ignore-deadlines):
(org-agenda-show-inherited-tags):
(org-agenda-week-view):
(org-agenda-fortnight-view):
(org-agenda-month-view):
(org-agenda-year-view):
* lisp/org-archive.el (org-archive-to-archive-sibling):
* lisp/org-capture.el (org-capture-templates):
* lisp/org-table.el:
* lisp/org.el (org-startup-folded):
(org-tag-alist):
(org-match-sparse-tree): Provide more accurate documentation.

Reported-by: Jorge Morais Neto <jorge13515@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/110080>
2016-11-07 01:14:04 +01:00
Nicolas Goaziou 58dbdb25a1 Fix repeated tasks in certain languages
* lisp/org.el (org-timestamp-change): Handle `after' position.

`after' position needs to take into consideration changes in time-stamp
length.  Some time locales have variable lengths for abbreviated day
names throughout the week.

Reported-by: "Bruce V. Chiarelli" <mano155@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/109951>
2016-11-01 09:38:56 +01:00
Nicolas Goaziou 1d7150319b Fix docstrings
* lisp/org-clock.el (org-clock-get-table-data):
* lisp/org-element.el (org-element--cache-objects):
(org-element--cache-generate-key):
* lisp/org-footnote.el (org-footnote--collect-references):
* lisp/org-list.el (org-list-to-lisp):
* lisp/org-table.el (orgtbl-to-generic):
* lisp/org.el (org-file-apps):
(org-execute-file-search-functions):
(org-after-todo-statistics-hook):
(org-find-olp):
* lisp/ox-html.el (org-html-table-row-open-tag): Do not escape
  parenthesis in docstring when not at column 0.
2016-10-31 10:01:33 +01:00
Nicolas Goaziou a94493f5a2 Properly fontify short captions
* lisp/org.el (org-fontify-meta-lines-and-blocks-1): Properly fontify
  short captions.
2016-10-29 01:09:26 +02:00
Nicolas Goaziou 7bbe9202c2 Match `org-complex-heading-regexp' with a nil `case-fold-search'
* lisp/org-agenda.el (org-agenda-goto):
* lisp/org-clock.el (org-clock-in):
(org-clock-out):
(org-clock-put-overlay):
(org-clock-load):
* lisp/org-element.el (org-element-context):
* lisp/org-footnote.el (org-footnote--allow-reference-p):
* lisp/org-mobile.el:
* lisp/ox.el (org-export--get-subtree-options):
* lisp/org.el (org-insert-heading):
(org-edit-headline):
(org-open-at-point):
(org-refile-get-targets):
(org--get-outline-path-1):
(org-toggle-comment):
(org-set-tags-to):
(org-set-tags):
(org-entry-properties):
(org-delete-indentation):
(org-beginning-of-line):
(org-end-of-line):
(org-mode-flyspell-verify): Bind `case-fold-search' to nil when matching
`org-complex-heading-regexp'.

(org-complex-heading-regexp): Add a note about the necessity to have
`case-fold-search' bound to nil.
2016-10-29 00:38:15 +02:00
Nicolas Goaziou e8b4eeb482 Fix `org-return' on non-keyword
* lisp/org.el (org-return): Recognize non-keywords and split text
  accordingly.
* testing/lisp/test-org.el (test-org/return): Add test.

Reported-by: Samuel Wales <samologist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/109929>
2016-10-29 00:00:32 +02:00
Nicolas Goaziou fe4c6a8529 Fix S-TAB when called on a block
* lisp/org.el (org-cycle): Call `org-hide-block-toggle-maybe' after
  universal argument check.  Also remove the function from
  `org-tab-first-hook' to that effect.
2016-10-19 20:08:09 +02:00
Nicolas Goaziou 9aeee623fd Silence byte-compiler 2016-10-19 16:09:59 +02:00
Nicolas Goaziou 6ca5cc8efb Better integration between Babel and `C-c C-c'
* lisp/org.el (org-ctrl-c-ctrl-c): Handle Babel context without relying
  to user hooks.
* lisp/ob-core.el (org-babel-execute-maybe):
(org-babel-hash-at-point): Do not functions in `C-c C-c' hook.
2016-10-19 16:08:09 +02:00
Nicolas Goaziou 4ccd1dfff1 Small refactoring
* lisp/org.el (org-ctrl-c-ctrl-c): Small refactoring.
2016-10-19 15:48:42 +02:00
Nicolas Goaziou a7169be6b2 Remove unnecessary calls to `org-update-radio-target-regexp'
* lisp/org-ctags.el (org-ctags-append-topic): Remove call to
  `org-update-radio-target-regexp' since topic uses regular targets.
* lisp/org.el (org-ctrl-c-ctrl-c): Do not update radio targets when
  point is on a target.
2016-10-19 15:31:10 +02:00
Nicolas Goaziou e4d4c6e1bc Fix code typo
* lisp/org.el (org-beginning-of-line):
(org-end-of-line): Fix typo in pattern matching.

Reported-by: Matt Lundin <mdl@imapmail.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/109829>
2016-10-17 22:55:57 +02:00
Nicolas Goaziou 0cf58cc208 Improve docstrings
* lisp/ob-core.el (org-confirm-babel-evaluate):
(org-babel-no-eval-on-ctrl-c-ctrl-c):
(org-babel-hash-at-point):
* lisp/org-agenda.el (org-agenda-custom-commands):
(org-stuck-projects):
(org-agenda):
(org-timeline):
(org-todo-list):
(org-agenda-filter-by-tag):
(org-agenda-log-mode):
(org-agenda-refile):
(org-agenda-show-and-scroll-up):
(org-agenda-tree-to-indirect-buffer):
(org-agenda-show-the-flagging-note):
(org-agenda-to-appt):
* lisp/org-capture.el (org-capture-mode):
(org-capture-use-agenda-date):
(org-capture):
* lisp/org-clock.el (org-clock-in):
(org-clock-display):
* lisp/org-colview.el (org-columns--display-here):
(org-columns):
* lisp/org-footnote.el (org-footnote-section):
* lisp/org-gnus.el (org-gnus-prefer-web-links):
* lisp/org-lint.el (org-lint):
* lisp/org-list.el (org-plain-list-ordered-item-terminator):
(org-list-allow-alphabetical):
(org-list-automatic-rules):
(org-list-use-circular-motion):
* lisp/org-protocol.el (org-protocol-store-link):
(org-protocol-create-for-org):
* lisp/org-src.el (org-src-preserve-indentation):
(org-edit-src-content-indentation):
(org-src-mode-hook):
(org-src-mode):
(org-edit-table.el):
(org-edit-export-block):
(org-edit-src-code):
(org-edit-fixed-width-region):
* lisp/org-table.el (org-table-automatic-realign):
(org-table-copy-increment):
(org-table-formula-evaluate-inline):
(org-table-allow-automatic-line-recalculation):
(org-table-edit-field):
(orgtbl-ascii-plot):
* lisp/org-timer.el (org-timer):
* lisp/org.el (org-deadline-string):
(org-comment-string):
(org-ellipsis):
(org-show-context-detail):
(org-indirect-buffer-display):
(org-cycle-global-at-bob):
(org-insert-heading-respect-content):
(org-enable-table-editor):
(org-context-in-file-links):
(org-display-internal-link-with-indirect-buffer):
(org-file-apps):
(org-refile-targets):
(org-todo-keywords):
(org-use-fast-todo-selection):
(org-treat-insert-todo-heading-as-state-change):
(org-time-clocksum-use-fractional):
(org-time-clocksum-use-effort-durations):
(org-agenda-files):
(org-cycle-hide-archived-subtrees):
(org-cycle):
(org-global-cycle):
(org-tree-to-indirect-buffer):
(org-insert-heading):
(org-store-link):
(org-insert-link):
(org-mark-ring-push):
(org-refile):
(org-todo):
(org-show-todo-tree):
(org-reveal):
(org-check-deadlines):
(org-switchb):
(org-cdlatex-mode):
(org-toggle-latex-fragment):
(org-ctrl-c-ctrl-c):
(org-toggle-heading):
(org-indent-line):
(org-yank):
(org-speedbar-set-agenda-restriction):
* lisp/ox-html.el (org-html-htmlize-output-type):
* lisp/ox-icalendar.el (org-icalendar-combined-agenda-file):
* lisp/ox-publish.el (org-publish-project-alist):
* lisp/ox.el (org-export-in-background):
(org-export-stack-mode):
(org-export--stack-source-at-point):
(org-export-dispatch): Improve quotes and formatting in docstrings.
2016-10-15 17:43:54 +02:00