Commit Graph

19174 Commits

Author SHA1 Message Date
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 8dbee91858 org-agenda: Fix effort sorting
* lisp/org-agenda.el (org-cmp-effort): Find effort in the appropriate
  location.

The bug was introduced in d978a9e585.

Reported-by: Luke <mideniko1234-org@yahoo.co.uk>
<http://permalink.gmane.org/gmane.emacs.orgmode/109811>
2016-10-16 21:02:35 +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
Nicolas Goaziou 21c6148bbe Handle comments in source blocks with `comment-line'
* lisp/org.el (org-comment-or-uncomment-region): Caller is not
  necessarily `comment-dwim'.  Also handle `comment-line'.

Reported-by: Xebar Saram <zeltakc@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/109809>
2016-10-15 12:31:25 +02:00
Nicolas Goaziou 8d2f0a4411 Fix `C-a' with visual lines and arguments
* lisp/org.el (org-beginning-of-line): Move to beginning of visual line
  when appropriate.  Fix docstring.

* testing/lisp/test-org.el (test-org/beginning-of-line): Add tests.
2016-10-15 12:00:43 +02:00
Nicolas Goaziou 5c85409464 Remove unnecessary workaround
* lisp/org.el (org-end-of-line): Remove unnecessary workaround for bug
  #14346.
2016-10-15 11:36:10 +02:00
Nicolas Goaziou 45048eb783 Fix `C-e' with visible lines and arguments
* lisp/org.el (org-end-of-line): Correctly go to the end of visible
  line, when appropriate.
* testing/lisp/test-org.el (test-org/end-of-line): Add tests.
2016-10-15 11:36:09 +02:00
Nicolas Goaziou 2971c48cf1 Remove unnecessary workaround
* lisp/org.el (org-beginning-of-line): Remove unnecessary workaround for
  bug #14346.

* testing/lisp/test-org.el (test-org/beginning-of-line): Update tests.
2016-10-15 11:26:10 +02:00
Nicolas Goaziou b9b14376f8 Tiny refactoring
* lisp/org.el (org-beginning-of-line): Tiny refactoring.  Remove useless
  comment.  Fix docstring.
2016-10-15 00:51:33 +02:00
Nicolas Goaziou 756bb87d81 Fix regression in `org-beginning-of-line'
* lisp/org.el (org-beginning-of-line): Leave point before any invisible
  character at column 0.  Small refactoring.
* testing/lisp/test-org.el (test-org/beginning-of-line): Add tests.

The regression was introduced in
3baf246f4f.
2016-10-13 09:41:54 +02:00
Nicolas Goaziou d3e338dc0a org.texi: Add missing blank line
* doc/org.texi (Using the property API): Add missing blank line.
2016-10-11 21:00:58 +02:00
Nicolas Goaziou 0c0bc84190 Change "Org-mode" into "Org mode"
* lisp/org-agenda.el:
* lisp/org-attach.el:
* lisp/org-bbdb.el:
* lisp/org-capture.el:
* lisp/org-clock.el:
* lisp/org-entities.el:
* lisp/org-gnus.el:
* lisp/org-habit.el:
* lisp/org-id.el:
* lisp/org-info.el:
* lisp/org-inlinetask.el:
* lisp/org-irc.el:
* lisp/org-list.el:
* lisp/org-mhe.el:
* lisp/org-mouse.el:
* lisp/org-table.el:
* lisp/ox-html.el:
* lisp/ox-odt.el: Use "Org mode", or "Org", instead of "Org-mode".
2016-10-11 18:00:08 +02:00
Nicolas Goaziou e00dfe0ee3 Fix typo in docstring
* lisp/org.el (org-link-search): Fix typo.
2016-10-10 00:44:36 +02:00
Nicolas Goaziou 191fe8209f Make use of `org-ellipsis' face
* lisp/org.el (org-ellipsis): Do not allow to specify a face since
  `org-ellipsis' face can be modified instead.
(org-mode): Use `org-ellipsis', independently on the value of
`org-ellipsis' (the string).

Reported-by: Vasilij Schneidermann <v.schneidermann@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/109543>
2016-10-09 21:41:25 +02:00
Nicolas Goaziou e7969f29d7 ORG-NEWS: Document new parsed link :format property 2016-10-09 10:33:46 +02:00
Nicolas Goaziou 75eebb3715 org-element: Small refactoring
* lisp/org-element.el (org-element-link-parser): Remove useless cond
  branch. "id" links are handled by the previous branch, i.e., "explicit
  types".
2016-10-09 09:53:45 +02:00
Nicolas Goaziou 05794b13b3 org-element: Add :format property to link objects
* lisp/org-element.el (org-element-link-parser): Add :format property.
  Tiny refactoring.

* testing/lisp/test-org-element.el (test-org-element/link-interpreter):
  Add one test.  Update some others.

Since the link format is lost during parsing, the interpreter can hardly
handle nested links.  Indeed, in that case, the inner link is
interpreted as a bracket link, thus breaking the outer link.

Another option could be to guess a safe format for the link to be
interpreted. E.g.,

- any inner link could default to angle format unless it contains ">",
  it which case it would become a plain link;

- other links would have the bracket format, unless they contain "][" or
  "]]".

In any case, defining :format is less error prone and is similar to what
entities and sub/super-scripts have for curly brackets.

Reported-by: Thibault Marin <thibault.marin@gmx.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/109623>
2016-10-09 09:34:26 +02:00
Nicolas Goaziou 2113cbf296 org-element: Tiny refactoring
* lisp/org-element.el (org-element-interpret-data): Elements and objects
  are compared with `eq' instead of `equal'.  Also remove useless symbol
  prefix since move to lexical binding.
