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

4168 commits

Author SHA1 Message Date
Eric Schulte f8000a9bc1 org-export-string now accepts symbolic or string fmt argument
* lisp/org-exp.el (org-export-string): Use `format' to construct
  function call to allow symbolic or string arguments.
2010-12-16 18:09:51 -07:00
Carsten Dominik 8aacc708dd Capture: Better error message for invalid entry-type templates
* lisp/org-capture.el (org-capture-place-entry):
(org-capture-insert-template-here): Check tree for validity before
pasting it.
2010-12-16 16:51:04 +01:00
Julien Danjou dece850eca org-gnus: trim date
* org-gnus.el (org-gnus-store-link): Trim date.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-12-16 14:21:26 +01:00
Julien Danjou 073391f5a7 Allow to retrieve email link date
* org.el (org-email-link-description): Allow to retrieve email link date.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-12-16 14:17:54 +01:00
Lawrence Mitchell 32be74e098 Quote any special characters in org-make-target-link-regexp
* lisp/org.el (org-make-target-link-regexp): regexp-quote target
before replacing whitespace.

Previously a radio link <<<...>>> would match all three-letter words
in the buffer.  The manual indicates the radio links are meant to
match literally (modulo whitespace differences), so we should
regexp-quote all the targets to avoid over-eager matching.
2010-12-16 14:12:28 +01:00
John Wiegley c61cdced2f Undid one of the scatter-related changes 2010-12-15 23:31:19 -05:00
Eric Schulte f5f2851401 Noweb references can now be resolved from the library of babel.
* lisp/ob.el (org-babel-expand-noweb-references): Noweb references can
  now be resolved from the library of babel.
2010-12-15 10:16:58 -07:00
Eric Schulte e919c97d7e fixed insertion of trailing newline after code block evaluation
* lisp/ob.el (org-babel-result-end): No longer leaving trailing new
  line after block removal.
2010-12-15 09:58:57 -07:00
Carsten Dominik 8eee473f37 Anchor outline regexp during LaTeX tree export
* lisp/org-latex.el (org-export-latex-first-lines): Anchor outline
regexp during LaTeX tree export

Jörg Hagmann writes:

> - If you export the (new) minimal example below to latex (C-cC-e l), it works.
> - If you only export a tree (Subtree in the example; C-cC-e 1 l), the first table ends at the horizontal line and everything between it and the next node (Subsubtree) is eliminated. The second (identical) table is exported correctly.
> - If you remove the asterisk(s) in the first table, it works.
>
> This problem crept in in the last days or weeks before 7.4.
>
> It may not be a problem for most of you, but I happen to have a number of files where columns are automatically displayed as tables preceding the first subnode (#+BEGIN: columnview ...). An alternative would be to display %ITEM in column-view without the asterisks.
>
> Emacs 23.2.1 on OS X 10.6.5
> Org-mode version 7.4 (release_7.4.24.g48b11.dirty)
>
> Thanks, Jörg
>
> -------New minimal example------------
> * Subtree
>
>
> | One    | Two  | Three |
> |--------+------+-------|
> | * Test | text | text  |
> | ** One | text | text  |
>
>
> Some text
>
> ** Subsubtree
>
> | One    | Two  | Three |
> |--------+------+-------|
> | * Test | text | text  |
> | ** One | text | text  |
2010-12-15 12:37:45 +01:00
Bastien Guerry eb0d35dd18 Fix typo (which broke lisp/org.el).
Thanks to Matt Lundin for a warning about this.
2010-12-14 21:48:43 +01:00
John Wiegley 48b11c4420 Fixed an improper use of org-today 2010-12-14 02:02:41 -05:00
John Wiegley 14350cac34 Added FILE meta-property 2010-12-14 02:02:40 -05:00
Konrad Hinsen 8916e948d2 ob-python: ensure py-which-bufname is initialized
* lisp/ob-python.el (org-babel-python-initiate-session-by-key): Make
  sure that py-which-bufname is initialized, as otherwise it will be
  overwritten the first time a Python buffer is created.
2010-12-13 18:47:46 -07:00
Eric Schulte 19a0ca3182 ob-sh: Better escaping of variables with spaces.
* lisp/ob-sh.el (org-babel-sh-var-to-sh): Better escaping of variables
  with spaces.
2010-12-13 13:56:03 -07:00
Eric Schulte e3aeb07a17 ob-org: Padding code block with an empty title on LaTeX export.
* lisp/ob-org.el (org-babel-execute:org): Padding code block with an
  empty title on LaTeX export.
2010-12-13 13:23:10 -07:00
Matt Lundin 4760c3b948 Make timestamp search in org-entry-properties more efficient.
* lisp/org.el: (org-entry-properties) Stop scanning for timestamps if
a specific timestamp property (e.g., DEADLINE, SCHEDULED, etc.) is
requested and a match is found. Also, if a specific timestamp property
is requested, do not push non-relevant timestamps onto property list.

This change only effects org-entry-properties when a specific
timestamp is requested with the special flag, as in:

(org-entry-properties nil 'special "SCHEDULED")

Previously, even if only the SCHEDULED timestamp was requested,
org-entry-properties would parse all the timestamps in an entry. This
extra parsing could slow down the construction of agenda views,
especially with entries that contained a large number of log
items (CLOCK, state changes, etc.). The function org-entry-get,
however, is only interested in the first occurrence of the item. When
looking for a specific type of timestamp, org-entry-properties now
stops searching for timestamps after the match is found, unless the
property is "CLOCK".

Here are the relevant ELP results:

Before:

org-entry-get	     296         0.4724579999  0.0015961418
org-entry-properties 31          0.3438769999  0.0110928064

After:

org-entry-get        296         0.1447729999  0.0004890979
org-entry-properties 31          0.015765      0.0005085483
2010-12-13 15:13:36 +01:00
Carsten Dominik 98015f3748 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-12-13 15:11:14 +01:00
Carsten Dominik fbe3eb4d2a Fix display of current time to show up only today
* lisp/org-agenda.el (org-agenda-add-time-grid-maybe): Show time only
when grid is being made for today.

Patch by Matt Lundin
2010-12-13 10:43:37 +01:00
John Wiegley 3542f0eed9 Scattering tasks first resets them to "today" 2010-12-13 01:20:04 -05:00
Matt Lundin bca4ac9998 Optimize calls to org-is-habit-p
* lisp/org-agenda.el: (org-agenda-get-scheduled) Don't call
  org-is-habit-p until after checking for for
  org-agenda-skip-scheduled-if-done.

Org-agenda-get-scheduled was calling org-is-habit-p on every scheduled
item (including DONE items when org-agenda-skip-scheduled-if-done was
set to t). Tweaking the timing of the test shaves some time off of
agenda construction when org-habit is loaded and
org-agenda-skip-scheduled-if-done is t.

Before:  org-is-habit-p  478         0.2434439999  0.0005092970
After:   org-is-habit-p	 81          0.057944      0.0007153580
2010-12-12 22:26:23 +01:00
Carsten Dominik b65ba05758 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-12-12 20:45:40 +01:00
Achim Gratz 8dfd6a6140 Fixup 95bb16661b
* org.el: remove spurious linebreak introduced by earlier patch
* ob.el, ob-ref.el: remove double fix of the same problem

Achim Gratz <Stromeko@Stromeko.DE> wrote:

> this patch had already been partially applied by Carsten and Eric (in
> slightly a different way than I suggested).  The changes to ob.el and
> ob-ref.el (the require statements) are therefore superfluous and should
> probably be backed out.  There was also a superfluous whitespace change
> in org.el (a closing paren that was broken onto the next line).  Patch
> to this effect is attached.  You've already cleaned up org-agenda.el and
> the conditions in org-macs...
2010-12-12 20:09:28 +01:00
Carsten Dominik 5f44294c83 Support #+CONSTANTS in non - Org-mode files
* lisp/org-table.el (orgtbl-ctrl-c-ctrl-c): Parse buffer for constants.

Patch by Seweryn
2010-12-12 13:22:11 +01:00
Åukasz Stelmach 93135fa814 Add displaymath to MathJax setup
* lisp/org-html.el (org-export-html-mathjax-template): displaymath
environment and MathJax

Greetings All.

The following patch makes MathJax consider \begin{displaymath} and
\end{displaymath} as math environmetn boundaries. For someone who, like
me, keeps "The not so short introduction to LaTeX2e" alway around, the
displaymath environment is the default way to introduce a block of math.

In fact '\[' and '\]' are also mentioned there but the environment is
used in every single example so the patch minimizes the surprise.
2010-12-12 13:13:45 +01:00
Carsten Dominik 1495bc6b08 Add current time to time grid in agenda
* lisp/org-faces.el (org-agenda-current-time): New face.
* lisp/org-agenda.el (org-agenda-show-current-time-in-grid):
(org-agenda-current-time-string): New options.
(org-agenda-add-time-grid-maybe): Add current time to time grid.
2010-12-12 09:26:01 +01:00
Åukasz Stelmach ad006dea13 sexp can set its face (was: Including current time in agenda)
suvayu ali <fatkasuvayu+linux@gmail.com> writes:

> I actually tried to set the text properties for the string instead,
> but looks like org-agenda is ignoring that.
>
> (defun jd:org-current-time ()
>   "Return current-time if date is today."
>   (when (equal date (calendar-current-date))
>     (propertize (format-time-string "%H:%M Current time") 'font-lock-face
> 		'(:weight bold :foreground "DodgerBlue4" :background "snow"))))

To accomplish this you'd have to apply the following patch and use 'face
property rather than font-lock-face.

Why can't a sexp choose its 'face after all?

--8<---------------cut here---------------start------------->8---
--8<---------------cut here---------------end--------------->8---
2010-12-12 08:38:38 +01:00
Carsten Dominik 651e137c50 Make sure windows are created correctly on full-screen sessions
Patch by Leo
2010-12-12 08:36:49 +01:00
Carsten Dominik 7666ba421f Version number back to 7.4 2010-12-10 18:49:40 +01:00
Carsten Dominik 76a25715c9 Bump version number to 7.5 2010-12-10 18:43:10 +01:00
Carsten Dominik 1330048ba0 Keep byte compiler happy 2010-12-10 14:13:05 +01:00
Carsten Dominik 9df61b6c3e Fix typos 2010-12-10 11:12:56 +01:00
Tassilo Horn 21d4acf035 Place Footnotes section before signature in all message-mode derived modes.
* org-footnote.el (org-footnote-create-definition): Place Footnotes
  section before message-signature-separator also in modes derived
  from message-mode.
2010-12-10 07:34:27 +01:00
Carsten Dominik 3c7dd8487d XEmacs compatibility: temp dir 2010-12-10 07:33:15 +01:00
Julien Danjou 330721f406 org: remove useless computed value in org-make-tags-matcher
* org.el (org-make-tags-matcher): Remove useless cat-p value.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-12-10 07:30:24 +01:00
Julien Danjou 8c2f37270d org-entry-properties: enhance docstring
* org.el (org-entry-properties): Enhance docstring.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-12-10 07:29:14 +01:00
Nicolas Goaziou 9966f922f3 Do not break lists with blocks within when exporting
* lisp/org-list.el (org-list-top-point-with-indent,
  org-list-bottom-point-with-indent): Pay also attention to
  'original-indentation property of text, as blocks are put to column
  0 upon exporting.
2010-12-09 09:54:42 +01:00
Dan Davison c6a945e82c babel: Handle errors when temporary directory is on a different partition
* lisp/ob.el (org-babel-remove-temporary-directory): Handle exception
  with message informing of failure to remove directory.

Thanks to Antti Kaihola for the bug report:

http://thread.gmane.org/gmane.emacs.orgmode/34394

From: Antti Kaihola <akaihola <at> gmail.com>
Subject: Can't close Emacs+org-mode if /tmp and /home on different	partitions
Newsgroups: gmane.emacs.orgmode
Date: 2010-12-02 08:33:28 GMT (6 days, 1 hour and 22 minutes ago)
I have /tmp on my root partition and a separate partition for /home.
When trying to close an Emacs session which is using org-mode, I get
this error:

    move-file-to-trash: Non-regular file: Is a directory, /tmp/babel-XXXXXXX

(where XXXXXXX are random characters).

I tracked down the problem to org-babel-remove-temporary-directory
which ob.el adds to kill-emacs-hook. It tries to remove the temporary
directory using delete-directory, which in turn tries to move the
directory (by renaming) into trash, which is in my home directory.

I added this to my ~/.emacs.d/init.el:

   (custom-set-variables '(temporary-file-directory "/home/akaihola/tmp/"))

and closing Emacs works correctly again. However, since my init.el is
part of emacs-starter-kit which I update frequently, I'd prefer not to
modify that file. Unfortunately the customization hook
emacs-starter-kit provides (~/.emacs.d/custom.el) is loaded too late
to affect the temporary directory.

I'm running emacs-snapshot 1:20090909-1 in Ubuntu 10.10. Looks like
this is really an Emacs bug and is already fixed:
http://groups.google.com/group/gnu.emacs.bug/browse_thread/thread/0446b8684a8ef504
2010-12-08 10:11:49 +00:00
Eric Schulte be882617ad ob-clojure: reading `package' header argument from heading properties
* lisp/ob-clojure.el (org-babel-header-arg-names:clojure): Adding
  `package' to the list of Clojure header arguments which will be read
  from heading properties.
2010-12-07 21:08:31 -07:00
Nicolas Goaziou b3e16cda95 inlinetask: illustrate LaTeX export template with a new example
* lisp/org-inlinetask.el (org-inlinetask-export-templates): added
  Sébastien Vauban's suggestion for LaTeX export in docstring. This is
  not default as it requires an additional LaTeX package: "todonotes".
2010-12-06 19:24:00 +01:00
Nicolas Goaziou 2c23f2f064 New configurable way to export inline tasks
* org-inlinetask.el (org-inlinetask-export-templates): new variable
* org-inlinetask.el (org-inlinetask-export-handler): make use of
  templates to export inline tasks
2010-12-06 19:13:09 +01:00
Nicolas Goaziou aa9fbbb323 Fix cycling indentation with inline tasks
* org.el (org-current-level): ignore inline tasks when getting current
  level of entry
2010-12-06 19:13:09 +01:00
Nicolas Goaziou 5bbce0473d Fix indentation after an inline task with drawers
* org.el (org-indent-line-function): ignore drawers inside inline
  tasks  if the line to indent isn't inside an inline task itself.
2010-12-06 19:13:09 +01:00
Nicolas Goaziou 85591ffcbf Fix indentation of text after an inline task in indent-mode
* org-inlinetask.el (org-inlinetask-get-task-level): new function
* org-indent.el (org-indent-add-properties): find true level of indentation wrt inline tasks.
2010-12-06 19:13:09 +01:00
Nicolas Goaziou 9be9f727f8 Fix LaTeX export of subtrees and inline tasks 2010-12-06 19:13:09 +01:00
Nicolas Goaziou 5ecd79ea74 Handle inline tasks when marking a subtree
* org-inlinetask.el (org-inlinetask-outline-regexp): new function
* org-inlinetask.el (org-inlinetask-goto-beginning): new function
* org-inlinetask.el (org-inlinetask-goto-end): new function
* org.el (org-mark-subtree): new command
* org.el (org-speed-commands-default, org-mode-map): make use of new command
2010-12-06 19:13:09 +01:00
Nicolas Goaziou cd70dc1038 inlinetasks: fix latex export wrt conversion to lists
* org-inlinetask.el (org-inlinetask-export-handler): Remove protection
  from @<span class...> so it can be removed during LaTeX export.
2010-12-06 19:13:09 +01:00
Eric Schulte 1ce04c5057 updating Code block evaluation messages
Thanks to Sébastien Vauban for suggesting these changes.

* lisp/ob.el (org-babel-insert-result): More informative code block
  evaluation messages.
2010-12-06 08:04:17 -07:00
Carsten Dominik e9215698a2 Revert "Fix :VISIBILITY: handling of nested "folded" properties"
This reverts commit 383802d063.

The commit had org-mode process the headlines from bottom to top, which
meant that any changes to the visibility of lower headlines were
overridden/modified by changes higher up the tree. Reverting the commit
causes VISIBILITY to work correctly.
2010-12-06 10:06:21 +01:00
Matt Lundin c8ab88cb69 Allow user to limit amount of context stored in file link search strings
* lisp/org.el: (org-make-heading-search-string) Optionally limit
  number of lines stored in file link search strings.
  (org-context-in-file-links) Add option to set to integer specifying
  number of lines.
2010-12-06 10:05:29 +01:00
Carsten Dominik 385cdfdcf3 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-12-06 10:03:11 +01:00