org-mode/lisp
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
..
ob-C.el ob-C: more generous regular expression for matching main call 2010-07-25 12:32:48 -06:00
ob-R.el babel: R: Refactor evaluation code 2010-08-18 20:20:54 -04:00
ob-asymptote.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
ob-clojure.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
ob-comint.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
ob-css.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
ob-ditaa.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
ob-dot.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
ob-emacs-lisp.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
ob-eval.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
ob-exp.el babel: Fix bug in export of #+lob/#+call lines 2010-08-19 09:30:40 -04:00
ob-gnuplot.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
ob-haskell.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
ob-keys.el Make language major mode commands available at Org code blocks. 2010-08-17 17:46:04 -04:00
ob-latex.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
ob-ledger.el ob-ledger: Babel support for the ledger accounting system 2010-07-23 09:23:44 -07:00
ob-lisp.el ob-lisp: initial support for lisp code blocks 2010-08-03 09:09:11 -06:00
ob-lob.el babel: edit docstring 2010-08-19 09:31:19 -04:00
ob-matlab.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
ob-mscgen.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
ob-ocaml.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
ob-octave.el babel: octave/matlab: use dlmwrite to write delimited text 2010-08-03 23:54:24 -04:00
ob-perl.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
ob-python.el babel: python: use eq instead of equal 2010-08-16 11:09:20 -04:00
ob-ref.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
ob-ruby.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
ob-sass.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
ob-screen.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
ob-sh.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
ob-sql.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
ob-sqlite.el ob-sqlite: now inserts string arguments w/o quotes 2010-07-28 07:31:39 -06:00
ob-table.el ob-table: babel scripts called from tables can accept ranges 2010-07-21 16:11:49 -07:00
ob-tangle.el Use integer syntax for the MODE argument to #'set-file-modes 2010-08-23 12:00:01 +02:00
ob.el babel: refactor `org-babel-switch-to-session' 2010-08-18 15:13:57 -04:00
org-agenda.el Fix code typo 2010-08-21 08:37:11 +02:00
org-archive.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
org-ascii.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
org-attach.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
org-bbdb.el org-bbdb: Ignore case in anniv class string. 2010-08-12 11:03:07 +02:00
org-beamer.el Revert "Search for LaTeX setup case-insensitively" 2010-08-20 18:24:09 +02:00
org-bibtex.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
org-capture.el org-capture + autoload 2010-08-20 10:01:50 +02:00
org-clock.el Bugfix in org-clock-set-current. 2010-08-13 10:36:16 +02:00
org-colview-xemacs.el Estimate ranges in column view 2010-07-19 13:56:17 +02:00
org-colview.el Bug in org-colview/org-beamer? 2010-07-31 12:48:15 +02:00
org-compat.el Do not use looking-at-p when it does not exist 2010-08-17 06:32:55 +02:00
org-crypt.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
org-ctags.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
org-datetree.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
org-docbook.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
org-docview.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
org-entities.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
org-exp-blocks.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
org-exp.el Remove impact of case-fold-search on LaTeX class setup 2010-08-20 08:39:55 +02:00
org-faces.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
org-feed.el Decode entry according to its character encoding 2010-08-18 21:04:04 +02:00
org-footnote.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
org-freemind.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
org-gnus.el Revert Tassilo's patch for org-gnus.el as it is not finished yet. 2010-08-01 01:46:19 +02:00
org-habit.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
org-html.el Implement MathJax support 2010-08-13 14:22:16 +02:00
org-icalendar.el iCalendar export: Implement alarms 2010-07-21 09:47:57 +02:00
org-id.el Autoload org-id-store-link 2010-07-21 18:37:34 +02:00
org-indent.el Fix org-indent-mode message when mode is refused 2010-08-09 21:52:33 +02:00
org-info.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
org-inlinetask.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
org-irc.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
org-jsinfo.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
org-latex.el Revert "Search for LaTeX setup case-insensitively" 2010-08-20 18:24:09 +02:00
org-list.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
org-mac-message.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
org-macs.el Make org-capture use `org-default-notes-file' if the file is not specified 2010-07-20 09:05:31 +02:00
org-mew.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
org-mhe.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
org-mks.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
org-mobile.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
org-mouse.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
org-plot.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
org-protocol.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
org-publish.el Fix interpretation of the :include property as a list of file names 2010-08-16 17:27:25 +02:00
org-remember.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
org-rmail.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
org-src.el Avoid error and unnecessary message in transient use of code edit buffer 2010-08-17 23:40:53 -04:00
org-table.el Align table before converting it to a table.el table 2010-08-18 08:35:15 +02:00
org-taskjuggler.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
org-timer.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
org-vm.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
org-w3m.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
org-wl.el Provide link property for message-id without angle brackets 2010-07-31 09:47:33 +02:00
org-xoxo.el Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
org.el org-store-link: Fix storing of links to headlines in indirect buffers 2010-08-23 12:14:20 +02:00