2016-10-08 00:47:43 +02:00
Nicolas Goaziou 2116162fe6 ob-core: Prevent spurious blanks lines when executing code
* lisp/ob-core.el (org-babel--insert-results-keyword):
(org-babel-where-is-src-block-result): Control better the number of
empty lines around results of a source block evaluation.

* testing/lisp/test-ob.el (test-ob/blocks-with-spaces): Add tests.
(test-ob/specific-colnames): Fix test.
2016-10-07 23:56:37 +02:00
Nicolas Goaziou 91e26352c5 org-lint: Improve report
* lisp/org-lint.el (org-lint-extraneous-element-in-footnote-section):
  More accurate report for extraneous elements in footnotes section.
2016-10-06 00:23:02 +02:00
Nicolas Goaziou 64ea67c38f Revert "org-lint: Tolerate drawers in footnotes section"
This reverts commit f0b3fa5e6e.
2016-10-06 00:22:38 +02:00
Nicolas Goaziou f0b3fa5e6e org-lint: Tolerate drawers in footnotes section
* lisp/org-lint.el (org-lint-extraneous-element-in-footnote-section):
  Tolerate drawers (e.g., logbook) as extraneous elements in a footnote
  section.
2016-10-06 00:18:50 +02:00
Nicolas Goaziou b42b3aaafc org-archive: Fix archive to datetree
* lisp/org-archive.el (org-archive-subtree): Fix archiving an entry in
  a date tree before an existing entry in the same month.

Reported-by: Klarre N <klarre@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/109614>
2016-10-05 23:57:08 +02:00
Nicolas Goaziou 966e0bff56 Change `org-align-tags-here' into `org--align-tags-here'
* lisp/org.el (org-align-tags-here): Renamed to...
(org--align-tags-here): ... this.

