0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-22 12:10:44 +00:00
Commit graph

1798 commits

Author SHA1 Message Date
Bastien Guerry f62910082c org.el (org-show-context): Complete docstring.
* org.el (org-show-context): Complete docstring.

Thanks to Michael Heerdegen for mentioning this.
2012-01-03 09:18:38 +01:00
Carsten Dominik 9b29bcc7c3 Fix bug in mapper function
* lisp/org.el (org-scan-tags): Make sure org-map-continue-from is nil
at each match
2012-01-03 09:17:56 +01:00
Bastien Guerry dc44b5897c org.el (org-map-continue-from): Fix typo in docstring.
* org.el (org-map-continue-from): Fix typo in docstring.
2012-01-03 09:16:54 +01:00
Bastien Guerry f3d63e34be org.el: Also match cumulating properties like ":prop+:".
* org.el (org-property-re): Also match cumulating properties
like ":prop+:".

Thanks to Christoph LANGE for spotting this.
2012-01-03 09:16:24 +01:00
David Maus 3305602f74 Escape link path only if path contains space or non-ascii character
* org.el (org-open-at-point): Escape link path for http:, https:,
ftp:, news:, and doi: links only if the path contains space or
non-ascii character.

This should take care of mistakenly double-escaped links as reported
by Jeff Horn in <http://article.gmane.org/gmane.emacs.orgmode/48731>.

We are just guessing here and push the responsibility for proper
escaping to the target application.
2012-01-03 09:14:08 +01:00
David Maus 094173b45d Ignore headlines without a true headline
* org.el (org-refile-get-targets): Ignore headlines without a true
headline.

This fixes a bug reported by Nathan Neff in
<http://article.gmane.org/gmane.emacs.orgmode/50035>.

Headlines with just a keyword are ignored as possible refile target.
2012-01-03 09:13:14 +01:00
Bastien Guerry e857b738c6 Release 7.8.02 2011-12-13 00:34:19 +00:00
Bastien Guerry 4ecf626ee7 Update website to show 7.8.01 as current release 2011-12-12 23:24:11 +00:00
Bastien Guerry f30ade0151 Update website to show 7.8 as current release 2011-12-12 17:08:28 +00:00
Bastien Guerry e56e2c8760 Silent a few byte-compiler warnings.
* org.el (org-block-regexp)
(org-heading-keyword-regexp-format)
(org-heading-keyword-maybe-regexp-format): Move up to keep the
byte-compiler happy.

* org-special-blocks.el (org-html): Require 'org-html.
(org-open-par, org-close-par-maybe): Declare as functions.

* ob.el (org-reduce): Declare as a function.
(org-current-export-file): Declare.

* ob-ref.el (org-babel-update-intermediate): Make a defvar.
2011-12-12 18:04:15 +01:00
Bastien Guerry 44f98b651d Fix a few docstrings.
Thanks to Paul Eggert for fixing this in Emacs.
2011-12-12 14:38:59 +01:00
Michael Brand 68cc108759 Completion of remapping for Outline functions
* lisp/org.el Key bindings: remap the Outline functions from
`outline-mode-prefix-map' where possible.
2011-12-11 19:43:53 +01:00
Peter Münster 0472ccdc99 Timestamps: Fix org-schedule and org-deadline with absolute time arguments
* lisp/org.el (org-add-planning-info): Treat absolute time too.

TINYCHANGE
2011-12-11 18:44:00 +01:00
Michael Brand 2091083323 Bugfix open 1 link from list; doc more link types
* doc/org.texi (External links): Document the link types file+sys and
file+emacs, slightly narrow used page width.
* lisp/org.el (org-offer-links-in-entry): Make list when assigning a
single link.

"M-1 C-c C-o" or (org-open-at-point 1) or (org-offer-links-in-entry 1)
on a headline followed by two links enters Lisp error.  Both changes
are remainders of the commit release_6.33f-189-g3e0c61d.
2011-12-11 18:18:40 +01:00
Eric Schulte a706d16127 wrap code block results in drawers rather than blocks
* lisp/ob.el (org-babel-insert-result): Do not examplize wrapped
  scalar results, simply wrap them.
  (org-babel-result-end): Find the end of results wrapped in a RESULTS
  drawer.
2011-12-11 09:51:27 -07:00
Bastien Guerry cd447fa11d Make org-todo-yesterday' call org-agenda-todo-yesterday' if necessary.
* org.el (org-todo-yesterday): When called from the agenda,
use `org-agenda-todo-yesterday' instead.
2011-12-11 17:52:10 +01:00
Jambunathan K 0e859c62b5 org.el (org-modules): odt is no longer a contrib module 2011-12-10 18:12:58 +01:00
Eric Schulte 6cad241b0e moving ob-picolisp into the core
Thanks to Thorsten Jolitz for contributing support for this new
language.

