Commit Graph

8773 Commits

Author SHA1 Message Date
Bastien Guerry 0e4a4c452e org.el: Delete trailing whitespaces 2013-04-24 16:22:13 +02:00
Viktor Rosenfeld 19e1022e26 org.el: Filter agenda by persistent tags
* org.el (org-agenda-prepare-buffers): Add tags defined in
org-tag-persistent-alist to org-tag-alist-for-agenda.

This makes tag hotkeys defined in `org-tag-persistent-alist' appear when
the user invokes `org-agenda-filter-by-tag-refine'.

TINYCHANGE
2013-04-24 16:21:30 +02:00
Bastien Guerry 778c812535 org.el (org-agenda-prepare-buffers): Avoid duplicates in `org-tag-alist-for-agenda' correctly
* org.el (org-agenda-prepare-buffers): Avoid duplicates in
`org-tag-alist-for-agenda' correctly.

Thanks to Viktor Rosenfeld for debugging this.
2013-04-24 15:43:33 +02:00
Bastien Guerry 253b65c091 org.el (org-read-date-minibuffer-local-map): Check if we are at the beginning of the prompt, not if we are after a whitespace
* org.el (org-read-date-minibuffer-local-map): Check if we are
at the beginning of the prompt, not if we are after a whitespace.
Bind C-. to `calendar-goto-today'.
2013-04-24 11:36:22 +02:00
Bastien Guerry 3dd3100794 org-clock.el (org-clock-in): Don't forward by one character when setting the marker in the clock history
* org-clock.el (org-clock-in): Don't forward by one character
when setting the marker in the clock history.

This was done to prevent the marker from being broken when a user
manually insert some text right one it.  I cannot reproduce this
manual marker modification problem, so let's remove this ugly
exception, as it is not consistent with other clock markers.

Thanks to Bernt Hansen for pointing this out.
2013-04-24 10:47:16 +02:00
Bastien Guerry 240d645dbb org.el (org-read-date-minibuffer-local-map): Call `calendar-goto-today' only if there is a space before point in the minibuffer prompt
* org.el (org-read-date-minibuffer-local-map): Call
`calendar-goto-today' only if there is a space before point in
the minibuffer prompt.

Thanks to Michael Brand and others who asked for this regression to be fixed.
2013-04-24 10:05:36 +02:00
Bastien Guerry 0e438a9621 Merge branch 'maint' of orgmode.org:org-mode into maint 2013-04-24 09:55:27 +02:00
Bastien Guerry 862b91e8db org.el (org-insert-heading): Fix bug about wrong conversion of lines with :END: or #+end_ into headlines
* org.el (org-insert-heading): Reveal context when called
interactively.  Fix bug about wrong conversion of lines with
:END: or #+end_ into headlines.
(org-in-drawer-p): New function.
(org-meta-return): Use `org-catch-invisible-edits' and the
`org-in-drawer-p' to check whether we are within a drawer.

Thanks to Muchenxuan Tong and John Hendy who reported these errors.
2013-04-24 09:55:15 +02:00
Nicolas Goaziou bb30de44fd ox-html: Always use provided description in internal links
* lisp/ox-html.el (org-html-link): Don't skip the link description
  when it matches the name of the headline it targets.
2013-04-24 09:54:34 +02:00
Bastien Guerry e6776ce711 org-list.el (org-sort-list): Fix infloop
* org-list.el (org-sort-list): Fix infloop.

Thanks to Samuel Wales for reporting this.
2013-04-22 00:24:39 +02:00
Nicolas Goaziou 37f94d235d ox-ascii: Minor fixes
* lisp/ox-ascii.el (ascii): Remove inexistant function.
2013-04-21 23:51:54 +02:00
Nicolas Goaziou 648e2a1b95 ox-icalendar: Ignore footnotes
* lisp/ox-icalendar.el (icalendar): Ignore footnotes.
2013-04-21 23:44:18 +02:00
Nicolas Goaziou 7528c726dd ox-icalendar: Small refactoring
* lisp/ox-icalendar.el (org-icalendar--combine-files): Small refactoring.
2013-04-21 23:44:18 +02:00
Nicolas Goaziou d408d721c3 ox: Fix `org-export-with-footnotes' behaviour
* lisp/ox.el (org-export--skip-p, org-export--interpret-p): When
  `org-export-with-footnotes' is nil, ignore completely footnotes
  references and definitions instead of exporting them verbatim.
* testing/lisp/test-ox.el: Add tests.
2013-04-21 23:44:18 +02:00
Bastien Guerry 8a5ac12268 org.el: New maintainer
* doc/orgguide.texi:
* doc/org.texi:
* org.el: New maintainer.
2013-04-21 16:58:01 +02:00
Richard Lawrence 1b0c4cf0f8 org-agenda.el (org-cmp-ts): Avoid error when trying to string-match against nil
* org-agenda.el (org-cmp-ts): Avoid error when trying to
string-match against nil.

TINYCHANGE
2013-04-20 08:58:29 +02:00
Bastien Guerry 2a192ff6c1 org.el (org-clone-subtree-with-time-shift): Update behavior
* org.el (org-clone-subtree-with-time-shift): Unconditionally
ask for a time shift if there is a time-stamp.  Don't ask for
a time shift when called with a universal prefix argument.

Thanks to Ingmar Meissner for raising this issue again.
2013-04-20 08:51:37 +02:00
Nicolas Goaziou bc8d34541b ox-beamer: Do not ignore uppercase environements
* lisp/ox-beamer.el (org-beamer--frame-level): Small refactoring.
(org-beamer--format-block, org-beamer-headline): Do not systematically
downcase environment names as some require upper case in their
names (e.g. noteNH and CJK).

Thanks to James Harkins for reporting the bug.
2013-04-20 08:32:10 +02:00
Bastien Guerry 3d994a602c ob-core.el (org-babel-insert-result): Fix bug when inserting results as a list: ensure we split a string containing "\n"
* ob-core.el (org-babel-insert-result): Fix bug when inserting
results as a list: ensure we split a string containing "\n".

Thanks to Sébastien Vauban for reporting this.
2013-04-19 19:44:40 +02:00
Bastien Guerry 5ef07dc54a ox-html.el: Fix copyright header
* ox-html.el: Fix copyright header.
2013-04-18 19:32:07 +02:00
Bastien Guerry 1e3cb91ccb org.el (org-store-link): Don't add a search string when storing a link from a radio target
* org.el (org-store-link): Don't add a search string when
storing a link from a radio target.
(org-open-at-point): Jump to the radio link (<<<radio>>>), not
to the simple target (<<target>>).
2013-04-18 17:27:17 +02:00
Nicolas Goaziou 60aa1682ce ox: Change scope for `org-export-with-timestamps'
* lisp/ox.el (org-export-with-timestamps): Only applies to isolated
  timestamps, i.e. timestamps in a paragraph containing only
  timestamps and empty strings.
