From: Daniel Lenski <dlenski@gmail.com>
To: 44608@debbugs.gnu.org
Cc: Daniel Lenski <dlenski@gmail.com>
Subject: bug#44608: [PATCH] speedbar bugfix: only replace '~/' when it appears at the beginning of the path
Date: Thu, 12 Nov 2020 16:46:09 -0800 [thread overview]
Message-ID: <20201113004609.1227253-1-dlenski@gmail.com> (raw)
This makes Speedbar work correctly with remote directories accessed through TRAMP. This bug has apparently been known for a long time: https://cedet-devel.narkive.com/eIs7LoWB/speedbar-and-tramp#post2
Signed-off-by: Daniel Lenski <dlenski@gmail.com>
---
lisp/speedbar.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/speedbar.el b/lisp/speedbar.el
index 991c8a3..3542936 100644
--- a/lisp/speedbar.el
+++ b/lisp/speedbar.el
@@ -1874,7 +1874,7 @@ matches the user directory ~, then it is replaced with a ~.
INDEX is not used, but is required by the caller."
(let* ((tilde (expand-file-name "~/"))
(dd (expand-file-name directory))
- (junk (string-match (regexp-quote tilde) dd))
+ (junk (string-match (concat "^" (regexp-quote tilde)) dd))
(displayme (if junk
(concat "~/" (substring dd (match-end 0)))
dd))
--
2.17.1
next reply other threads:[~2020-11-13 0:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-13 0:46 Daniel Lenski [this message]
2020-11-13 10:08 ` bug#44608: [PATCH] speedbar bugfix: only replace '~/' when it appears at the beginning of the path Andreas Schwab
2020-11-13 18:51 ` bug#44622: [PATCH v2] " Daniel Lenski
2020-11-14 16:08 ` Lars Ingebrigtsen
2021-07-31 12:56 ` bug#44608: [PATCH] " Lars Ingebrigtsen
2021-08-29 20:17 ` Lars Ingebrigtsen
2020-11-14 16:31 ` bug#44622: [PATCH v2] " Andreas Schwab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201113004609.1227253-1-dlenski@gmail.com \
--to=dlenski@gmail.com \
--cc=44608@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.