Commit Graph

9632 Commits

Author SHA1 Message Date
Bastien Guerry 6f64027fee org-agenda.el (org-agenda-custom-commands-local-options): Fix misquoted values
* org-agenda.el (org-agenda-custom-commands-local-options):
Fix misquoted values.

Thanks to Thomas Morgan for reporting this.
2014-06-02 19:59:36 +02:00
Bastien Guerry 89cb26ed17 org.el: Fix setting and deleting properties with a null value
* org.el (org-property-re): Also match null properties by
default.
(org-entry-delete): Also delete null properties.
(org-read-property-value): Allow the empty string as a new
value.
(org-delete-property): Throw a message when there is not
property to delete.

Thanks to Andrea Rossetti for reporting this.
2014-06-02 15:40:04 +02:00
Achim Gratz 8978ca05b2 Reverting "org-footnote: forward declare functions"
Revert "org-footnote: forward declare functions"

This reverts commit 814188ac7e.

Accidentally applied to the wrong branch.
2014-06-01 14:28:13 +02:00
Achim Gratz 814188ac7e org-footnote: forward declare functions
* lisp/org-footnote.el: Forward declare `org-element-context',
  `org-element-property' and `org-element-type'.

Introduced with 51e1131ff8.
2014-06-01 14:21:58 +02:00
Nicolas Goaziou 198fc8d483 org-list: Fix typo in docstring
* lisp/org-list.el (org-list-repair): Fix typo in docstring.
2014-06-01 14:20:12 +02:00
Bastien Guerry c53aeda585 org-agenda.el (org-agenda-insert-diary-make-new-entry): Fix docstring
* org-agenda.el (org-agenda-insert-diary-make-new-entry): Fix
docstring.

Thanks to Nikolai Weibull for reporting this.
2014-05-30 13:58:50 +02:00
Bastien Guerry 822dcfc881 org.el: Fix bug when setting properties with a null value
* org.el (org-re-property): New parameter `allow-null' to
match property with a null value.
(org-entry-put): Correctly update a property with a null
value.

Thanks to Andrea Rossetti for reporting this and suggesting a fix.
2014-05-30 08:46:39 +02:00
Bastien Guerry 34c2365081 ox-md.el (org-md-headline): Add anchors when exporting with a table of contents
* ox-md.el (org-md-headline): When exporting with a HTML table
of contents, add HTML anchors to Markdown headlines.

Thanks to Marko Dimjašević for reporting this.
2014-05-29 21:20:55 +02:00
Bastien Guerry d8034c3b19 org.el (org-insert-heading): Don't insert an item when called with two universal prefix arguments
* org.el (org-insert-heading): Don't insert an item when
called with two universal prefix arguments.
2014-05-29 19:48:47 +02:00
Bastien Guerry ee9053ee04 org-agenda.el (org-agenda-finalize): Remove duplicate check for 'org-hd-marker
* org-agenda.el (org-agenda-finalize): Remove duplicate check
for 'org-hd-marker.
2014-05-29 09:57:19 +02:00
Achim Gratz 3d973cdc6e org: add forward declarations
* lisp/org.el: Add forward declarations for a number of functions that
  the compiler otherwise warns about as potentially undefined at
  runtime.
2014-05-28 15:18:24 +02:00
Achim Gratz 790f5b4d3a ob-core, ob-exp, ob-haskell, ob-python: declarations for org-src-preserve-indentations
* lisp/ob-core.el: Add comment to forward declaration of
  'org-src-preserve-indentations'.
* lisp/ob-exp.el: Require org-src to import
  'org-src-preserve-indentations'.
* lisp/ob-haskell.el, lisp/ob-python.el: Remove superfluous forward
  declaration of 'org-src-preserve-indentations', since it gets
  imported by other requires.
2014-05-28 14:52:14 +02:00
Achim Gratz 61b8091596 ob-core:forward declare org-every
* lisp/ob-core.el (org-every): Forward declare 'org-every'.
2014-05-28 14:47:23 +02:00
Achim Gratz 310b9dd2b6 ob-C: lexical-let requires cl at compilation time
* lisp/ob-C.el: Require cl during compilation so that lexical-let is
  known.
2014-05-28 14:40:52 +02:00
Achim Gratz 3a736c51bc org-entities: forward declaration of org-toggle-pretty-entities and org-pretty-entities
* lisp/org-entities.el: Remove superfluous require of org-macs.
  Forward declare 'org-toggle-pretty-entities' and
  'org-pretty-entities'.
2014-05-28 14:16:21 +02:00
Achim Gratz 6c1b41bd68 org, ox: move defsubst before first use
* lisp/ox.el (org-export-get-parent): Move definition of
  'org-export-get-parent' before first use.  Leave comment at original
  place of definition.

* lisp/org.el (org-uniquify): Move definition of 'org-uniquify' before
  first use.  Leave comment at original place of definition.
2014-05-28 13:44:53 +02:00
Bastien Guerry cbce904187 org-agenda.el: Fix bug wrt `org-agenda-persistent-filter'
* org-agenda.el (org-agenda-prepare-window): New parameter
`filter-alist' to set the filters correctly when
`org-agenda-persistent-filter' is on.
(org-agenda-prepare): Use the new parameter for
`org-agenda-prepare-window'.

Thanks to Thomas Morgan for reporting this.
2014-05-26 15:29:02 +02:00
Bastien Guerry 54ab137689 Fix bug when update timestamps on filtered agenda entries
* org-compat.el (org-in-invisibility-spec-p): Tiny code
cleanup.
(org-move-to-column): Only remove '(org-filtered) from
`buffer-invisibility-spec'.