This change emphasizes the fact that, as an internal function, it
shouldn't be used without special care.  This also prevents confusing
between this function and `org-set-tags' called with a non-nil ALIGN
argument.
2016-10-05 11:54:49 +02:00
Nicolas Goaziou d907041911 Change :version in defcustoms from "25.1" to "25.2"
* lisp/ob-exp.el (org-babel-exp-inline-code-template):
* lisp/ob-lisp.el (org-babel-lisp-eval-fn):
* lisp/org-agenda.el (org-agenda-view-columns-initially):
* lisp/org-attach.el (org-attach-commit):
(org-attach-archive-delete):
(org-attach-annex-auto-get):
* lisp/org-bibtex.el (org-bibtex-inherit-tags):
* lisp/org-clock.el (org-clock-into-drawer):
* lisp/org-colview.el (org-columns-summary-types):
* lisp/org-table.el (org-table-copy-increment):
(org-table-formula-create-columns):
(org-table-convert-region-max-lines):
* lisp/org-timer.el (org-timer-default-timer):
* lisp/org.el (org-export-backends):
(org-cycle-hook):
(org-occur-case-fold-search):
(org-preview-latex-image-directory):
(org-latex-default-packages-alist):
(org-sparse-tree-default-date-type):
(org-structure-template-alist):
(org-effort-durations):
(org-agenda-ignore-properties): Change :version from "25.1" to "25.2".
(customize-package-emacs-version-alist): Fix associations between Org
and Emacs releases.
* lisp/ox-ascii.el (org-ascii-list-margin):
* lisp/ox-beamer.el (org-beamer-subtitle-format):
* lisp/ox-html.el (org-html-format-headline-function):
(org-html-format-inlinetask-function):
(org-html-viewport):
* lisp/ox-latex.el (org-latex-caption-above):
(org-latex-prefer-user-labels):
(org-latex-subtitle-format):
(org-latex-hyperref-template):
(org-latex-images-centered):
(org-latex-text-markup-alist):
(org-latex-format-inlinetask-function):
(org-latex-custom-lang-environments):
(org-latex-compiler-file-string):
(org-latex-compiler):
(org-latex-bib-compiler):
(org-latex-logfiles-extensions):
(org-latex-known-warnings):
* lisp/ox-md.el (org-md-footnotes-section):
(org-md-footnote-format):
* lisp/ox-odt.el (org-odt-format-headline-function):
(org-odt-format-inlinetask-function):
(org-odt-inline-image-rules):
* lisp/ox-texinfo.el (org-texinfo-format-headline-function):
* lisp/ox.el (org-export-with-creator):
(org-export-with-title):
(org-export-with-broken-links):
(org-export-copy-to-kill-ring): Change :version from "25.1" to "25.2".

Neither Org 8.3 nor Org 9.0 were released with Emacs 25.1.
2016-10-05 11:18:39 +02:00
Nicolas Goaziou 30fc890acd Change "Org-mode" into "Org mode"
* lisp/org.el (org-version):
(org-mode-hook):
(org-modules):
(org-support-shift-select):
(org-startup):
(org-replace-disputed-keys):
(org-disputed-keys):
(org-keywords):
(org-cycle):
(org-edit-structure):
(org-sparse-trees):
(org-imenu-and-speedbar):
(org-table):
(org-enable-table-editor):
(org-link):
(org-link-store):
(org-link-follow):
(org-refile):
(org-todo):
(org-progress):
(org-priorities):
(org-time):
(org-tags):
(org-properties):
(org-agenda):
(org-latex):
(org-archive):
(org-fontify-like-in-org-mode):
(orgstruct-mode):
(org-run-like-in-org-mode):
(org-open-link-from-string):
(org-mark-ring):
(org-cdlatex-mode):
(org-shiftselect-error):
(org-submit-bug-report):
(org-create-customize-menu):
(org-speedbar-set-agenda-restriction): Change "Org-mode" into "Org
mode".
2016-10-05 10:10:54 +02:00
Nicolas Goaziou 12f883cd02 Consistently align tags under Org Indent mode
* lisp/org.el (org-set-tags): Refactor alignment part using
  `org-align-tags-here'.
(org-fix-tags-on-the-fly):
(org-delete-indentation):
(org-return): Use `org-set-tags' instead of low-level
`org-align-tags-here' so as to handle virtual indentation.
2016-10-05 10:05:08 +02:00
Marco Wahl 73efd7cac5 Merge branch 'maint' 2016-10-04 18:17:51 +02:00
Marco Wahl 4d7d52ecd1 org-agenda: Fix a docstring
* lisp/org-agenda.el(org-agenda-entry-text-maxlines): Docstring fix.
2016-10-04 18:13:57 +02:00
Nicolas Goaziou 1a4ace507e ORG-NEWS: Fix typo 2016-10-04 17:43:46 +02:00
Nicolas Goaziou 7b42b4a62e Fix `org-ctrl-c-ctrl-c'
* lisp/org.el (org-ctrl-c-ctrl-c): Correctly set tags when called on an
  unsupported object type (e.g., a code snippet) in a headline or
  inlinetask.
2016-10-04 17:32:24 +02:00
Konubinix 8d672a2f7d org-expiry: Call `org-expiry-expired-p' correctly
* contrib/lisp/org-expiry.el (org-expiry-process-entry): Call
  `org-expiry-expired-p' with the correct number of arguments.  It does
  not accept argument anymore.
2016-10-04 12:04:02 +02:00
Nicolas Goaziou 50f2061418 Improve docstring
* lisp/org.el (org-insert-heading): Document limitation on where
  a headline can be split.

Reported-by: Jorge <jorge13515@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/109510>
2016-10-04 12:01:41 +02:00
Nicolas Goaziou d4c63febc9 Fix typo in docstring
* lisp/org.el (org-insert-heading): Fix typo.
2016-10-04 11:38:33 +02:00
Nicolas Goaziou e992a2846b Add more tests for `org-insert-heading'
* testing/lisp/test-org.el (test-org/insert-heading): Add tests.
2016-10-04 11:35:57 +02:00
Nicolas Goaziou 2b03e945a1 Fix consistency with `org-insert-heading' called with an argument
* lisp/org.el (org-insert-heading): Consistently add a new heading at
  the end of the subtree when called with an universal argument, even if
  point is at beginning of line.

Reported-by: Jorge <jorge13515@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/109510>
2016-10-04 11:33:10 +02:00
Marco Wahl 17e73cf949 Merge branch 'maint' 2016-10-02 19:08:45 +02:00
Marco Wahl 194e51e102 doc/orgcard.tex: Fix compile-command 2016-10-02 19:07:26 +02:00
Nicolas Goaziou 45c775a4d2 ox-latex: Set default figure position to htbp
* lisp/ox-latex.el (org-latex-default-figure-position): Change default
  value.  Add missing keywords.

Reported-by: Jean Louis <guix@rcdrun.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/109468>
2016-10-02 09:54:17 +02:00
Nicolas Goaziou eda8ac493f Fix inconsistencies in `org-occur' binding
* doc/org.texi (Sparse trees): Add C-c / / binding for `org-occur'.
* lisp/org.el (org-sparse-tree): Mention "r" suffix for consistency with
  other entries in the help menu.
2016-10-02 00:30:14 +02:00
Nicolas Goaziou 7075704b09 org.texi: Fix documentation about C-RET and M-RET
* doc/org.texi (Structure editing): Fix documentation, which is no
  longer in sync with the current behavior of the commands.
2016-10-02 00:19:51 +02:00
Nicolas Goaziou 005b3c07bb Fix a docstring
* lisp/org.el (org-insert-heading): Fix docstring.
2016-10-01 23:59:34 +02:00
Nicolas Goaziou 29830f7214 ob-core: Make `org-babel-hash-show-time' a defcustom
* lisp/ob-core.el (org-babel-hash-show-time): Change into a defcustom.
2016-10-01 10:35:14 +02:00
Nicolas Goaziou 9d7d650cd7 ob-core: Fix hash with time stamp
* lisp/ob-core.el (org-babel-result-regexp): Fix regexp.
(org-babel--insert-results-keyword): Simplify format-string.
(org-babel--clear-results-maybe): Fix return value.

