[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/org-mime 3b119a22be 112/118: handle file url on Windows el
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/org-mime 3b119a22be 112/118: handle file url on Windows elegantly |
Date: |
Wed, 5 Jan 2022 07:58:51 -0500 (EST) |
branch: elpa/org-mime
commit 3b119a22be0ee22d16773e4d9a26478d3c8bf2df
Author: Chen Bin <chenbin.sh@gmail.com>
Commit: Chen Bin <chenbin.sh@gmail.com>
handle file url on Windows elegantly
---
org-mime.el | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/org-mime.el b/org-mime.el
index c4df091dce..0c6c39a239 100644
--- a/org-mime.el
+++ b/org-mime.el
@@ -363,9 +363,16 @@ Or else use CURRENT-FILE to calculate path."
(path (expand-file-name url dir)))
(cond
((string-match-p "^file:///" url)
- (replace-regexp-in-string "^file://" "" url))
+ (let* ((str (replace-regexp-in-string "^file://" "" url)))
+ (when (and (eq system-type 'windows-nt)
+ (string-match "^/[a-zA-Z]:" str))
+ ;; remove the first character from "/C:/Windows/File.txt"
+ (setq str (substring str 1)))
+ str))
+
((file-exists-p path)
path)
+
(t
(expand-file-name url default-directory)))))
- [nongnu] elpa/org-mime 8ad1218456 095/118: Combine two insert calls, (continued)
- [nongnu] elpa/org-mime 8ad1218456 095/118: Combine two insert calls, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 2cbd5de7bd 100/118: general export options should always override buffer options, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime ecbc66f16a 106/118: fixed typo, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime c6a3d73e78 107/118: remove org-mime-default-header, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 04e6ce9db6 108/118: try fixing ci again, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime eb21c02ba8 109/118: fixed org subtree htmlize, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 21692f16ce 110/118: use buffer properties, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 59bf130c76 113/118: secure tag should be at the beginning of email body, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime df99e631c5 031/118: quoted mail use modern UI style, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime e5e4c59022 103/118: fixed some typo, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 3b119a22be 112/118: handle file url on Windows elegantly,
ELPA Syncer <=
- [nongnu] elpa/org-mime f7a45f5573 115/118: Upgrade test file to GPLv3, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 77c3f07ce4 046/118: documentation, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime e5c68b1c66 044/118: minor changes to docstrings for readability and style changes., ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime e35c367e7d 048/118: clean code, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 41ea9818b4 050/118: fix cc, bcc compiling error, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 0db41d5b4e 065/118: emergency fix of broken 0.1.4, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 470808cc14 070/118: Added support for MAIL_FROM property, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 5132ec0586 089/118: Improve signature separator regex, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 744f5f3315 090/118: Merge pull request #49 from ahttraga/master, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime dc7ae1de85 094/118: Show individual paragraphs in gmail reply quotes, ELPA Syncer, 2022/01/05