* Makefile (LISPF): Add ob-picolisp to the Makefile.
* contrib/babel/langs/ob-picolisp.el: Remove from contrib.
* lisp/ob-picolisp.el: Add to core lisp directory.
* lisp/org.el (org-babel-load-languages): Add Pico Lisp to the list of
  supported code block languages.
2011-11-29 09:05:31 -07:00
Bastien Guerry fd94918e41 org.el: Fix two typos in docstrings.
* org.el (org-link-unescape, org-link-unescape-compound): Fix two
  typos in docstrings.
2011-11-28 15:07:49 +01:00
David Maus 4d312a07f5 Remove clocking information when preparing a clone
* org.el (org-clone-subtree-with-time-shift): Remove clocking
information and empty drawers when preparing a clone.

Fixes a regression introduced by
516b2fbb87, reported by Bernt Hansen in
http://article.gmane.org/gmane.emacs.orgmode/49385
2011-11-23 21:35:35 +01:00
Carsten Dominik c52c23fdfd Merge branch 'master' of orgmode.org:org-mode 2011-11-23 07:36:23 +01:00
Carsten Dominik 6107173c78 Require parse-time for `org-read-date-get-relative' 2011-11-23 07:36:07 +01:00
Eric Schulte 1b014d1cb2 Merge branch 'master' of orgmode.org:org-mode 2011-11-20 09:40:52 -07:00
Eric Schulte 15417f67c4 Added a less functional Org-mode copy of the cl reduce function.
* lisp/org.el (org-reduce): Added a less functional Org-mode copy of
  the cl reduce function.
2011-11-20 09:38:54 -07:00
Nicolas Goaziou b5935f777e Fontify src blocks following a "name" keyword
* lisp/org.el (org-fontify-meta-lines-and-blocks-1): Recognize "name"
  as a valid keyword that can preceed a block.
2011-11-20 10:40:25 +01:00
Carsten Dominik 78f7382879 Merge branch 'master' of orgmode.org:org-mode 2011-11-17 18:06:20 +01:00
Carsten Dominik 773596e347 Use prefix arg 0 to inhibit note taking for TODO change
* lisp/org.el (org-todo): Interpret 0 prefix arg as note inhibitor.

Sometimes I want to quickly make a few TODOs done in the agenda and I
want to bypass the note taking I have normally set up.  With this
change, I can press `0 t d' in the agenda to do this.
2011-11-17 08:56:11 +01:00
Milan Zamazal a5ed98e452 Create visibility overlays properly
* org.el (org-set-outline-overlay-data): Use outline-flag-region to make a
region invisible.  This ensures all necessary actions, especially adding
isearch-open-invisible property, are applied.
2011-11-15 18:39:57 +01:00
Eric Schulte 3af89e696a property names ending in plus accumulate
This results in the following behavior.

  #+property: var  foo=1
  #+property: var+ bar=2

  #+begin_src emacs-lisp
    (+ foo bar)
  #+end_src

  #+results:
  : 3

  #+begin_src emacs-lisp
    (org-entry-get (point) "var" t)
  #+end_src

  #+results:
  : foo=1 bar=2

  * overwriting a file-wide property
    :PROPERTIES:
    :var:      foo=7
    :END:

  #+begin_src emacs-lisp
    foo
  #+end_src

  #+results:
  : 7

  #+begin_src emacs-lisp
    (org-entry-get (point) "var" t)
  #+end_src

  #+results:
  : foo=7

  * appending to a file-wide property
    :PROPERTIES:
    :var+:      baz=3
    :END:

  #+begin_src emacs-lisp
    (+ foo bar baz)
  #+end_src

  #+results:
  : 6

  #+begin_src emacs-lisp
    (org-entry-get (point) "var" t)
  #+end_src

  #+results:
  : foo=1 bar=2 baz=3

* lisp/org.el (org-update-property-plist): Updates a given property
  list with a property name and a property value.
  (org-set-regexps-and-options): Use org-update-property-plist.
  (org-entry-get): Use org-update-property-plist.
* testing/examples/property-inheritance.org: Example file for testing
  appending property behavior.
* testing/lisp/test-property-inheritance.el: Tests of appending
  property behavior.
* lisp/ob.el (org-babel-balanced-split): Allow splitting on single
  characters as well as groups of two characters.
  (org-babel-parse-multiple-vars): Split variables on single spaces.
2011-11-15 08:56:24 -07:00
Eric Schulte 7e93b90f88 Standardized code block keywords
Nick Dokos <nicholas.dokos@hp.com> writes:

> Eric Schulte <schulte.eric@gmail.com> wrote:
>
>> The attached updated patch fixes a bug in the original.
>>
>
> Minor problem in applying:
>
> ,----
> | $ git apply ~/Mail/inbox/724
> | /home/nick/Mail/inbox/724:671: trailing whitespace.
> | #+name:
> | /home/nick/Mail/inbox/724:599: new blank line at EOF.
> | +
> | warning: 2 lines add whitespace errors.
> `----

The attached version fixes these issues, Thanks -- Eric

>From 0e43d59ee8d46a63f86780a502de726271bc39de Mon Sep 17 00:00:00 2001
From: Eric Schulte <schulte.eric@gmail.com>
Date: Fri, 28 Oct 2011 10:44:21 -0600
Subject: [PATCH] removing code block, results and call-line synonyms -- BREAKING CHANGE

Following a round of on-list discussion many code block synonyms have
been removed, moving forward the following syntax is valid.

- call lines are specified with #+call:
- code blocks are named with #+name:
- results are named with #+name:, however results generated by a code
  block may still be labeled with #+results:, and tables named with
  #+tblname: will be considered to be named results

The following function may be used to update an existing Org-mode
buffer to the new syntax.

  (defun update-org-buffer ()
    "Update an Org-mode buffer to the new data, code block and call line syntax."
    (interactive)
    (save-excursion
      (flet ((to-re (lst) (concat "^[ \t]*#\\+" (regexp-opt lst t)
                                  "\\(\\[\\([[:alnum:]]+\\)\\]\\)?\\:[ \t]*"))
             (update (re new)
                     (goto-char (point-min))
                     (while (re-search-forward re nil t)
                       (replace-match new nil nil nil 1))))
        (let ((old-re (to-re '("RESULTS" "DATA" "SRCNAME" "SOURCE")))
              (lob-re (to-re '("LOB")))
              (case-fold-search t))
          (update old-re "name")
          (update lob-re "call")))))

Note: If an old version of Org-mode (e.g., the one shipped with Emacs)
      is installed on your system many of the important variables will
      be pre-defined with a defvar and *will not* have their values
      automatically updated, these include the following.
      - org-babel-data-names
      - org-babel-result-regexp
      - org-babel-src-block-regexp
      - org-babel-src-name-regexp
      - org-babel-src-name-w-name-regexp
      It may be necessary to either remove the source code of older
      versions of Org-mode, or to explicitly evaluate the ob.el file.

* lisp/ob-exp.el (org-exp-res/src-name-cleanup): Updated
  Documentation.
* lisp/ob-lob.el (org-babel-block-lob-one-liner-regexp): Updated
  regular expression.
  (org-babel-inline-lob-one-liner-regexp): Updated regular expression.
* lisp/ob-ref.el (org-babel-ref-resolve): Notice when something that
  looks like a data results may actually be a code block.
* lisp/ob-table.el: Updated documentation.
* lisp/ob.el (org-babel-src-name-regexp): Simplified regexp.
  (org-babel-get-src-block-info): Updated match strings.
  (org-babel-data-names): Simplified acceptable names.
  (org-babel-find-named-block): Indentation.
  (org-babel-find-named-result): Updated to not return a code block as
  a result.
* lisp/org.el (org-fontify-meta-lines-and-blocks-1): Removing
  references to old syntactic elements.
  (org-additional-option-like-keywords): Removing references to old
  syntactic elements.
* contrib/babel/library-of-babel.org: Updated to make use of the new
  syntax.
* testing/examples/babel-dangerous.org: Updated to make use of the new
  syntax.
* testing/examples/babel.org: Updated to make use of the new syntax.
* testing/examples/ob-awk-test.org: Updated to make use of the new
  syntax.
* testing/examples/ob-fortran-test.org: Updated to make use of the new
  syntax.
* testing/lisp/test-ob.el: Removed two bad tests which tested the
  literal values of old regular expressions rather than their
  behavior.
2011-11-15 08:56:24 -07:00
Nicolas Goaziou b13b3e30d7 Allow cdlatex expansions at a list item or an headline
* lisp/org.el (org-try-cdlatex-tab): Don't try to expand a LaTeX
environment when at an item or an headline, but allow LaTeX
fragments.
(org-cycle): Try to call `cdlatex-tab' before cycling item's or
headline's visibility, in order to catch LaTeX fragments within.

This patch is based on the report and work of Maik Beckmann.
2011-11-13 10:31:47 +01:00
Carsten Dominik 059e4bd5e3 Merge branch 'timestamps-without-dayname' 2011-11-09 19:18:02 +01:00
Carsten Dominik 278d5afa2f Allow time stampes without day name
* lisp/org-clock.el (org-clock-in):
(org-clock-find-position): Make space after date optional.
* lisp/org.el (org-set-regexps-and-options):
(org-ts-regexp):
(org-ts-regexp-both):
(org-ts-regexp1):
(org-ctrl-c-ctrl-c): Make `C-c C-c' on date fix the time stamp

* doc/org.texi (Creating timestamps): Document the effect of `C-c C-c'
on a timestamp.
2011-11-09 18:55:27 +01:00
Eric Schulte 6bbc3566f7 bring ob-fortran into the core -- FSF assignment completion
Thanks to Sergey Litvinov for contributing this language support!

