From: Andreas Schwab <schwab@linux-m68k.org>
To: Daniel Lenski <dlenski@gmail.com>
Cc: 44622@debbugs.gnu.org
Subject: bug#44622: [PATCH v2] speedbar bugfix: only replace '~/' when it appears at the beginning of the path
Date: Sat, 14 Nov 2020 17:31:40 +0100 [thread overview]
Message-ID: <87eekvlx1v.fsf@igel.home> (raw)
In-Reply-To: <20201113185138.1333727-1-dlenski@gmail.com> (Daniel Lenski's message of "Fri, 13 Nov 2020 10:51:38 -0800")
On Nov 13 2020, Daniel Lenski wrote:
> diff --git a/lisp/speedbar.el b/lisp/speedbar.el
> index 991c8a33d4..3619b23d9e 100644
> --- a/lisp/speedbar.el
> +++ b/lisp/speedbar.el
> @@ -1874,9 +1874,9 @@ 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-prefix-p "~/" dd))
That should match tilde, not "~/" (which will never match).
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
prev parent reply other threads:[~2020-11-14 16:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-13 0:46 bug#44608: [PATCH] speedbar bugfix: only replace '~/' when it appears at the beginning of the path Daniel Lenski
2020-11-13 10:08 ` 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 ` Andreas Schwab [this message]
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=87eekvlx1v.fsf@igel.home \
--to=schwab@linux-m68k.org \
--cc=44622@debbugs.gnu.org \
--cc=dlenski@gmail.com \
/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.