Browse Source

Merge branch 'master' of code.orgmode.org:bzg/org-mode

Bastien 3 years ago
parent
commit
5c9bab29d4
3 changed files with 5 additions and 19 deletions
  1. 2 1
      lisp/org-compat.el
  2. 1 16
      lisp/org.el
  3. 2 2
      lisp/ox.el

+ 2 - 1
lisp/org-compat.el

@@ -128,6 +128,7 @@ Case is significant."
 (define-obsolete-function-alias 'org-match-string-no-properties 'match-string-no-properties "Org 9.0")
 (define-obsolete-function-alias 'org-propertize 'propertize "Org 9.0")
 (define-obsolete-function-alias 'org-select-frame-set-input-focus 'select-frame-set-input-focus "Org 9.0")
+(define-obsolete-function-alias 'org-file-remote-p 'file-remote-p "Org 9.2")
 
 (defmacro org-re (s)
   "Replace posix classes in regular expression S."
@@ -440,7 +441,7 @@ use of this function is for the stuck project list."
   (org-align-tags t))
 
 (defmacro org-with-silent-modifications (&rest body)
-  (declare (obsolete "use `with-silent-modifications' instead." "9.2")
+  (declare (obsolete "use `with-silent-modifications' instead." "Org 9.2")
 	   (debug (body)))
   `(with-silent-modifications ,@body))
 

+ 1 - 16
lisp/org.el

@@ -10684,7 +10684,7 @@ If the file does not exist, an error is thrown."
 		'org-file-apps-entry-match-against-dlink-p file-apps))
 	 (apps-dlink (cl-remove-if-not
 		      'org-file-apps-entry-match-against-dlink-p file-apps))
-	 (remp (and (assq 'remote apps) (org-file-remote-p file)))
+	 (remp (and (assq 'remote apps) (file-remote-p file)))
 	 (dirp (unless remp (file-directory-p file)))
 	 (file (if (and dirp org-open-directory-means-index-dot-org)
 		   (concat (file-name-as-directory file) "index.org")
@@ -10856,21 +10856,6 @@ be opened in Emacs."
    (when add-auto-mode
      (mapcar (lambda (x) (cons (car x) 'emacs)) auto-mode-alist))))
 
-(defvar ange-ftp-name-format)
-(defun org-file-remote-p (file)
-  "Test whether FILE specifies a location on a remote system.
-Return non-nil if the location is indeed remote.
-
-For example, the filename \"/user@host:/foo\" specifies a location
-on the system \"/user@host:\"."
-  (cond ((fboundp 'file-remote-p)
-         (file-remote-p file))
-        ((fboundp 'tramp-handle-file-remote-p)
-         (tramp-handle-file-remote-p file))
-        ((and (boundp 'ange-ftp-name-format)
-              (string-match (car ange-ftp-name-format) file))
-         t)))
-
 
 ;;;; Refiling
 

+ 2 - 2
lisp/ox.el

@@ -3510,7 +3510,7 @@ is to happen."
 	      (when (and (eq 'link (org-element-type link))
 			 (string= "file" (org-element-property :type link)))
 		(let ((old-path (org-element-property :path link)))
-		  (unless (or (org-file-remote-p old-path)
+		  (unless (or (file-remote-p old-path)
 			      (file-name-absolute-p old-path))
 		    (let ((new-path (file-relative-name
 				     (expand-file-name old-path file-dir)
@@ -4425,7 +4425,7 @@ has type \"radio\"."
   "Return file URI associated to FILENAME."
   (cond ((string-prefix-p "//" filename) (concat "file:" filename))
 	((not (file-name-absolute-p filename)) filename)
-	((org-file-remote-p filename) (concat "file:/" filename))
+	((file-remote-p filename) (concat "file:/" filename))
 	(t
 	 (let ((fullname (expand-file-name filename)))
 	   (concat (if (string-prefix-p "/" fullname) "file://" "file:///")