summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2012-08-03 19:03:21 +0200
committerBastien Guerry <bzg@altern.org>2012-08-03 19:03:21 +0200
commit96551f3dd8885dee6972c70ce06888fd3d5f4dd4 (patch)
tree75a01e4548d5ff0dcea75e8801813d9b4dcd10e8
parent341042a09ef74a4b469f57d5c9cf0ddbd43f345a (diff)
downloadorg-mode-96551f3dd8885dee6972c70ce06888fd3d5f4dd4.tar.gz
Delete `org-make-link' and replace previous occurrences by `concat'.
* org.el (org-make-link): Delete. (org-store-link, org-insert-link) (org-file-complete-link): Don't use `org-make-link'. * org-wl.el (org-wl-store-link-folder) (org-wl-store-link-message): Ditto. * org-vm.el (org-vm-store-link): Ditto. * org-rmail.el (org-rmail-store-link): Ditto. * org-mhe.el (org-mhe-store-link): Ditto. * org-mew.el (org-mew-store-link): Ditto. * org-irc.el (org-irc-erc-store-link): Ditto. * org-info.el (org-info-store-link): Ditto. * org-id.el (org-id-store-link): Ditto. * org-gnus.el (org-gnus-group-link, org-gnus-article-link): Ditto. * org-eshell.el (org-eshell-store-link): Ditto. * org-bbdb.el (org-bbdb-store-link): Ditto.
-rw-r--r--lisp/org-bbdb.el2
-rw-r--r--lisp/org-eshell.el2
-rw-r--r--lisp/org-gnus.el6
-rw-r--r--lisp/org-id.el2
-rw-r--r--lisp/org-info.el2
-rw-r--r--lisp/org-irc.el2
-rw-r--r--lisp/org-mew.el3
-rw-r--r--lisp/org-mhe.el2
-rw-r--r--lisp/org-rmail.el2
-rw-r--r--lisp/org-vm.el2
-rw-r--r--lisp/org-wl.el4
-rw-r--r--lisp/org.el28
12 files changed, 26 insertions, 31 deletions
diff --git a/lisp/org-bbdb.el b/lisp/org-bbdb.el
index f30557e..a1ad606 100644
--- a/lisp/org-bbdb.el
+++ b/lisp/org-bbdb.el
@@ -207,7 +207,7 @@ date year)."
(company (if (fboundp 'bbdb-record-getprop)
(bbdb-record-getprop rec 'company)
(car (bbdb-record-get-field rec 'organization))))
- (link (org-make-link "bbdb:" name)))
+ (link (concat "bbdb:" name)))
(org-store-link-props :type "bbdb" :name name :company company
:link link :description name)
link)))
diff --git a/lisp/org-eshell.el b/lisp/org-eshell.el
index f572095..1765cfd 100644
--- a/lisp/org-eshell.el
+++ b/lisp/org-eshell.el
@@ -57,7 +57,7 @@
(let* ((command (concat "cd " dired-directory))
(link (concat (buffer-name) ":" command)))
(org-store-link-props
- :link (org-make-link "eshell:" link)
+ :link (concat "eshell:" link)
:description command))))
(provide 'org-eshell)
diff --git a/lisp/org-gnus.el b/lisp/org-gnus.el
index 50d91be..a63568c 100644
--- a/lisp/org-gnus.el
+++ b/lisp/org-gnus.el
@@ -100,11 +100,11 @@ If `org-store-link' was called with a prefix arg the meaning of
(if (and (string-match "^nntp" group) ;; Only for nntp groups
(org-xor current-prefix-arg
org-gnus-prefer-web-links))
- (org-make-link (if (string-match "gmane" unprefixed-group)
+ (concat (if (string-match "gmane" unprefixed-group)
"http://news.gmane.org/"
"http://groups.google.com/group/")
unprefixed-group)
- (org-make-link "gnus:" group))))
+ (concat "gnus:" group))))
(defun org-gnus-article-link (group newsgroups message-id x-no-archive)
"Create a link to a Gnus article.
@@ -125,7 +125,7 @@ If `org-store-link' was called with a prefix arg the meaning of
"http://mid.gmane.org/%s"
"http://groups.google.com/groups/search?as_umsgid=%s")
(org-fixup-message-id-for-http message-id))
- (org-make-link "gnus:" group "#" message-id)))
+ (concat "gnus:" group "#" message-id)))
(defun org-gnus-store-link ()
"Store a link to a Gnus folder or message."
diff --git a/lisp/org-id.el b/lisp/org-id.el
index 4b49aa5..05ad750 100644
--- a/lisp/org-id.el
+++ b/lisp/org-id.el
@@ -602,7 +602,7 @@ optional argument MARKERP, return the position as a new marker."
"Store a link to the current entry, using its ID."
(interactive)
(when (and (buffer-file-name (buffer-base-buffer)) (derived-mode-p 'org-mode))
- (let* ((link (org-make-link "id:" (org-id-get-create)))
+ (let* ((link (concat "id:" (org-id-get-create)))
(case-fold-search nil)
(desc (save-excursion
(org-back-to-heading t)
diff --git a/lisp/org-info.el b/lisp/org-info.el
index b4e5c22..8cad9b6 100644
--- a/lisp/org-info.el
+++ b/lisp/org-info.el
@@ -48,7 +48,7 @@
"Store a link to an Info file and node."
(when (eq major-mode 'Info-mode)
(let (link desc)
- (setq link (org-make-link "info:"
+ (setq link (concat "info:"
(file-name-nondirectory Info-current-file)
"#" Info-current-node))
(setq desc (concat (file-name-nondirectory Info-current-file)
diff --git a/lisp/org-irc.el b/lisp/org-irc.el
index 1074283..31c8298 100644
--- a/lisp/org-irc.el
+++ b/lisp/org-irc.el
@@ -171,7 +171,7 @@ the session itself."
(progn
(org-store-link-props
:type "irc"
- :link (org-make-link "irc:/" link-text)
+ :link (concat "irc:/" link-text)
:description (concat "irc session '" link-text "'")
:server (car (car link))
:port (or (string-to-number (cadr (pop link))) erc-default-port)
diff --git a/lisp/org-mew.el b/lisp/org-mew.el
index 9cc767e..74ace5a 100644
--- a/lisp/org-mew.el
+++ b/lisp/org-mew.el
@@ -103,8 +103,7 @@
:date-timestamp-inactive date-ts-ia))
(setq message-id (org-remove-angle-brackets message-id))
(setq desc (org-email-link-description))
- (setq link (org-make-link "mew:" folder-name
- "#" message-id))
+ (setq link (concat "mew:" folder-name "#" message-id))
(org-add-link-props :link link :description desc)
link)))
diff --git a/lisp/org-mhe.el b/lisp/org-mhe.el
index 0c59d50..5907d24 100644
--- a/lisp/org-mhe.el
+++ b/lisp/org-mhe.el
@@ -99,7 +99,7 @@ supported by MH-E."
(org-add-link-props :date date :date-timestamp date-ts
:date-timestamp-inactive date-ts-ia))
(setq desc (org-email-link-description))
- (setq link (org-make-link "mhe:" (org-mhe-get-message-real-folder) "#"
+ (setq link (concat "mhe:" (org-mhe-get-message-real-folder) "#"
(org-remove-angle-brackets message-id)))
(org-add-link-props :link link :description desc)
link))))
diff --git a/lisp/org-rmail.el b/lisp/org-rmail.el
index 3146ff3..cb379d3 100644
--- a/lisp/org-rmail.el
+++ b/lisp/org-rmail.el
@@ -73,7 +73,7 @@
:date-timestamp-inactive date-ts-ia))
(setq message-id (org-remove-angle-brackets message-id))
(setq desc (org-email-link-description))
- (setq link (org-make-link "rmail:" folder "#" message-id))
+ (setq link (concat "rmail:" folder "#" message-id))
(org-add-link-props :link link :description desc)
(rmail-show-message rmail-current-message)
link)))))
diff --git a/lisp/org-vm.el b/lisp/org-vm.el
index c876efa..3b776cc 100644
--- a/lisp/org-vm.el
+++ b/lisp/org-vm.el
@@ -100,7 +100,7 @@
(org-add-link-props :date date :date-timestamp date-ts
:date-timestamp-inactive date-ts-ia))
(setq desc (org-email-link-description))
- (setq link (org-make-link (concat link-type ":") folder "#" message-id))
+ (setq link (concat (concat link-type ":") folder "#" message-id))
(org-add-link-props :link link :description desc)
link))))
diff --git a/lisp/org-wl.el b/lisp/org-wl.el
index 8a79ec0..1077cd9 100644
--- a/lisp/org-wl.el
+++ b/lisp/org-wl.el
@@ -161,7 +161,7 @@ ENTITY is a message entity."
"Store a link to a WL folder."
(let* ((folder (wl-folder-get-entity-from-buffer))
(petname (wl-folder-get-petname folder))
- (link (org-make-link "wl:" folder)))
+ (link (concat "wl:" folder)))
(save-excursion
(beginning-of-line)
(unless (and (wl-folder-buffer-group-p)
@@ -246,7 +246,7 @@ ENTITY is a message entity."
:subject subject :message-id message-id
:message-id-no-brackets message-id-no-brackets)
(setq desc (org-email-link-description))
- (setq link (org-make-link "wl:" folder-name "#" message-id-no-brackets))
+ (setq link (concat "wl:" folder-name "#" message-id-no-brackets))
(org-add-link-props :link link :description desc)))
(when date
(org-add-link-props :date date :date-timestamp date-ts
diff --git a/lisp/org.el b/lisp/org.el
index bb853e4..85370f5 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -8839,12 +8839,12 @@ For file links, arg negates `org-context-in-file-links'."
(not (string-match "Untitled" (buffer-name))))
(buffer-name)
(url-view-url t))
- link (org-make-link (url-view-url t)))
+ link (url-view-url t))
(org-store-link-props :type "w3" :url (url-view-url t)))
((eq major-mode 'w3m-mode)
(setq cpltxt (or w3m-current-title w3m-current-url)
- link (org-make-link w3m-current-url))
+ link w3m-current-url)
(org-store-link-props :type "w3m" :url (url-view-url t)))
((setq search (run-hook-with-args-until-success
@@ -8856,7 +8856,7 @@ For file links, arg negates `org-context-in-file-links'."
((eq major-mode 'image-mode)
(setq cpltxt (concat "file:"
(abbreviate-file-name buffer-file-name))
- link (org-make-link cpltxt))
+ link cpltxt)
(org-store-link-props :type "image" :file buffer-file-name))
((eq major-mode 'dired-mode)
@@ -8868,7 +8868,7 @@ For file links, arg negates `org-context-in-file-links'."
;; otherwise, no file so use current directory.
default-directory))
(setq cpltxt (concat "file:" file)
- link (org-make-link cpltxt))))
+ link cpltxt)))
((and (buffer-file-name (buffer-base-buffer)) (derived-mode-p 'org-mode))
(setq custom-id (org-entry-get nil "CUSTOM_ID"))
@@ -8879,7 +8879,7 @@ For file links, arg negates `org-context-in-file-links'."
(abbreviate-file-name
(buffer-file-name (buffer-base-buffer)))
"::" (match-string 1))
- link (org-make-link cpltxt)))
+ link cpltxt))
((and (featurep 'org-id)
(or (eq org-link-to-org-use-id t)
(and (org-called-interactively-p 'any)
@@ -8919,7 +8919,7 @@ For file links, arg negates `org-context-in-file-links'."
(org-heading-components))) "NONE"))))
(if (string-match "::\\'" cpltxt)
(setq cpltxt (substring cpltxt 0 -2)))
- (setq link (org-make-link cpltxt)))))
+ (setq link cpltxt))))
((buffer-file-name (buffer-base-buffer))
;; Just link to this file here.
@@ -8936,7 +8936,7 @@ For file links, arg negates `org-context-in-file-links'."
(setq cpltxt
(concat cpltxt "::" (org-make-org-heading-search-string txt))
desc "NONE")))
- (setq link (org-make-link cpltxt)))
+ (setq link cpltxt))
((org-called-interactively-p 'interactive)
(error "Cannot link to a buffer which is not visiting a file"))
@@ -9042,10 +9042,6 @@ according to FMT (default from `org-email-link-description-format')."
(reverse slines))) "\n")))))
(mapconcat 'identity (org-split-string s "[ \t]+") " ")))
-(defun org-make-link (&rest strings)
- "Concatenate STRINGS."
- (apply 'concat strings))
-
(defun org-make-link-string (link &optional description)
"Make a link with brackets, consisting of LINK and DESCRIPTION."
(unless (string-match "\\S-" link)
@@ -9362,7 +9358,7 @@ Use TAB to complete link prefixes, then RET for type-specific completion support
(if (string-match org-plain-link-re link)
;; URL-like link, normalize the use of angular brackets.
- (setq link (org-make-link (org-remove-angle-brackets link))))
+ (setq link (org-remove-angle-brackets link)))
;; Check if we are linking to the current file with a search option
;; If yes, simplify the link by using only the search option.
@@ -9431,16 +9427,16 @@ Use TAB to complete link prefixes, then RET for type-specific completion support
(expand-file-name ".")))))
(cond
((equal arg '(16))
- (setq link (org-make-link
+ (setq link (concat
"file:"
(abbreviate-file-name (expand-file-name file)))))
((string-match (concat "^" (regexp-quote pwd1) "\\(.+\\)") file)
- (setq link (org-make-link "file:" (match-string 1 file))))
+ (setq link (concat "file:" (match-string 1 file))))
((string-match (concat "^" (regexp-quote pwd) "\\(.+\\)")
(expand-file-name file))
- (setq link (org-make-link
+ (setq link (concat
"file:" (match-string 1 (expand-file-name file)))))
- (t (setq link (org-make-link "file:" file)))))
+ (t (setq link (concat "file:" file)))))
link))
(defun org-completing-read (&rest args)