(org-export--skip-p): Skip timestamps according to new behaviour.
* testing/lisp/test-ox.el: Update tests.
2013-04-18 16:58:56 +02:00
Bastien Guerry 2c46ecee4f org-table.el (org-table-get-remote-range): Fix typo
* org-table.el (org-table-get-remote-range): Fix typo.
2013-04-18 15:42:31 +02:00
Bastien Guerry 87e1e9406e Makefile (clean-install): Also remove ox*.el* files
* Makefile (clean-install): Also remove ox*.el* files.
2013-04-18 14:43:45 +02:00
Bastien Guerry 03920a01fa Merge branch 'master-apply-aaron-patch2'
Conflicts:
	lisp/ob-core.el
2013-04-18 12:28:03 +02:00
Aaron Ecay bf29482973 Clean up various org-babel-*-maybe commands
* lisp/ob-core.el (org-babel-when-in-src-block): New macro.
  (org-babel-execute-src-block-maybe)
  (org-babel-expand-src-block-maybe)
  (org-babel-load-in-session-maybe, org-babel-pop-to-session-maybe):
  Use it.

org-babel-get-src-block-info is a potentially expensive operation, which
is why its ‘light’ argument exists.  But in any case, it is overkill to
query the whole info, if all that is needed is whether point is in a
block or not.  Factor the simplified common code out into a macro.
2013-04-18 12:26:23 +02:00
Bastien Guerry ccdfa8ddf8 org-datetree.el: Be more restrictive when finding a year datetree
* org-datetree.el (org-datetree-find-month-create)
(org-datetree-find-day-create): Add a docstring.
(org-datetree-find-year-create): Only match headlines with a
year or a year and one or more tags.

Thanks to Suvayu Ali for reporting this.
2013-04-18 12:20:08 +02:00
Aaron Ecay 4d763f35f5 Fix bug in org-babel-execute-src-block
* lisp/ob-core.el (org-babel-execute-src-block): Use `copy-tree'
to prevent setf from modifying users variables withing let-bound
`info' variable.