* org-agenda.el (org-agenda-mode): Add buffer invisibility
specs.
(org-agenda-filter-hide-line, org-agenda-remove-filter): Set
the 'invisible text property to 'org-filtered.
(org-agenda-show-new-time): Add the default face to avoid the
foreground of the last character on the line to leak into the
timestamp notification.

Thanks to Thomas Morgan for reporting this.
2014-05-26 14:55:50 +02:00
Bastien Guerry 061904b58e org-agenda.el (org-get-time-of-day): Don't return time string from within links
* org-agenda.el (org-get-time-of-day): Don't return time
string from within links.

Thanks to Thomas Morgan for reporting this.
2014-05-26 07:35:24 +02:00
Nicolas Goaziou e3d2c1b0c9 ox-ascii: Tiny fix
* lisp/ox-ascii.el (org-ascii--current-text-width): Tiny fix.
2014-05-24 15:44:08 +02:00
Bastien Guerry 7e5965372d org-timer.el (org-timer-value-string): Always return a positive value
* org-timer.el (org-timer-value-string): Always return a
positive value.  Add docstring.
2014-05-24 14:12:56 +02:00
Alex Kosorukoff 942a95cd59 org-capture.el (org-capture-fill-template): Set `mark-active' to nil
* org-capture.el (org-capture-fill-template): Set
`mark-active' to nil.

TINYCHANGE
2014-05-23 21:50:24 +02:00
Bastien Guerry 567241e986 Revert "org-capture.el (org-capture-steal-local-variables): Don't steal `mark-active'"
This reverts commit ee5a88cd01.
2014-05-23 21:49:19 +02:00
Bastien Guerry ee5a88cd01 org-capture.el (org-capture-steal-local-variables): Don't steal `mark-active'
* org-capture.el (org-capture-steal-local-variables): Don't
steal `mark-active', which should be nil in the target buffer.

Thanks to Alex Kosorukoff for raising this issue.
2014-05-23 14:01:39 +02:00
Bastien Guerry 1d57e1ac9a org-agenda.el (org-agenda-remove-filter): Use `save-excursion'
* org-agenda.el (org-agenda-remove-filter): Use `save-excursion'.
2014-05-23 13:43:11 +02:00
Bastien Guerry fe0057556b org.el: Don't advise `outline-end-of-subtree'
* org.el (org-move-subtree-down): Use `org-end-of-subtree'
instead of `outline-end-of-subtree'.
(outline-end-of-subtree): Remove advice.