* testing/lisp/test-ob.el (test-ob/where-is-src-block-result): Add
  tests.

Reported-by: Thomas Alexander Gerds <tag@biostat.ku.dk>
<http://permalink.gmane.org/gmane.emacs.orgmode/109418>
2016-10-01 10:30:53 +02:00
Bastien c0fb62dc68 Merge branch 'maint' 2016-09-30 10:00:57 +02:00
Bastien cd5e2d94d8 Fix link (un)escaping.
Thanks for David Bremner <bremner@debian.org> for reporting this
and proposing this fix.
2016-09-30 10:00:18 +02:00
Nicolas Goaziou b3c556d83a Fix tags alignment when headline contains invisible text
* lisp/org.el (org-align-tags-here): Do not use `org-move-to-column',
  which may move point on the other side of some invisible text.
  Refactor code.

* testing/lisp/test-org.el (test-org/tag-align): Add test.

Reported-by: Michael Fiano <michael.fiano@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/109435>
2016-09-30 00:58:21 +02:00
Nicolas Goaziou 12196b8472 Fix documentation
* doc/org.texi (Conventions): Remove unhelpful and wrong footnote.
(Initial visibility): Remove spurious paragraph.
(Global and local cycling):
(Motion): Fix function name.
(Plain lists): Reverse prefix argument action.
(Column width and alignment):
(Column groups):
(Tag inheritance):
(Tag hierarchy):
(The date/time prompt): Fix typo
(Link abbreviations):
(Tag searches):
(Timers): Fix wording.
(Checkboxes): Improve accuracy of footnote.  Correctly describe the
behaviour of `org-toggle-checkbox' on a headline.
(Filtering/limiting agenda items): More accurate description for `+' and
`-'.  Also remove unused `\' key.
(Agenda commands): Fix behaviour description.

* lisp/org-agenda.el (org-agenda-filter-by-tag): Fix docstring
  appearance.
(org-agenda-show-and-scroll-up): Fix wording.

* lisp/org-id.el (org-id-link-to-org-use-id): Fix function name.
(org-id-update-id-locations): Remove reference to unused argument.

* lisp/org.el (org-insert-heading): Improve docstring.
(org-insert-todo-heading): Describe behavior on a plain list item.
(org-update-statistics-cookies): Describe behavior when called with
a prefix argument.
(org-metaright): Fix typo.
(org-kill-note-or-show-branches): Fix function name.
(org-yank): Fix wording.

Reported-by: Jorge <jorge13515@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/109428>
2016-09-29 22:22:56 +02:00
Nicolas Goaziou 2b22d503e1 org-table: Fix inserting a new row
* lisp/org-table.el (org-table-insert-row): Fix inserting a new row when
  the buffer doesn't end with a newline character.  Tiny refactoring.

* testing/lisp/test-org-table.el (test-org-table/next-field): New test.
2016-09-28 23:33:32 +02:00
Marco Wahl ece6e39dfc ob-tangle: Fix jump from tangle to org
* lisp/ob-tangle.el (org-babel-tangle-jump-to-org): Fix the jump from a
  tangled part to the respective org in the case when an org-id defines
  the linking.

  The recent (buggy) behavior was to find the file which has the org-id as
  filename.
2016-09-28 14:07:56 +02:00