diff --git a/lisp/org-bbdb.el b/lisp/org-bbdb.el index f30557edd..a1ad6061e 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 f572095d8..1765cfde4 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 50d91beaf..a63568c34 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 4b49aa5ca..05ad75027 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 b4e5c2244..8cad9b6d4 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 107428366..31c8298f1 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 9cc767eae..74ace5a52 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 0c59d5007..5907d2469 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 3146ff327..cb379d3cc 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 c876efafb..3b776cc43 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 8a79ec0d7..1077cd9b7 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 bb853e4f1..85370f5ae 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)