*** org.el.old Fri Nov 5 19:16:29 2010 --- org.el Sat Nov 13 05:50:54 2010 *************** *** 9639,9647 **** opened in Emacs, unless an entry from org-file-apps that makes use of groups in a regexp matches. If the file does not exist, an error is thrown." ! (let* ((file (if (equal path "") buffer-file-name ! (substitute-in-file-name (expand-file-name path)))) (file-apps (append org-file-apps (org-default-apps))) (apps (org-remove-if 'org-file-apps-entry-match-against-dlink-p file-apps)) --- 9639,9666 ---- opened in Emacs, unless an entry from org-file-apps that makes use of groups in a regexp matches. If the file does not exist, an error is thrown." ! (let* ((%xx-decoded-path ! (let ((pos 0) (%xx-decoded-path path)) ! (setq %xx-decoded-path path) ! (while (setq pos (string-match "%\\([0-9A-F]\\)\\([0-9A-F]\\)" %xx-decoded-path pos)) ! (setq pos (1+ pos) ! %xx-decoded-path (replace-match ! (string (let ((code 0) digit) ! (dotimes (i 2) ! (setq ! digit (aref (match-string (1+ i) %xx-decoded-path) 0) ! code (+ (if (<= digit ?9) ! (- digit ?0) ! (- digit 55)) ! (* 16 code)))) code)) ! t t %xx-decoded-path))) ! ;; remove //localhost/ prefix if any ! (and (string-match "\\`//localhost/" %xx-decoded-path) ! (setq %xx-decoded-path (substring %xx-decoded-path 12))) ! %xx-decoded-path)) ! (file (if (equal path "") buffer-file-name ! (substitute-in-file-name (expand-file-name %xx-decoded-path)))) (file-apps (append org-file-apps (org-default-apps))) (apps (org-remove-if 'org-file-apps-entry-match-against-dlink-p file-apps))