From 6e5a7137328a48a3ae17f654338349ea8bf67d4e Mon Sep 17 00:00:00 2001 From: JSDurand Date: Sun, 10 Apr 2022 11:16:07 +0800 Subject: bookmark-conf: handle multi-hops tramp file names The previous regular expression cannot handle remote file names with multiple hops. This is now fixed. --- bookmark-conf.el | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/bookmark-conf.el b/bookmark-conf.el index 1b880f7..32a102d 100644 --- a/bookmark-conf.el +++ b/bookmark-conf.el @@ -116,7 +116,17 @@ (cond ((and (stringp location) (not (string= location "")) - (string-match (rx bos "/ssh:" (group (1+ (not ":"))) ":" (1+ (not ":")) eos) location)) + (string-match (rx bos "/ssh:" + (group (1+ (not ":"))) + (zero-or-more + (and "|" + (1+ (not ":")) + ":" + (1+ (not ":")))) + ":" + (1+ (not ":")) + eos) + location)) (setq handler-name (concat "Tramp - " (match-string 1 location))) (setq capitalize-p nil))) -- cgit v1.2.3-18-g5258