Commit graph

4824 commits

Author SHA1 Message Date
Eric Schulte 8a41d54c1a org-bibtex: translating between Org-mode headings and Bibtex entries
* lisp/org-bibtex.el: Updating Copyright dates, author information,
  commentary and history notes.
  (org-bibtex-types): List of bibtex types with descriptions and
  required and optional fields.
  (org-bibtex-fields): List of bibtex fields with descriptions.
  (*org-bibtex-entries*): Special variable to hold parsed bibtex
  entries.
  (org-bibtex-autogen-keys): Custom variable controlling whether
  bibtex keys are automatically generated
  (org-bibtex-prefix): Custom variable allowing use of optional prefix
  for bibtex properties in Org-mode headlines.
  (org-bibtex-get): Helper function for accessing bibtex elements of a
  property list.
  (org-bibtex-put): Helper function for inserting bibtex element into
  a property list.
  (org-bibtex-headline): Return a bibtex entry of the given headline
  as a string.
  (org-bibtex-ask): Prompt the user to fill in the value of a bibtex
  field.
  (org-bibtex-autokey): Generate a bibtex key for the current
  headline.
  (org-bibtex-fleshout): Fill in missing bibtex properties of the
  current headline.
  (org-bibtex): Export the current Org-mode buffer to a bibtex buffer.
  (org-bibtex-check): Check that all bibtex properties are present in
  the current headline.
  (org-bibtex-check-all): Check all headlines in the current buffer.
  (org-bibtex-create): Create a new bibtex headline at the current
  level.
  (org-bibtex-read): Read the current bibtex entry from a bibtex file.
  (org-bibtex-write): Write the most recently read bibtex entry into
  an Org-mode file.
2011-04-27 14:53:05 -06:00
Carsten Dominik b00948328d Merge branch 'clock-check-faces' 2011-04-27 13:50:23 +02:00
Carsten Dominik ad4970a32e Configurable faces for clock problems
* lisp/org-agenda.el (org-agenda-clock-consistency-checks): Allow to
set properties.
(org-agenda-show-clocking-issues): Handle faces.
2011-04-27 13:49:11 +02:00
Eric Schulte 1a68794fdc ob-ditaa: specify utf8 data by default (default :java header argument)
* lisp/ob-ditaa.el (org-babel-default-header-args:ditaa): Specify utf8
  content by default with "-Dfile.encoding=UTF-8".
2011-04-25 18:57:59 -06:00
Eric Schulte f0d83a355e ob-ditaa: adding :java header arg for passing flags to the java command
Thanks to Juan Pechiar for raising the need for this header argument.

* lisp/ob-ditaa.el (org-babel-execute:ditaa): New ":java" header argument.
2011-04-25 13:12:12 -06:00
Nicolas Goaziou ae60048a81 org-exp: make lists more robust wrt macros expansion
* lisp/org-exp.el (org-export-preprocess-string): mark list end before
  expanding macros. Thus, a macro inside a list and containing blank
  lines cannot break the list structure.
  (org-export-preprocess-apply-macros): multi-lines macros get
  indented with the same indentation as the first line. Thus, we are
  sure that every line belongs to the same list as the first line, if
  such list exists. Also add comments in code.
2011-04-24 19:34:09 +02:00
Carsten Dominik acda0ee212 Fix typos 2011-04-24 17:21:47 +02:00
Carsten Dominik 02441ed433 Implement clock consistency check functionality for agenda
* lisp/org-agenda.el (org-agenda-clock-consistency-checks): New option.
(org-agenda-list): Handle display change to clock check.
(org-agenda-get-progress): Show only clock entries if we are doing the
consistency check.
(org-agenda-show-clocking-issues): New function.
(org-agenda-check-clock-gap): New function.
(org-agenda-view-mode-dispatch): Offer consistency check.
(org-agenda-log-mode): Handle switch to clock only display.
(org-agenda-set-mode-name): Show lighter for Clockcheck.
* lisp/org.el (org-hh:mm-string-to-minutes): Accept an integer argument
and return it unchanged.
* doc/org.texi (Agenda commands): Document clock consistency checks.
* doc/orgcard.tex: Document key for clock consistency check.
2011-04-24 17:17:25 +02:00
Nicolas Goaziou 7327b483f1 org-list: small docstring fix 2011-04-24 11:25:40 +02:00
Nicolas Goaziou fc91845fa5 org-list: fix bug with structure and blocks/drawers indentation
* lisp/org-list.el (org-list-struct): when walking down the list, the
  function would not pay attention to drawers or blocks indentation.
  Thus, such constructs couldn't consistently end an item or a list.
  This patch ensures line indentation is stored (if applicable) before
  skipping them. Also fixed doc-string and comments.
