From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.bugs 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 Message-ID: <87eekvlx1v.fsf@igel.home> References: <87y2j5tvql.fsf@igel.home> <20201113185138.1333727-1-dlenski@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32517"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Cc: 44622@debbugs.gnu.org To: Daniel Lenski Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 14 17:32:21 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kdyTM-0008M7-H8 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 14 Nov 2020 17:32:20 +0100 Original-Received: from localhost ([::1]:38264 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kdyTL-0000X4-Jf for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 14 Nov 2020 11:32:19 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43816) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdyT4-0000VZ-Kr for bug-gnu-emacs@gnu.org; Sat, 14 Nov 2020 11:32:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40213) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kdyT4-0001mU-BB for bug-gnu-emacs@gnu.org; Sat, 14 Nov 2020 11:32:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kdyT4-0000n8-7C for bug-gnu-emacs@gnu.org; Sat, 14 Nov 2020 11:32:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andreas Schwab Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 14 Nov 2020 16:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44622 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed patch X-Debbugs-Original-Cc: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16053715132537 (code B ref -1); Sat, 14 Nov 2020 16:32:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Nov 2020 16:31:53 +0000 Original-Received: from localhost ([127.0.0.1]:51759 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdySv-0000eZ-25 for submit@debbugs.gnu.org; Sat, 14 Nov 2020 11:31:53 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:54868) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdySt-0000ck-2b for submit@debbugs.gnu.org; Sat, 14 Nov 2020 11:31:51 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43736) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdySs-0000LM-Pj for bug-gnu-emacs@gnu.org; Sat, 14 Nov 2020 11:31:50 -0500 Original-Received: from mail-out.m-online.net ([212.18.0.10]:46004) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdySo-0001gD-IB for bug-gnu-emacs@gnu.org; Sat, 14 Nov 2020 11:31:50 -0500 Original-Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4CYLSs4nzTz1rsMq; Sat, 14 Nov 2020 17:31:41 +0100 (CET) Original-Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4CYLSs4Ygjz1qyX6; Sat, 14 Nov 2020 17:31:41 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Original-Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id 6d5IeshrTMZU; Sat, 14 Nov 2020 17:31:40 +0100 (CET) X-Auth-Info: qDu1ID8clROfpuuEkkNe6mmSUOPpyivQ6fGlbnkr+Lzpq3sdTdgrOK2//iPDnesN Original-Received: from igel.home (ppp-46-244-179-214.dynamic.mnet-online.de [46.244.179.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Sat, 14 Nov 2020 17:31:40 +0100 (CET) Original-Received: by igel.home (Postfix, from userid 1000) id 477B72C334E; Sat, 14 Nov 2020 17:31:40 +0100 (CET) X-Yow: I want DUSTIN HOFFMAN!! .. I want LIBERACE!! YOW!! In-Reply-To: <20201113185138.1333727-1-dlenski@gmail.com> (Daniel Lenski's message of "Fri, 13 Nov 2020 10:51:38 -0800") Received-SPF: pass client-ip=212.18.0.10; envelope-from=whitebox@nefkom.net; helo=mail-out.m-online.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/14 11:31:41 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:193300 Archived-At: 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."