* lisp/ob-fortran.el: Adding support for Fortran code blocks.
* Makefile (LISPF): Compile Fortran support.
* lisp/org.el (org-babel-load-languages): Adding fortran to this list.
2011-11-08 14:18:57 -07:00
Nicolas Goaziou 2a58775d9e Correctly fontify headlines with special keywords
* lisp/org.el (org-set-font-lock-defaults): Fix small error in
  matching group that prevented fontification of keywords like
  org-comment-string and stars in headlines.
2011-11-03 21:23:59 +01:00
Carsten Dominik 4d2a5c97f2 Merge branch 'master' of orgmode.org:org-mode 2011-11-03 08:57:36 +01:00
Carsten Dominik 31d9fd44ac Make it possible to check before invisible edits
* lisp/org.el (org-catch-invisible-edits): New option.
(org-self-insert-command):
(org-delete-backward-char):
(org-delete-char): Call `org-check-before-invisible-edit'.
(org-check-before-invisible-edit): New function.
2011-11-03 08:57:26 +01:00
Nicolas Goaziou e31e89430a Globalize some variables to make them available in buffers not in Org mode
* lisp/org.el (org-heading-regexp, org-heading-keyword-regexp-format,
  org-heading-keyword-maybe-regexp-format): Globalize variables so
  they are accessible even in buffers not in Org mode.
2011-11-01 11:40:11 +01:00
David Maus a9559dc08a Don't use default-description if link description function is defined
* org.el (org-insert-link): Don't use default-description if a
`org-make-link-description-function' is defined.
2011-11-01 06:24:42 +01:00
Eric Schulte 8354fd9e0f Allow multi-line properties to be specified in property blocks
#+begin_property
    var foo=1,
        bar=2,
        baz=3,
        qux=4
  #+end_property
  #+begin_src emacs-lisp
    (+ foo bar baz qux)
  #+end_src

  #+results:
  : 10

* lisp/org.el (org-set-regexps-and-options): Use property blocks for
  multi-line properties.
2011-10-31 12:28:50 -06:00
Bastien Guerry b3e1e7320f org.el: Don't throw an error when editing takes place at the first point of the buffer.
* org.el (org-self-insert-command): Don't throw an error when
editing takes place at the first point of the buffer.

Thanks to Carsten Dominik for pointing this error.
2011-10-30 09:58:37 +01:00
Bastien Guerry d3370f1608 org.el: Unfold invisible region at point or right before point when editing.
* org.el (org-self-insert-command): Unfold invisible region at
point or right before point when editing.

Thanks to Suvayu Ali for discussing this.
2011-10-30 02:58:31 +02:00
Nicolas Goaziou cfed6e9366 Add a way to search for a link search without impacting buffer visibility
* lisp/org.el (org-link-search): Add an optional argument preventing
  function from revealing context around match.
2011-10-28 17:36:14 +02:00
Bastien Guerry 6da350bf06 org.el: Fix bug when matching the face property before following a link.
* org.el (org-return): Fix bug when matching the face property
before following a link.

Thanks to Paul Sexton for the analysis and the fix.
2011-10-28 16:42:20 +02:00
Carsten Dominik f6a766548c Save complex heading regexp for column view
* lisp/org.el (org-scan-tags): Also remember `org-complex-heading-regexp'
in a property.
2011-10-28 14:47:32 +02:00
Bastien Guerry de8cd8ee41 Bugfix: make `org-return' detect 'org-link face properly.
* org.el (org-return): Check the presence of the 'org-link
face even in contexts where there is more than one face.

Thanks to Maximilian Matthé for reporting this bug.
2011-10-26 19:20:12 +02:00
Yuri Lenskiy 6115980993 Addition of default-description parameter to org-insert-link
This patch, against the stable 7.7 branch version of org.el, adds a
default-description argument to org-insert-link that, if non-nil, will
become the default description.

- Yuri Lenskiy
2011-10-26 19:04:36 +02:00
Nicolas Goaziou dba3e22c93 Have a more informative return value for `org-in-block-p'
* lisp/org.el (org-in-block-p): Return matched name of block, if any.
  It can be useful when a list of block names is provided as an argument.
2011-10-26 10:45:28 +02:00
Bastien Guerry 2494eaea49 Minor docstring fix.
Thanks to Peter Münster for spotting this.
2011-10-24 23:47:59 +02:00
Nicolas Goaziou 77eeb0df1b Fix regexps for headlines
* lisp/org.el (org-set-regexps-and-options): Fix small bug introduced
  by commit dfcb6faef1.
2011-10-23 18:14:58 +02:00