Otherwise, the setf calls in this function can reach into and change
other configuration variables, such as the library of babel.
2013-04-18 10:48:57 +02:00
Aaron Ecay 25869e5670 Add 'inline-only option to org-export-babel-evaluate
* lisp/ob-exp.el (org-export-babel-evaluate): Add a 'inline-only option.
  (org-babel-exp-results): Implement 'inline-only for
  `org-export-babel-evaluate'.
* doc/org.texi (Exporting code blocks): Document the 'inline-only setting
  for `org-export-babel-evaluate'.

This is useful because there is no way for inline results to be stored.
The imagined usecase is that all non-inline source blocks will be
evaluated manually by the user.  Inline blocks, however, must be
evaluated during export, or they will be simply deleted by the exporter.
2013-04-18 10:41:47 +02:00
Bastien Guerry 4757c5c8dd Merge branch 'master' of orgmode.org:org-mode 2013-04-18 10:29:12 +02:00
Bastien Guerry 4231cb4b12 Use `org-add-hook' in some places and merge Emacs revno r112320
* ox.el (org-export-stack-mode)
* org-crypt.el (org-crypt-check-auto-save)
(org-crypt-use-before-save-magic): Use `org-add-hook' when the
hooks are local hooks.

* org-indent.el (org-indent-mode)
* org-agenda.el (org-agenda-mode): Use `org-add-hook' and
merge upstream change from Emacs revno r112320.
2013-04-18 10:29:00 +02:00
Bastien Guerry 217d14ecc2 ob-core.el (org-babel-pop-to-session-maybe): Fix docstring
* ob-core.el (org-babel-pop-to-session-maybe): Fix docstring.
(org-babel-pop-to-session-maybe): Use true function's name,
not its alias.
2013-04-18 10:22:34 +02:00
Nicolas Goaziou 77c5710de2 ox-latex: Handle consecutive alterning sub and superscript
* lisp/ox-latex.el (org-latex--script-size): Handle consecutive
  alterning sub and superscript.

This patch fixes export of "a^b_c" constructs.
2013-04-18 00:06:06 +02:00
Nicolas Goaziou 58f7e43821 ox-org.el: Fix some docstrings
* lisp/ox-org.el (org-org-identity): Fix docstring.  Tiny refactoring.
(org-org-headline, org-org-keyword): Fix docstring.
2013-04-17 22:45:07 +02:00
Achim Gratz f6bf19f898 ob-perl: fix result handling
* lisp/ob-perl.el (org-babel-perl-wrapper-method): Select output
  handle only after evaluation so that output is not mixed into
  results eavaluation.
  (org-babel-perl-evaluate): Fix the handling of results for ":results
  output" to also parse tables.  Use the same lambda construction as
  in ob-sh.el to avoid code duplication.
2013-04-17 21:40:15 +02:00
Nicolas Goaziou 99f8821995 ox-latex: Use \text command for subscript and superscript
* lisp/ox-latex.el (org-latex--script-size): Use \text command for
  subscript and superscript.  This is far superior to \mathrm, but it
  requires "amstext" package.  In particular, accented characters are
  now allowed within sub/superscript.
* lisp/org.el (org-latex-default-packages-alist): Add "amstext"
  package.
2013-04-17 20:59:41 +02:00
Nicolas Goaziou d57b9e84e1 ox-latex: Better handling of sub/superscript within sub/superscript
* lisp/ox-latex.el (org-latex--script-size): Fix error when using
  sub/superscript within sub/superscript.
2013-04-17 20:59:41 +02:00
Bastien Guerry 937b4484c6 org-agenda.el: New commands for dragging a line forward/backward
* org-agenda.el (org-agenda-drag-line-forward)
(org-agenda-drag-line-backward): New commands.
(org-agenda-mode-map): Bind the new commands to M-<down> and
M-<up> respectively.

* org.texi (Agenda commands): Add a table heading for dragging
agenda lines forward/backward.
2013-04-17 20:25:02 +02:00
Nicolas Goaziou b335a4fa34 ox-latex: Improve subscript/superscript export
* lisp/ox-latex.el (org-latex--script-size): New function.
(org-latex-subscript, org-latex-superscript): Use new function.
2013-04-17 18:43:01 +02:00
Bastien Guerry d68744f401 org.el (org-insert-heading): Fix insertion of items
* org.el (org-insert-heading): Fix insertion of items.
2013-04-17 10:10:34 +02:00
Bastien Guerry df4ed8e794 org-capture.el (org-capture-use-agenda-date): Fix docstring
* org-capture.el (org-capture-use-agenda-date): Fix docstring.
2013-04-17 07:00:59 +02:00
Bastien Guerry 4e62936ae5 org-agenda.el: (org-agenda-bulk-toggle-all): New command
* org-agenda.el (org-agenda-bulk-toggle): Fix docstring.
(org-agenda-bulk-toggle-all): New command.
(org-agenda-mode-map): Bind `org-agenda-bulk-toggle' to `M-m'
and `org-agenda-bulk-toggle-all' to `M-*'.
(org-agenda-menu): Add `org-agenda-bulk-toggle' and
`org-agenda-bulk-toggle-all'.
(org-agenda-bulk-mark, org-agenda-bulk-unmark): Jump to the
next headline, not the next line.
2013-04-16 22:02:07 +02:00
Bastien Guerry 35b9983107 org-capture.el (org-mks): Fix bug.
* org-capture.el (org-mks): Fix bug: let-bind
`case-fold-search' to nil while matching the first letter of a
multi-letters template.

Thanks to Robert Goldman for reporting this bug and providing the fix.
2013-04-16 18:27:11 +02:00
Bastien Guerry 4f89c37cea org.el (org-store-link): When a bracket link is found in a headline, use the link description or the link path
* org.el (org-store-link): When a bracket link is found in a
headline, use the link description or the link path.
2013-04-16 16:05:55 +02:00
Nicolas Goaziou 407a6acf4d ox/ox-latex: Fix docstrings
* lisp/ox-latex.el: Remove instructions since everything is documented
  in Org manual.
* lisp/ox.el (org-export-with-smart-quotes): Use LATEX instead of
  LaTeX for keywords, the latter being hard to type, somewhat
  difficult to read, and overall just pedantic.
2013-04-16 12:54:05 +02:00
Bastien Guerry 7c2b7b9eef org.el: Use `user-error' instead of `error'
* org.el (org-flag-drawer, org-hide-block-toggle)
(org-goto-left, org-goto-right, org-promote)
(org-paste-subtree, org-narrow-to-block, org-sort-entries)
(org-insert-link, org-offer-links-in-entry, org-open-file)
(org-refile, org-refile-get-location)
(org-refile-check-position, org-prepare-dblock, org-todo)
(org-auto-repeat-maybe, org-show-todo-tree, org-sparse-tree)
(org-occur, org-priority, org-scan-tags)
(org-get-tags-string, org-property-action, org-set-effort)
(org-entry-put, org-insert-drawer)
(org-compute-property-at-point)
(org-property-next-allowed-value, org-evaluate-time-range)
(org-closest-date, org-timestamp-change)
(org-revert-all-org-buffers, org-cycle-agenda-files)
(org-agenda-file-to-front, org-remove-file)
(org-preview-latex-fragment, org-format-latex)
(org-create-math-formula, org-create-formula-image)
(org-speed-command-help, org-check-before-invisible-edit)
(org-modifier-cursor-error, org-hidden-tree-error)
(org-mark-subtree, org-kill-line, org-first-sibling-p)
(org-up-element, org-down-element)
(org-drag-element-backward, org-drag-element-forward)
(org-unindent-buffer, org-speedbar-set-agenda-restriction):
Use `user-error' instead of `error'.
2013-04-16 12:02:35 +02:00
Bastien Guerry 320b633b6e ox-latex.el (latex): Don't force exporting with smart quotes
* ox-latex.el (latex): Don't force exporting with smart
quotes.