2011-04-24 11:23:01 +02:00
Carsten Dominik e7217a74e9 Export: Add EXPORT_FILE_NAME to the enclosing tree properties
* lisp/org-exp.el (org-export): Add EXPORT_FILE_NAME to the enclosing
tree properties
2011-04-22 11:23:18 +02:00
Carsten Dominik a20eebd73f Another fix for exporting enclosing class/title piece in buffer
* lisp/org-exp.el (org-export): Define a bound for finding enclosing
tree with class/title definition.
2011-04-21 18:03:05 +02:00
Carsten Dominik b7e3d7d90b Make exporting the enclosing entry with CLASS/TITLE property work better
* lisp/org-exp.el (org-export): Go to next heading before searching
backward, so make this also work if we are on the headline of the
entry with the property...
2011-04-21 17:55:18 +02:00
Carsten Dominik 2985816e25 Postfix to the previous patch, changing after-change-functions for demotion
* lisp/org.el (org-promote):
(org-demote): Soften the previous change, by only removing the
flyspell function from after-change functions, because that was the
one causing the slowdown - at least much of it.
2011-04-21 17:01:39 +02:00
Eric Schulte 6660a51e07 Speed up promotion and demotion by turning off after-change-functions
* lisp/org.el (org-promote):
(org-demote): Turn off after-change-functions to speed up the
reindentation of text.

This is mainly toob-oz: brought up to date with the rest of Babel
2011-04-21 16:49:41 +02:00
Eric Schulte 9a863dda84 Merge branch 'master' of orgmode.org:org-mode 2011-04-19 09:44:32 -06:00
Eric Schulte 892b66f062 ob-ocaml: updated to use the new script-escape function
* lisp/ob-ocaml.el (org-babel-ocaml-read-list): Using
  `org-babel-script-escape'.
  (org-babel-ocaml-read-array): Using `org-babel-script-escape'.
2011-04-19 09:43:34 -06:00
Manuel Giraud 2f50b1380b * org-html.el (org-html-handle-links): add an alternate for inline images 2011-04-19 11:22:20 +02:00
Carsten Dominik c9958a3999 Fix agenda bulk commands
* lisp/org-agenda.el (org-agenda-bulk-action): Do not use the entries
variable before it is defined
2011-04-16 18:05:51 +02:00
Carsten Dominik c2c28fc942 Merge branch 'master' of orgmode.org:org-mode 2011-04-15 22:31:11 +02:00
Eric Schulte 1997e19bd5 org-src-lang-modes: added alias "C" to "c"
* lisp/org-src.el (org-src-lang-modes): Added a language alias of "C"
  to "c".
2011-04-15 10:16:52 -06:00
Shaun Johnson de63411264 Babel: Stop tangling failing in an indirect buffer
* ob-tangle.el (org-babel-tangle): Make it work in an indirect buffer.

The problem was that the message generated after tangling included the
file name of the current buffer which was nil in an indirect buffer.

TINYCHANGE
2011-04-15 09:55:22 -06:00
Manuel Giraud c56bf33812 HTML export: correct a bug in coderef link.
* org-html.el (org-html-make-link): correct a bug in coderef link.
2011-04-15 13:58:29 +02:00
Bernt Hansen 4262dc1cbc Fix typo in agenda local variable
* lisp/org-agenda.el (org-agenda-filter-by-tag): Fix variable name typo

maybe-reftresh -> maybe-refresh
2011-04-15 13:56:12 +02:00
Bernt Hansen 383cb5dcaa Fix agenda display when headlines are missing
* lisp/org-agenda.el (org-agenda-get-timestamps): Fix agenda display when headlines are missing

The following entry breaks the agenda display.

