From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#50176: [PATCH] 28.0.50; repeat-mode does not clear echo-area after timeout Date: Tue, 24 Aug 2021 21:20:13 +0300 Organization: LINKOV.NET Message-ID: <87a6l6k8ma.fsf@mail.linkov.net> References: <87o89nxrxf.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3224"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: 50176@debbugs.gnu.org To: Gabriel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 24 20:22:14 2021 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 1mIb3t-0000bq-78 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 24 Aug 2021 20:22:13 +0200 Original-Received: from localhost ([::1]:59094 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mIb3r-0000fP-Q2 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 24 Aug 2021 14:22:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46184) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mIb3j-0000f3-5m for bug-gnu-emacs@gnu.org; Tue, 24 Aug 2021 14:22:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33649) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mIb3i-0007uX-Hg for bug-gnu-emacs@gnu.org; Tue, 24 Aug 2021 14:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mIb3i-0004v3-A0 for bug-gnu-emacs@gnu.org; Tue, 24 Aug 2021 14:22:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Aug 2021 18:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50176 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed patch Original-Received: via spool by 50176-submit@debbugs.gnu.org id=B50176.162982926918768 (code B ref 50176); Tue, 24 Aug 2021 18:22:02 +0000 Original-Received: (at 50176) by debbugs.gnu.org; 24 Aug 2021 18:21:09 +0000 Original-Received: from localhost ([127.0.0.1]:45187 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIb2r-0004sd-3A for submit@debbugs.gnu.org; Tue, 24 Aug 2021 14:21:09 -0400 Original-Received: from relay4-d.mail.gandi.net ([217.70.183.196]:45841) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIb2q-0004sE-0x for 50176@debbugs.gnu.org; Tue, 24 Aug 2021 14:21:08 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id E81C7E0007; Tue, 24 Aug 2021 18:21:00 +0000 (UTC) In-Reply-To: (Gabriel's message of "Tue, 24 Aug 2021 11:31:30 -0300") 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:212568 Archived-At: > Today I caught a small problem with the patch I sent. The > 'string-prefix-p' and 'string-match-p' handle nil inputs differently: > > (string-prefix-p "Repeat with " nil) ;; returns nil > (string-match-p "Repeat with " nil) ;; throws an error > > The problem can be reproduced by writing some elisp code in *scratch* > buffer, putting the cursor in the function definition and invoking the > 'other-window' with 'repeat-mode' using my original steps. The > 'eldoc-mode' will echo the function name and '(current-message)' will > return nil. Please look in the repo that Mattias already changed string-match-p to string-search. But (string-search "Repeat with " nil) still throws an error. I wonder why string-search is different from string-prefix-p is its argument handling? They both operate on the strings. Also the name 'string-search' is too confusing since it is too similar to 'search-forward' that searches in the buffer.