From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [pcomplete.el (pcomplete-completions-at-point)] Why max? Date: Wed, 20 Mar 2019 13:11:19 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="244802"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel To: Tadeus Prastowo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 20 18:12:06 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h6el3-0011Ub-Fw for ged-emacs-devel@m.gmane.org; Wed, 20 Mar 2019 18:12:05 +0100 Original-Received: from localhost ([127.0.0.1]:50748 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h6el2-0004oJ-4O for ged-emacs-devel@m.gmane.org; Wed, 20 Mar 2019 13:12:04 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:41844) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h6ekn-0004nx-2R for emacs-devel@gnu.org; Wed, 20 Mar 2019 13:11:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h6ekh-0006Ge-Gs for emacs-devel@gnu.org; Wed, 20 Mar 2019 13:11:49 -0400 Original-Received: from mail01.iro.umontreal.ca ([132.204.25.201]:43976) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h6ekf-0005uI-HR for emacs-devel@gnu.org; Wed, 20 Mar 2019 13:11:41 -0400 Original-Received: from mail01.iro.umontreal.ca (mail01.iro.umontreal.ca [127.0.0.1]) by mail01.iro.umontreal.ca (Postfix) with ESMTP id 6331580EB766 for ; Wed, 20 Mar 2019 13:11:33 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; h=content-type:content-type:mime-version:user-agent:in-reply-to :date:date:references:message-id:subject:subject:to:from:from; s=dkim; t=1553101888; x=1553965889; bh=2PbG4EhhTZpf3hKbbnonWH8J UsW1vDVcCA+SIeqUbWQ=; b=UkFnPsns+wQRtJzpqMYLMTwcP7Aa0cVkELJBhGnM scbvPIpoTr4voCvDZ9CVC2HJ+WObVl11ZmPjfnGuqtIh2Cb5ElzwZw8d2758H5SF LiEd/hStIbDOhZvasJ+B2gfAXXgQ5g30uLUs3OnvwTzlEAk2q/zu3uuFVgtshLVw QoAc73sGqh4SOzLqSK8suftloy+wOOjtaCn3F1eS1wz6Hs/0cQFsfqbpNyhsIyFg 0fCJdhYmXM3i+d52MW7VwZHzR3JZD1YGbn/HFsYu0rNuSABQuOfpvidzQw0mMfWx C0K9SdmcXqWIdE6zfWuH07lmG2eDOvejNv/MmPRTREpbmQ== X-Virus-Scanned: amavisd-new at iro.umontreal.ca Original-Received: from mail01.iro.umontreal.ca ([127.0.0.1]) by mail01.iro.umontreal.ca (mail01.iro.umontreal.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qNBSvDnnvT5m for ; Wed, 20 Mar 2019 13:11:28 -0400 (EDT) Original-Received: from pastel (75-119-242-252.dsl.teksavvy.com [75.119.242.252]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id BB54B80EB74C; Wed, 20 Mar 2019 13:11:27 -0400 (EDT) In-Reply-To: (Tadeus Prastowo's message of "Wed, 20 Mar 2019 17:14:57 +0100") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.201 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:234413 Archived-At: > I confirm that commit 18fc4ac5294d85e37d9e544c04b5d4e89ef3237c solves > the problem. > Why the problem seems to be dependent on the number of characters and > their cases? It's because when we (string-prefix-p s2 string completion-ignore-case) instead of (string-prefix-p s2 res completion-ignore-case) we still get the correct result if `string` also happens to begin with `s2` (in your cases, `s2` is short, typically the same number of chars as the number of backslashes in your argument). Stefan