* ox.el (org-export-with-smart-quotes): Mention the need to
use the relevant Babel package when setting this option to
non-nil.

Before the fix, if the user used #+LANGUAGE: fr with no other
customization, the quotes would disappear from the PDF output.
That's because smart quotes were enforced, while the .tex file
needs \usepackage[french]{babel} to display the quotes.

We now don't force the smart quotes and give more explanations
in `org-export-with-smart-quotes'.
2013-04-16 11:39:41 +02:00
Bastien Guerry 7790a97cdd org-src.el (org-edit-src-turn-on-auto-save): New option
* org-src.el (org-edit-src-turn-on-auto-save): New option.
(org-edit-src-code): Use it.
(org-edit-src-auto-save-idle-delay): Enhance docstring.

* doc/org.texi (Editing source code): Document
`org-edit-src-auto-save-idle-delay' and
`org-edit-src-turn-on-auto-save'.

Thanks to Charles C. Berry for bringing this up again.
2013-04-16 10:38:01 +02:00
Bastien Guerry 8546254ce5 org-capture.el (org-mks): Make cursor invisible
* org-capture.el (org-mks): Make cursor invisible.
2013-04-16 09:23:45 +02:00
Bastien Guerry 8546ef131d org.el (org-link-expand-abbrev): Save match data before before calling the replacement function
* org.el (org-link-expand-abbrev): Save match data before
before calling the replacement function.
2013-04-16 09:15:45 +02:00