,----
| ****
|         :PROPERTIES:
|         :DateCreated: <2011-04-13 Mi 10:00>
|         :END:
|
| [[gnus:nntp%2BGwene:gwene.org.emacsen.planet][gnus:nntp+Gwene:gwene.org.emacsen.planet]]
`----

Provide the empty string as the headline if the search for the
headline returns nil.  org-format-agenda-items requires a string for
the headline parameter.
2011-04-15 13:55:01 +02:00
Bastien Guerry 1bc0623be2 org mobile - call pre hooks earlier
* lisp/org-mobile.el (org-mobile-push): Move call to hook, make it the
first thing of the push operation.
2011-04-15 13:53:10 +02:00
Eric Schulte 60864e851b ob: now looking for header arguments in #+Properties: as well as #+Babel:
* lisp/ob.el (org-babel-params-from-buffer): Now looking for header
  arguments in #+Properties: as well as #+Babel:.  Also, we're no
  longer caching these results into a file local variable.
2011-04-14 20:37:21 -06:00
Eric Schulte 28b325fa1e ob-python: in the case of ":results output table" results can be parsed as a table
* lisp/ob-python.el (org-babel-python-evaluate-external-process):
  Allow parsing as a table in the case of ":results output table".
  (org-babel-python-evaluate-session):   Allow parsing as a table in
  the case of ":results output table".
2011-04-14 20:24:10 -06:00
Carsten Dominik e20166eb29 Fix the bulk scatter command to always schedule
* lisp/org-agenda.el (org-agenda-bulk-action): Allow bulk scatter
in all possible agenda views.  Use `org-agenda-schedule' instead of
`org-agenda-date-later'.

The bulk scatter command so far shifted the date that was causing an
entry to appear in the agenda.  However, the true intend was to
reschedule onto dates in the near future.  This patch fixes this
issue.  A side effect is that you can now bulk scatter tasks that to
not yet have a date, for example also tasks picked from the TODO
list.
2011-04-14 00:10:56 +02:00
Eric Schulte 2c8e964b70 ob-emacs-lisp: now supports :results output
* lisp/ob-emacs-lisp.el (org-babel-execute:emacs-lisp): Now supports
  ":results output".
2011-04-10 16:29:14 -06:00
Julien Danjou 92b603c892 org: clean property entries matching
* lisp/org.el (org-entry-get):
(org-entry-delete):
(org-entry-put):
(org-property-values):
(org-delete-property-globally): Use org-re-property.
(org-re-property): New function allowing to build a regexp to match a
property.

Signed-off-by: Julien Danjou <julien@danjou.info>
2011-04-09 18:53:07 +02:00
Julien Danjou c9c5da9191 org: enhance docstring for org-property-values
* lisp/org.el (org-property-values): Enhance docstring.

Signed-off-by: Julien Danjou <julien@danjou.info>
2011-04-09 18:53:07 +02:00
Ethan Ligon 49e6bc8997 Fix for html & docbook export of description list items
The problem is illustrated by the following example:

* Illustration of bug in html export
  - This has a space after the colons :: so will work in latex and html
  - This doesn't have a space after the colons ::so is an invalid
    description item according to the org manual.  Won't work in html
    or docbook.  Will nevertheless work in latex, provided /first/
    description item is valid.
  - Has a terminating space ::
    - So it works in both html and latex export!
    - Even though it's difficult to distinguish from the next example.
  - Lacks a terminating space ::
    - At present, *doesn't* work in html or docbook export, does in
      latex.  This is the case that the following patch fixes.
2011-04-09 18:40:45 +02:00
Bastien Guerry 098ef03fa9 Minor cleanup. 2011-04-09 16:20:46 +02:00
Nicolas Goaziou a7a4693f66 org-list: don't forget to allow alphabetical counters 2011-04-09 16:09:32 +02:00
Julien Danjou 5c5468dc60 org-table: use point-min instead of 1
* lisp/org-table.el (org-table-cleanup-narrow-column-properties): Use
point-min rather than 1 when moving in the buffer.

Signed-off-by: Julien Danjou <julien@danjou.info>
2011-04-09 14:46:45 +02:00
Nicolas Goaziou abad1b4994 Auto-fill shouldn't insert new items
* lisp/org-list.el (org-list-in-valid-context-p): renamed from
  org-list-in-valid-block-p.
  (org-at-item-p,org-list-search-generic): use renamed function.

* lisp/org.el (org-fill-item-nobreak-p): new function.
  (org-set-autofill-regexps): modify `fill-nobreak-predicate' to
  prevent auto-fill from breaking line just before an item regexp.
2011-04-09 13:20:37 +02:00
Nicolas Goaziou 9a8dab1436 Correctly fontify description items
* lisp/org.el (org-set-font-lock-defaults): Be more strict when
  recognizing description items, and do not fontify wrong cases like:
  "- term ::description" or "1. term :: description"
2011-04-09 13:18:13 +02:00
Nicolas Goaziou 5efc6f5fc4 org-latex: fix footnotes wrt lists and links
* lisp/org-latex.el: pay attention to end of footnote. Before closing
  the command, ensure that list is properly closed or that last link
  is separated from the curly brace.