* org-mouse.el (org-mouse-move-tree, org-mouse-do-remotely):
Use `org-end-of-subtree' instead of `outline-end-of-subtree'.
2014-05-23 13:11:57 +02:00
Nicolas Richard 54f4d2f4a4 org.el (org-cycle-internal-local): Fix trailing character bug
* org.el (org-cycle-internal-local): Don't show a trailing
character when cycling a subtree that ends with a non-newline
character at the end of the buffer or the narrowed region.
2014-05-23 13:04:28 +02:00
Bastien Guerry cece23b664 org-agenda.el (org-cmp-ts): Fix call to `type'
* org-agenda.el (org-cmp-ts): Argument `type' is not optional.
Don't quote it.
2014-05-22 21:15:01 +02:00
Bastien Guerry 7d3b3997d3 org-habit.el (org-habit-insert-consistency-graphs): Don't remove filter overlays
* org-habit.el (org-habit-insert-consistency-graphs): Don't
remove filter overlays as we don't use overlays for filters
anymore.
2014-05-22 14:34:46 +02:00
Bastien Guerry 3a262e12e2 org-agenda.el: Fixes for top headline filtering
* org-agenda.el (org-agenda-local-vars): Add
`org-agenda-top-headline-filter'.
(org-agenda-filter-by-category): Fix syntax.
(org-agenda-filter-show-all-top-filter): New function.
(org-agenda-filter-by-top-headline)
(org-agenda-filter-remove-all): Use the new function.
(org-agenda-filter-top-headline-apply): Use a dedicated symbol
`top-headline'.

Thanks to Greg Troxel who provided a preliminary patch.
2014-05-22 13:37:27 +02:00
Konstantin Kliakhandler 445a8ec66e org-agenda.el (org-agenda-redo): Reapply the filters correctly
* org-agenda.el (org-agenda-redo): Reapply the filters
correctly.

TINYCHANGE
2014-05-22 12:55:30 +02:00
Bastien Guerry 58e45f4df1 org.el (org-entry-properties): Ensure the special property is not commented out when matched
* org.el (org-entry-properties): Ensure the special property
is not commented out when matched.

Other an agenda view like (tags "DEADLINE<\"<+0d>\"" ...) will
wrongly list an entry with a commented out DEADLINE line, because
org-agenda-skip only skip commented out stuff on the current line,
with is the headline itself when using "tags" agenda.

Thanks to Sébastien for reporting this.
2014-05-22 12:38:06 +02:00
Bastien Guerry cdf9a09fc2 org-agenda.el: Rewrite agenda filtering using text properties
* org-agenda.el (org-agenda-write): Code cleanup.
(org-agenda-mark-filtered-text)
(org-agenda-unmark-filtered-text)
(org-agenda-fix-tags-filter-overlays-at): Delete.
(org-agenda-remove-marked-text): Use the `property' argument
instead of hard-coding 'org-filtered.
(org-agenda-filter-remove-all): Use `org-agenda-finalize'.
(org-agenda-filter-hide-line): Rewrite using text properties
instead of overlays.
(org-agenda-remove-filter): New function.
(org-agenda-filter-show-all-tag)
(org-agenda-filter-show-all-cat)
(org-agenda-filter-show-all-re): Rewrite using
`org-agenda-remove-filter'.
2014-05-22 11:50:26 +02:00
Nicolas Goaziou bc456879ff ox-org: Tiny refactoring
* lisp/ox-org.el (org-org-section): Tiny refactoring.  Use appropriate
  property.
2014-05-21 21:29:16 +02:00
Bastien Guerry 241286865c org-attach.el (org-attach-dir): Fix bug
* org-attach.el (org-attach-dir): When the property is
"inherited" from a variable outside of the file, do not use
`org-entry-property-inherited-from' to find the attachment
position, assume we need to go back to the current headline.
2014-05-21 19:47:13 +02:00
Nicolas Goaziou 844a6494c3 ox-org: Fix missing footnote definitions
* lisp/ox-org.el (org-org-headline): Ignore footnote sections.
(org-org-section): New function.

Some footnote definitions may be outside of the scope of the export
and, therefore, do not appear in the generated output.  This patch
ensures that all footnote definitions appear at the end of the section
they belong to.

