emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Replacement for org-make-link


From: Karl Voit
Subject: [O] Replacement for org-make-link
Date: Mon, 20 Aug 2012 19:03:38 +0200
User-agent: slrn/0.9.9 (Linux)

Hi!

http://orgmode.org/Changes.html tells me that org-make-link has been
deleted.

I am using following lines to add links to references I manage using
Org-mode: (from [1])

,----
| (defun org-ref-complete-link (&optional arg)
|   "Create a reference link using completion."
|   (let (file link)
|        (setq file (read-file-name "ref: " "~/archive/papers_from_web/"))
|        (let ((pwd (file-name-as-directory (expand-file-name ".")))
|          (pwd1 (file-name-as-directory (abbreviate-file-name
|                         (expand-file-name ".")))))
|          (setq file (string-replace "~/archive/papers_from_web/" "" file))
|          (setq file (string-replace pwd "" (string-replace pwd1 "" file)))
|          (setq file (string-replace ".bib" "" file))
|          (setq file (string-replace ".pdf" "" file))
|          (setq link (org-make-link "ref:" file)))
|     link))
`----

Can somebody with more knowledge than me suggest, what I should do
instead?

Thanks!


  1. 
http://draketo.de/light/english/free-software/custom-link-completion-org-mode-25-lines-emacs
-- 
Karl Voit




reply via email to

[Prev in Thread] Current Thread [Next in Thread]