2011-04-09 11:57:12 +02:00
Nicolas Goaziou a1458ba5ec Don't indent footnote definitions
* lisp/org.el (org-indent-line-function): footnote definition must
  stay at column 0 to be recognized as such. Body below can have
  normal indentation, so it should ignore its definition when
  computing indentation.
2011-04-09 11:50:59 +02:00
Bastien Guerry b20bb56ba9 * org-agenda.el (org-agenda-start-day): Minor docstring update. 2011-04-08 18:48:08 +02:00
Bastien Guerry 9a0645bcfd org-protocol.el: more appropriate message when capture is done.
* org-protocol.el (org-protocol-remember)
(org-protocol-capture): More appropriate message.
2011-04-08 18:18:02 +02:00
Bastien Guerry 8cf35f0ab1 org-capture.el: Fix bugs about handling the :clock-keep parameter.
* org-capture.el (org-capture-clock-keep): New local variable.
(org-capture, org-capture-finalize): Use it and fix a bug when
:clock-keep is set to `t'.
2011-04-08 18:04:47 +02:00
Carsten Dominik a0a526bc3e Export: handle include files before processing macros.
* lisp/org-exp.el (org-export-preprocess-string): Handle include files
before processing macros.

Patch by Benny Simonsen.  TINYCHANGE
2011-04-08 12:35:37 +02:00
Bernt Hansen 770c2ddfba Remove obsolete functionality to add todo list in front of agenda
* lisp/org-agenda.el: Remove obsolete code for adding todo list in front
of the agenda

Todo lists should be built with the TODO list or a block agenda instead.

This code was triggered for C-u R in block agendas which is used to
limit the clock report to the current tags filter applied to the
agenda.
2011-04-08 12:27:27 +02:00
Lawrence Mitchell 44bb6ef974 org-latex: Fix export of table.el tables with captions
* lisp/org-latex.el (org-export-latex-convert-table.el-table): Fix
format-string for insertion of captions.

This fixes a bug introduced in caa5da1 since when the caption itself
is not placed inside the caption command.
2011-04-08 12:16:27 +02:00
Nick Dokos 9e15cf4fc2 Fix begin/end comment
* lisp/org-exp.el (org-export-remove-comment-blocks-and-subtrees): Fix regexp.

Rasmus <rasmus.pank@gmail.com> wrote:

> Hi,
> It seems that
>
> ,----
> | #+BEGIN_COMMENT
> |  ...
> | #+END_COMMENT
> `----
>
> Might be broken in Org-mode 7.5. According to the manual,
>
> ,----
> | Finally, regions surrounded by
> |  #+BEGIN_COMMENT  ...  #+END_COMMENT  will not be exported.
> `----
>
> Consider the following example generated with Org-mode 7.5 in Emacs 24.0.50
> (started without config files).
>
> ,----
> | #+TITLE: this is a test
> |
> | #+BEGIN_COMMENT
> | Don't export me
> | #+END_COMMENT
> |
> | I'd like to be exposed
> `----
>
> The HTML export is:
>
> ,----
> | <snip>
> | <h1 class="title">this is a test</h1>
> |
> | <div class="org-comment">
> | </br>
> | <p>
> | <p>
> | Don't export me
> | </p>
> | </div>
> |
> | I'd like to be exposed
> | <snip>
> `----
>
> The LaTeX export is:
>
> ,----
> | \begin{verbatim}
> | Don't export me
> | \end{verbatim}
> | I'd like to be exposed
> `----
>

Indeed.

It seems that one of the hair-raising regexps that Carsten manages
to come up with is not quite right. Try this patch for now:

--8<---------------cut here---------------start------------->8---
--8<---------------cut here---------------end--------------->8---

Nick
2011-04-08 12:10:32 +02:00
Carsten Dominik cd806a5d0d Help matching dotted European dates, like 31. 12. 2007
* lisp/org.el (org-read-date-analyze): Help matching dotted European
dates, like 31. 12. 2007

Patch by Jan Seeger.
TINYCHANGE
2011-04-08 12:06:51 +02:00
Eric Schulte 4036da1986 ob-lisp: fixed bug in recent commit
* lisp/ob-lisp.el (org-babel-execute:lisp): Fix typo.
2011-04-07 12:51:12 -06:00
Eric Schulte fa9464ede2 ob-lisp: turning vector results into lists for easy elisp reading
* lisp/ob-lisp.el (org-babel-execute:lisp): Turn vectors into lists
  before reading by elisp
  (org-bable-lisp-vector-to-list): Stub of a vector->list function,
  should be replaced with a cl-vector->el-vector function.
2011-04-07 12:31:10 -06:00