Thanks to Leonard Randall for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/86558
2014-05-21 18:37:13 +02:00
Ian Kelling 7d6cc7f0bf Fix error prone babel table output format detection
* ob-core.el (org-babel-insert-result): Test all list elements against
listp and (eq element 'hline) instead of checking just the first.

org-babel table output uses different formatting for a list of lists,
but detects it incorrectly causing an error. An example of a block
causing an error is an emacs lisp source block containing just 1 line:
'((1) 2)
2014-05-21 15:04:23 +02:00
Bastien Guerry da5128404a ob-R.el (org-babel-R-assign-elisp): Fix parsing of a one-dimensional value
* ob-R.el (org-babel-R-assign-elisp): Fix parsing of a
one-dimensional value.

Thanks to Daniil Mirylenka for the fix.
2014-05-21 04:21:00 +02:00
Bastien Guerry d438fbfb1b Continue fixing fdb4b54e 2014-05-21 03:56:26 +02:00
Bastien Guerry 03acfe44b6 org.el (org-insert-heading): Fix bug
* org.el (org-insert-heading): Fix bug when trying to insert a
heading when point is before the first headline and not at the
beginning of a line.
2014-05-20 23:28:06 +02:00
Dmitry Gorbik 1811b37f4d org.el (org-fast-tag-selection): Fix window splitting
* org.el (org-fast-tag-selection): Fix window splitting.

This is basically the same fix than the one listed here:
http://article.gmane.org/gmane.emacs.orgmode/34802

TINYCHANGE
2014-05-20 22:20:56 +02:00
Bastien Guerry b06dcf05a8 org-table.el (org-table-eval-formula): Fix conversion of inactive timestamps
* org-table.el (org-table-eval-formula): Fix conversion of
inactive timestamps to active ones.

Thanks to Gang Chen for reporting this.
2014-05-20 22:03:30 +02:00
Bastien Guerry 6fab5bf04b * org.el (org-set-regexps-and-options): Fix
* org.el (org-set-regexps-and-options): Allow
`org-complex-heading-regexp-format' to match [/] and [%]
cookies when they are both before and after the heading.

Thanks to Nicolas Bercher for reporting this.
2014-05-20 18:00:05 +02:00
Nicolas Goaziou 5b43ea1cd7 ox-beamer: Fix environment selection wrt persistent tags
* lisp/ox-beamer.el (org-beamer-select-environment): Ignore persistent
  tags when displaying environments.

Thanks to Anders Johansson for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/86441
2014-05-19 13:37:16 +02:00
Nicolas Goaziou b11b4a5c1a ox-ascii: Fix indentation in the first paragraph of a section
* lisp/ox-ascii.el (org-ascii-indented-line-width): Update docstring.
(org-ascii-paragraph): Do not apply indentation to the very first line
of a section.
2014-05-17 10:00:41 +02:00
Nicolas Goaziou 9a60b93d93 ox-latex: Fix export of inlinetasks with empty contents
* lisp/ox-latex.el (org-latex-inlinetask): Skip body if contents are
  empty.

Thanks to Michael Weylandt for reporting it and providing
a preliminary patch.
http://permalink.gmane.org/gmane.emacs.orgmode/86384
2014-05-16 10:33:20 +02:00
Nicolas Goaziou ab1ce2a757 ox-html: Fix spurious "figure" divs on empty paragraphs
* lisp/ox-html.el (org-html-standalone-image-p): Ensure paragraph
  contains at least a link before return a non-nil value.  Clarify
  docstring.

Thanks to Fabrice Popineau for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/86314
2014-05-15 13:44:18 +02:00
Nicolas Goaziou e242bc5180 ox: Fix Wrong type argument error with empty footnotes
* lisp/ox.el (org-export-data): Always return a string, as specified
  by the docstring.

Thanks to kuanyui for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/86183
2014-05-12 22:18:00 +02:00
Nick Dokos 6914619f57 Make superscripts produce a ^ in the output, instead of _
* ox-ascii.el (org-ascii-superscript): Change _ to ^ in the output.

Reported by Suvayu Ali: http://thread.gmane.org/gmane.emacs.orgmode/86014
2014-05-09 07:52:45 -04:00
Eric Schulte ef6f2465bd ob-screen, use unpredictable temp file name
* lisp/ob-screen.el (org-babel-screen-test): Use unpredictable name
  for temporary file.
2014-05-08 12:19:30 -06:00