Commit Graph

5930 Commits

Author SHA1 Message Date
Jambunathan K 784e5f1488 org-store-link: Fix storing of links to headlines in indirect buffers
* org.el (org-store-link): Storing of links to headlines in indirect
buffers was broken.  Fix it.

TINYCHANGE
Summary:

> When org-store-link is invoked on a headline in indirect buffer (as in a
> capture buffer), hyperlink gets created to the file and NOT the
> headline. This is a bug.
>
> The attached patch fixes this.
>
> Setup:
>
> # ~/.emacs
>
> (defun my-conversation-id ()
>   (interactive)
>
>   (remove-hook 'org-capture-before-finalize-hook 'my-conversation-id)
>
>   (let ((org-link-to-org-use-id t))
>     (call-interactively 'org-store-link)
>     )
>   )
>
> # org-capture-templates
>
>  ("x" "Conversations" entry
>   (file+headline "~/conversation.org" "Conversations")
>   "%(progn (add-hook 'org-capture-before-finalize-hook 'my-conversation-id) \"\")** Note taken on %U\n   %?  " :prepend t :empty-lines 1)
>
> Steps for reproduction:
>
> Trigger org-capture for the above capture entry.
>
> Examine conversation.org before/after the patch is applied. Note the
> absence/presence of IDs for the captured entry.
>
> Check for the stored links using C-c C-l. Note the file/headline links.
>
> # file conversation.org before and after the patch
>
> * Conversations
>
> ** Note taken on [2010-08-23 Mon 04:33]
>    :PROPERTIES:
>    :ID:       7e1974a6-8fa1-43cf-bef3-2adf37d99130
>    :END:
>
> ** Note taken on [2010-08-23 Mon 04:32]
>
> # (org-insert-link) showing stored links before and after the patch
>
> file:~/conversation.org (file:~/conversation.org)
> id:7e1974a6-8fa1-43cf-bef3-2adf37d99130 (Note taken on [2010-08-23 Mon 04:33])
>
2010-08-23 12:14:20 +02:00
Aidan Kehoe 9afcc02588 Use integer syntax for the MODE argument to #'set-file-modes
Hello!

We need this change to get org-mode compiling with recent XEmacs 21.5. On
previous 21.5 and current 21.4, the problem manifests itself at runtime, not
compile time, like so:

  (set-file-modes "/tmp/aidan/foo.el" ?\755)
  => Wrong type argument: integerp, ?í

One old reason to go for the ?\755 syntax instead of the #o755 syntax under
GNU Emacs was to be that older versions of GNU Emacs didn’t support #o755,
but, to my knowledge, every released GNU Emacs since March 2000 has
supported the latter syntax.

Best,

Aidan Kehoe, the XEmacs project.

ChangeLog addition:

2010-08-21  Aidan Kehoe  <kehoea@parhasard.net>

	* ob-tangle.el (org-babel-tangle): Change the MODE argument to
	#'set-file-modes to use integer, not character syntax, avoiding
	compile problems with recent XEmacs.
2010-08-23 12:00:01 +02:00
Carsten Dominik a7660225af Fix code typo 2010-08-21 08:37:11 +02:00
Carsten Dominik 96bacc020b Fix adding context lines in agenda
* lisp/org-agenda.el (org-agenda-add-entry-text): Make sure we move
forward even if there is no text to be added.

Adding entry text with org-agenda-add-entry-text-maxlines greater than
0 could result in an infinite loop.
2010-08-21 07:09:20 +02:00
Robert P. Goldman e50657d7cb Added a call to insert any bodynewline-paragraph value before the start of a line item. 2010-08-21 05:11:02 +02:00
Robert P. Goldman ee736317cb Add a test code file. 2010-08-21 05:10:46 +02:00
Robert P. Goldman 06034b9813 Expanded docstring for org-emph-re 2010-08-21 05:10:34 +02:00
Robert P. Goldman e439e4da27 Substantially improved org-export-generic-fontify based on help from Carsten. 2010-08-21 05:10:28 +02:00
Robert P. Goldman daa6f98cab Partial solution to the fontification problem. Having some trouble with the MATCH-STRING calls, but mostly ok. 2010-08-21 05:10:20 +02:00
Robert P. Goldman dedea0721c Make newline-handling more flexible (per WH), declare keywords.
Followed Wes Hardaker's suggestion to make the translation of
newlines more flexible --- instead of making a boolean for
special translation of blank lines, I added the ability to
specify the translation.

Also added a macro for declaring generic translation keywords
with type information and documentation.  Hope this will make
the generic translator easier to use.
2010-08-21 05:10:11 +02:00
Robert P. Goldman adf2e016e0 Revision to handling of blank lines. Start of declaration protocol.
Followed Wes Hardaker's idea of permitting alternative rewrites for blank
lines, instead of making the blank line handler be a boolean and
hard-wiring a newline character.

Also added a declaration form, with type and documentation options, for the
keywords used in defining a generic export method.
2010-08-21 05:09:58 +02:00
Carsten Dominik 557ce7c01c Revert "Search for LaTeX setup case-insensitively"
This reverts commit 034dbac3ee.
2010-08-20 18:24:09 +02:00
Carsten Dominik 4a028cc7c0 Add org-static-mathjax to the contrib directory
Thanks to Jan Bker for this contribution.
2010-08-20 18:12:59 +02:00
Carsten Dominik 190e88cfc9 Remove the special noutline.el file for XEmacs
The latest XEmacs package release does now contain a modern version of
outline.el, put there by Michael Sperber.

* Makefile: Remove targets related to noutline.el.
* README: Remove the entry for the xemacs directory.
* README_DIST: Remove the entry for the xemacs directory.
* doc/org.texi (Installation): Remove the special installation
instructions for XEmacs.
* lisp/org.el (outline): Remove special code to load noutline.el
for XEmacs.
* xemacs/README: File removed.
* xemacs/noutline.el: File removed.
* xemacs/ps-print-invisible.el: File removed.
2010-08-20 14:19:29 +02:00
Carsten Dominik 838cb818de Show command names in manual
First batch, largely from Andreas Rhler
2010-08-20 13:09:05 +02:00
Magnus Henoch bf0d8c5a0e org-capture + autoload
Jambunathan K <kjambunathan@gmail.com> writes:

> It would be convenient if I could do a
>
> M-x customize-group org-capture and/or
> M-x customize-variable org-capture-templates
>
> without having triggered a prior org-capture.
>
> For now, I trigger a capture, abort it and then proceed ahead with
> customizing these.

Here is a patch that adds an "autoload cookie" for
org-capture-templates.  After recompiling, org-install.el should contain
an autoload declaration for org-capture-templates.

Let's see if the patch tracker likes me :)

Magnus
2010-08-20 10:01:50 +02:00
Carsten Dominik 19b0e03f32 Make backslash escape "-" in property matches
* lisp/org.el (org-make-tags-matcher): Read "\\-" as "-" in
the tags/property matcher.

Ilya Shlyakhter writes:

> When doing an agenda tags match for tags or properties with dashes in
> their name, the dashes become negation operators: "my-prop>0" means
> "entries that have the tag 'my' and do not have a positive property
> 'prop'", rather than "entries that have a positive property
> 'my-prop'".  Is there a way to escape the dashes to get the latter
> meaning?
2010-08-20 09:26:08 +02:00
Carsten Dominik 294d398544 Remove impact of case-fold-search on LaTeX class setup
* lisp/org-exp.el (org-infile-export-plist): Bind case-fold-search to t.
2010-08-20 08:39:55 +02:00
Carsten Dominik 6f61135c84 New macro
* lisp/org-agenda.el (org-agenda-with-point-at-orig-entry): New macro.
2010-08-20 08:32:31 +02:00
Carsten Dominik 034dbac3ee Search for LaTeX setup case-insensitively
* lisp/org-latex.el (org-export-latex-set-initial-vars): Bind
`case-fold-search' to t around the search for special LaTeX setup.
* lisp/org-beamer.el (org-beamer-after-initial-vars):  Bind
`case-fold-search' to t around the search for special BEAMER setup.
2010-08-19 23:17:24 +02:00
Carsten Dominik 72a4aeebd3 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-08-19 22:23:18 +02:00
David Maus 6d9fcf8ff4 Delete postscript file after creating conversion to pdf
* org-agenda.el (org-write-agenda): Delete postscript file after
creating conversion to pdf.
2010-08-19 21:54:12 +02:00
David Maus 768d88acc3 Move require statements to proper place in evaluated lisp expression
* org-agenda.el (org-write-agenda): Move require statements to proper
place in evaluated lisp expression.
2010-08-19 21:52:18 +02:00
David Maus cc5b21e2cb Rename temporary buffer to remove dependency of `flet' macro
* org-agenda.el (org-write-agenda): Rename temporary buffer to remove
dependency of `flet' macro.
2010-08-19 21:37:19 +02:00
Dan Davison 7befdf8a00 babel: edit docstring
* ob-lob.el (org-babel-lob-get-info): Edit docstring
2010-08-19 09:31:19 -04:00
Dan Davison c11106a3e5 babel: Fix bug in export of #+lob/#+call lines
* ob-exp.el (org-babel-exp-lob-one-liners): Get parameter
	values from all standard sources when executing #+lob/#+call
	lines
2010-08-19 09:30:40 -04:00
Dan Davison bf64d25744 babel: R: Refactor evaluation code
* ob-R.el (org-babel-R-evaluate): Break the two branches into
    two separate functions
    (org-babel-R-evaluate-external-process): New function to
    handle external process evaluation
    (org-babel-R-evaluate-session): New function to handle session
    evaluation
2010-08-18 20:20:54 -04:00
Dan Davison 66ca61126c Merge branch 'master' of git://repo.or.cz/org-mode 2010-08-18 15:15:13 -04:00
Dan Davison 23ab61d93c babel: refactor `org-babel-switch-to-session'
* ob.el (org-babel-initiate-session): new function derived
    from previous `org-babel-switch-to-session'
    (org-babel-switch-to-session): refactored to use new
    `org-babel-initiate-session'

This breaks the original `org-babel-switch-to-session' into a new
function `org-babel-initiate-session' and
`org-babel-switch-to-session'.
2010-08-18 15:13:57 -04:00
Dan Davison ad7d9c43c8 babel: Fix prefix version of `org-babel-switch-to-session'
* ob.el (org-babel-switch-to-session): Supply missing "P"
	argument to (interactive)
2010-08-18 15:13:55 -04:00
David Maus d6868e1602 Decode entry according to its character encoding
* org-feed.el (org-feed-format-entry): Decode entry according to its
character encoding.

Feed entries may contain raw unicode characters that must be converted
to utf-8 before they can be properly inserted in the target buffer.
2010-08-18 21:04:04 +02:00
David Maus 7cbc7a67d4 org-feed: Use `xml-substitute-special' for unescaping XML entities.
* org-feed.el (xml-substitute-special): Declare function for byte
compiler.
(org-feed-unescape): Removed.
(org-feed-parse-rss-entry, org-feed-parse-atom-entry): Use
`xml-substitute-special' to unescape XML entities.

TINYCHANGE

Patch by Michael Brand
2010-08-18 20:49:54 +02:00
Dan Davison ed62a85bf7 babel: Throw error on `org-babel-switch-to-session' when :session not in effect
* ob.el (org-babel-switch-to-session): Throw error if block if
    :session not in effect for the block
2010-08-18 13:55:36 -04:00
Carsten Dominik fbc0ce10de Keep compiler happy 2010-08-18 08:41:29 +02:00
Carsten Dominik ce58d6dd0a Align table before converting it to a table.el table
* lisp/org-table.el (org-table-create-with-table.el): Align table
before converting.
2010-08-18 08:35:15 +02:00
Dan Davison 4ac8294020 Avoid error and unnecessary message in transient use of code edit buffer
* ob.el (org-babel-do-in-edit-buffer): Suppress message and
	check that org-src buffer is current before attempting exit

	* org-src.el (org-edit-src-code): New argument quietlyp allows
	message to be suppressed
2010-08-17 23:40:53 -04:00
Dan Davison 76790e1aa8 Get rid of some compiler warnings.
* org-src.el (ob-comint): require 'ob-comint
	(org-src-babel-info): define variable

Also, reposition `org-src-do-at-code-block' and
`org-src-do-key-sequence-at-code-block' function definitions within
the file.
2010-08-17 22:37:19 -04:00
Dan Davison f9cecd192d Make language major mode commands available at Org code blocks.
* ob.el (org-babel-do-in-edit-buffer): New macro to
    evaluate lisp in the language major mode edit buffer.
    (org-babel-do-key-sequence-in-edit-buffer): New function to call
    an arbitrary key sequence in the language major mode edit
    buffer
    * org-src.el (org-src-switch-to-buffer): Add new allowed value
    'switch-invisibly for `org-src-window-setup'.

    * ob-keys.el (org-babel-key-bindings): Bind
    `org-babel-do-key-sequence-in-edit-buffer' to x and C-x in
    `org-babel-map'
2010-08-17 17:46:04 -04:00
Dan Davison 441288ee72 Make Org-babel commands available in code edit buffers
* org-src.el (ob-keys): Require ob-keys, because
    `org-babel-map' is used.
    (org-src-do-at-code-block): New macro to evaluate lisp with
    point at the start of the Org code block containing the code
    in this edit buffer.
    (org-src-do-key-sequence-at-code-block): New function to
    execute command bound to key at the Org code block containing
    the code in this edit buffer.
2010-08-17 17:45:47 -04:00
Dan Davison a4c8bcd31b babel: implement association of R code buffers with R session
* ob-R.el (org-babel-R-associate-session): New function
    to associate R code edit buffers with ESS comint session.
2010-08-17 17:32:23 -04:00
Dan Davison b61e0c4dfc Associate code edit buffer with babel comint session, if one exists.
* org-src.el (org-edit-src-code): If at src block, store babel
	info as buffer local variable.
	(org-src-associate-babel-session): New function to associate
	code edit buffer with comint session. Does nothing
	unless a language-specific function named
	`org-babel-LANG-associate-session' exists.
	(org-src-babel-configure-edit-buffer): New function to be
	called in `org-src-mode-hook'.
	(org-src-mode-hook): add `org-src-babel-configure-edit-buffer'
	to hook.
2010-08-17 17:32:23 -04:00
Dan Davison b05f8c91fe babel: new function `org-babel-switch-to-session-with-code'
* ob.el (org-babel-switch-to-session-with-code): new function
    to generate split frame displaying edit buffer and session.

    * ob-keys.el (org-babel-key-bindings): binding for
    `org-babel-switch-to-session-with-code'
2010-08-17 17:32:23 -04:00
Dan Davison cbe5089e0f Merge branch 'master' of git://repo.or.cz/org-mode 2010-08-17 17:32:11 -04:00
Bastien Guerry 7cc0612e62 org-agenda-clock-out: remove unnecessary "P" in (interactive). 2010-08-17 18:47:57 +02:00
Dan Davison 7917e8ea29 Merge branch 'master' of git://repo.or.cz/org-mode 2010-08-17 11:29:21 -04:00
Bastien Guerry 8e1287c389 ORGWEBPAGE: document that org-latest.* archives are updated each day. 2010-08-17 12:43:56 +02:00
Carsten Dominik 4ea5658a1a Add org-drill.el 2010-08-17 10:40:14 +02:00
Andreas Röhler d2640d324b gitignore patch
Hi,

consider these endings ignored by default useful too.
BTW re-sorted, doubled *.dvi-entry removed.

Cheers,

Andreas
2010-08-17 09:54:21 +02:00
Carsten Dominik bf3405a6ba Fix tags column for the case when org-indent-mode is active
* lisp/org.el (org-set-tags): Consider org-indent-mode when computing the
tags column.
2010-08-17 08:34:21 +02:00
Carsten Dominik 17ace08e0f Do not use looking-at-p when it does not exist
* lisp/org-compat.el (org-looking-at-p): Only use looking-at-p when defined.
2010-08-17 06:32:55 +02:00