From unknown Sat Aug 16 20:57:08 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#54804 <54804@debbugs.gnu.org> To: bug#54804 <54804@debbugs.gnu.org> Subject: Status: 29.0.50; zap-to-char: case sensitive for upper-case letter Reply-To: bug#54804 <54804@debbugs.gnu.org> Date: Sun, 17 Aug 2025 03:57:08 +0000 retitle 54804 29.0.50; zap-to-char: case sensitive for upper-case letter reassign 54804 emacs submitter 54804 Tino Calancha severity 54804 wishlist tag 54804 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 08 18:04:19 2022 Received: (at submit) by debbugs.gnu.org; 8 Apr 2022 22:04:19 +0000 Received: from localhost ([127.0.0.1]:36252 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ncwiI-00034e-Dn for submit@debbugs.gnu.org; Fri, 08 Apr 2022 18:04:18 -0400 Received: from lists.gnu.org ([209.51.188.17]:35368) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ncwiG-00034W-Qs for submit@debbugs.gnu.org; Fri, 08 Apr 2022 18:04:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55812) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ncwiG-0008JI-N0 for bug-gnu-emacs@gnu.org; Fri, 08 Apr 2022 18:04:16 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:34567) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ncwiE-00025e-2d for bug-gnu-emacs@gnu.org; Fri, 08 Apr 2022 18:04:15 -0400 Received: by mail-wm1-x330.google.com with SMTP id j5-20020a05600c1c0500b0038ea8b53580so1387415wms.1 for ; Fri, 08 Apr 2022 15:04:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:mime-version; bh=OsYQQSZbo+a4mc8SezBAOTbsIWdzqSXUtEdYyFzkz7s=; b=TIzOrijl5zPGIpsotwu8QLif4AIq9u1Qn87cbDM8noabEpvLfGAZV3CA6EUAywCLFx OSu5ecUSqkMZ7DYVu/JbsdkrR0jXOKfCfF4M65NcQmR4JG2HRyMeGxrtEJVxH3IwIU1x yAWFfQlMTMVvFKuBPeBCPKmXnFg4Qe99RwjiuUeHgWWakkpGAWpOtSyRwOt11xGlvzyP so4EQaWgYpWgRJ7q9rx1rUVvqFswp6qY9GOesnSZKh00bCRQwF1hE+sdBZz/HJGAVikB Gk1FuW7UDrxa2jJOWOVs4Ltf/7OS8N3wKtmKr0UJC0QbTTK1XbtVzPDNhyfHqmww83cT dsJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=OsYQQSZbo+a4mc8SezBAOTbsIWdzqSXUtEdYyFzkz7s=; b=Walyn9yhatqU8l4xMAIinRJmsvlVBfEu7eQkQjRW7ruWZo3kGU4m8zjaFOtOj4HJUI R/TcZ+0db7F3ofMI9xwjw448EHk7aGfBX3TeOnmJknT/T6yNJiu0Gk2aBUfEGeEjuQX6 zG9Y/IQVvNjEGjkzagnSPo5gPm0+w7AiqmwLPZYvfr1zLRB6PIPFrOI9FbqKaLqEabsC YnU1B7wVTP30cUFAvK6QEZ8wIZjLRD6p6XREfhzWLsVabK8yAd3dHRKoOkDsvEUpluAu ruwqfiWHmpQuDa4JdrPzPit1pin9TyI17aku79jGqmEa3kDzB/XjlXL1lpaWqEIKfFG/ kP2A== X-Gm-Message-State: AOAM530hH/KrVHi7CZNjqILA4I4+6oqTQ4b5rCRm4tyBRLnLZv5XrMIc FwSCLBXHN9rLuUYXxlcbOl5VWDsxYQk= X-Google-Smtp-Source: ABdhPJxyFzzosC70XxU+oCcUjzv5tTwu+pH1vKXZQ7xby8RAqqeUKV3B1rPo5JU6P6zRIjGrrnWYUA== X-Received: by 2002:a7b:c013:0:b0:38e:9edd:a44c with SMTP id c19-20020a7bc013000000b0038e9edda44cmr5242393wmb.122.1649455450609; Fri, 08 Apr 2022 15:04:10 -0700 (PDT) Received: from eprince ([193.118.249.171]) by smtp.gmail.com with ESMTPSA id f13-20020a05600c4e8d00b0038c949ef0d5sm13620745wmq.8.2022.04.08.15.04.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Apr 2022 15:04:09 -0700 (PDT) From: Tino Calancha To: bug-gnu-emacs@gnu.org Subject: 29.0.50; zap-to-char: case sensitive for upper-case letter Date: Sat, 09 Apr 2022 00:03:45 +0200 Message-ID: <87ee27fd1a.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=tino.calancha@gmail.com; helo=mail-wm1-x330.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 2.2 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: X-Debbugs-Cc: wishlist Tags: patch A wishlist for the `zap-to-char' and `zap-up-to-char': In interactive calls, when users input an upper-case letter then perform a case-sensitive search. This behavior is analog to what `isearch' does. Content analysis details: (2.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [193.118.249.171 listed in zen.spamhaus.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tino.calancha[at]gmail.com) -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: X-Debbugs-Cc: wishlist Tags: patch A wishlist for the `zap-to-char' and `zap-up-to-char': In interactive calls, when users input an upper-case letter then perform a case-sensitive search. This behavior is analog to what `isearch' does. Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [193.118.249.171 listed in zen.spamhaus.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tino.calancha[at]gmail.com) -0.0 T_SCC_BODY_TEXT_LINE No description available. -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager X-Debbugs-Cc: uyennhi.qm@gmail.com Severity: wishlist Tags: patch A wishlist for the `zap-to-char' and `zap-up-to-char': In interactive calls, when users input an upper-case letter then perform a case-sensitive search. This behavior is analog to what `isearch' does. --8<-----------------------------cut here---------------start------------->8--- commit c55557d6eb83ac1fe3aa678cae080df979922f7c Author: Tino Calancha Date: Fri Apr 8 23:00:18 2022 +0200 zap-to-char: case sensitive for upper-case letter In interactive calls, perform a case sensitive search when the given char is an upper-case letter. Same for zap-up-to-char. This is analog to what the user-level incremental search feature does. * lisp/misc.el (zap-up-to-char): Delete it. * lisp/simple.el (zap--to-char-region): Add helper function. (zap-to-char, zap-up-to-char): Add the optional argument INTERACTIVE. Do a case-sensitive search when CHAR is an upper-case letter and INTERACTIVE is non-nil. * etc/NEWS (Editing Changes in Emacs 29.1): Announce this change. * test/lisp/misc-tests.el (misc-test-zap-up-to-char): Delete it. * test/lisp/simple-tests.el (with-simple-test): Add helper macro. (simple-tests-zap-to-char, simple-tests-zap-up-to-char): Add tests. diff --git a/etc/NEWS b/etc/NEWS index 2fac893cc5..5fb9f14366 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -501,6 +501,11 @@ are met. The conditions are given by the argument, which can be * Editing Changes in Emacs 29.1 +--- +** 'zap-to-char' performs a case-sensitive search in interactive calls +when the input character is an upper-case letter. Likewise, for +'zap-up-to-char'. + --- ** Indentation of 'cl-flet' and 'cl-labels' has changed. These forms now indent like this: diff --git a/lisp/misc.el b/lisp/misc.el index d85f889ffd..389b1a6ef5 100644 --- a/lisp/misc.el +++ b/lisp/misc.el @@ -61,25 +61,6 @@ copy-from-above-command (+ n (point))))))) (insert string))) -;; Variation of `zap-to-char'. - -;;;###autoload -(defun zap-up-to-char (arg char) - "Kill up to, but not including ARGth occurrence of CHAR. -Case is ignored if `case-fold-search' is non-nil in the current buffer. -Goes backward if ARG is negative; error if CHAR not found. -Ignores CHAR at point." - (interactive (list (prefix-numeric-value current-prefix-arg) - (read-char-from-minibuffer "Zap up to char: " - nil 'read-char-history))) - (let ((direction (if (>= arg 0) 1 -1))) - (kill-region (point) - (progn - (forward-char direction) - (unwind-protect - (search-forward (char-to-string char) nil nil arg) - (backward-char direction)) - (point))))) ;; These were added with an eye to making possible a more CCA-compatible ;; command set; but that turned out not to be interesting. diff --git a/lisp/simple.el b/lisp/simple.el index eb65701803..50aed97680 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -6031,21 +6031,61 @@ backward-delete-char-untabify ;; Avoid warning about delete-backward-char (with-no-warnings (delete-backward-char n killp)))) -(defun zap-to-char (arg char) +(defun zap--to-char-region (arg char up-to interactive) + "Return the region to kill with `zap-to-char'. + +Helper function for `zap-to-char' and `zap-up-to-char'. +If UP-TO is non-nil then implement the later, otherwise the former. +The rest of the arguments are described in the commands." + (with-no-warnings + (when (char-table-p translation-table-for-input) + (setq char (or (aref translation-table-for-input char) char)))) + (let* ((str (char-to-string char)) + (upper-case (let (case-fold-search) + (string-match-p "[[:upper:]]" str))) + (case-fold-search (if (and interactive upper-case) + nil + case-fold-search))) + (list (point) (if up-to (let ((direction (if (>= arg 0) 1 -1))) + (forward-char direction) + (unwind-protect + (search-forward str nil nil arg) + (backward-char direction)) + (point)) + (search-forward str nil nil arg) + (point))))) + +(defun zap-to-char (arg char &optional interactive) "Kill up to and including ARGth occurrence of CHAR. +Optional argument INTERACTIVE tells the function to behave as when +it's called interactively. Case is ignored if `case-fold-search' is non-nil in the current buffer. Goes backward if ARG is negative; error if CHAR not found. +Called interactively, do a case sensitive search if the char is an +upper case letter. See also `zap-up-to-char'." (interactive (list (prefix-numeric-value current-prefix-arg) (read-char-from-minibuffer "Zap to char: " - nil 'read-char-history))) - ;; Avoid "obsolete" warnings for translation-table-for-input. - (with-no-warnings - (if (char-table-p translation-table-for-input) - (setq char (or (aref translation-table-for-input char) char)))) - (kill-region (point) (progn - (search-forward (char-to-string char) nil nil arg) - (point)))) + nil 'read-char-history) + t)) + (pcase-let ((`(,start ,end) (zap--to-char-region arg char nil interactive))) + (kill-region start end))) + +(defun zap-up-to-char (arg char &optional interactive) + "Kill up to, but not including ARGth occurrence of CHAR. +Optional argument INTERACTIVE tells the function to behave as when +it's called interactively. +Case is ignored if `case-fold-search' is non-nil in the current buffer. +Goes backward if ARG is negative; error if CHAR not found. +Called interactively, do a case sensitive search if the char is an +upper case letter. +Ignores CHAR at point." + (interactive (list (prefix-numeric-value current-prefix-arg) + (read-char-from-minibuffer "Zap up to char: " + nil 'read-char-history) + t)) + (pcase-let ((`(,start ,end) (zap--to-char-region arg char 'up-to interactive))) + (kill-region start end))) ;; kill-line and its subroutines. diff --git a/test/lisp/misc-tests.el b/test/lisp/misc-tests.el index 36a8726b88..bec786c8c7 100644 --- a/test/lisp/misc-tests.el +++ b/test/lisp/misc-tests.el @@ -38,14 +38,6 @@ misc-test-copy-from-above-command (with-misc-test "abc\n" "abc\nab" (copy-from-above-command 2))) -(ert-deftest misc-test-zap-up-to-char () - (with-misc-test "abcde" "cde" - (goto-char (point-min)) - (zap-up-to-char 1 ?c)) - (with-misc-test "abcde abc123" "c123" - (goto-char (point-min)) - (zap-up-to-char 2 ?c))) - (ert-deftest misc-test-upcase-char () (with-misc-test "abcde" "aBCDe" (goto-char (1+ (point-min))) diff --git a/test/lisp/simple-tests.el b/test/lisp/simple-tests.el index 6350bebeee..b26a4e4b83 100644 --- a/test/lisp/simple-tests.el +++ b/test/lisp/simple-tests.el @@ -971,5 +971,43 @@ test-undo-region ;;(should (= (length (delq nil (undo-make-selective-list 5 9))) 0)) (should (= (length (delq nil (undo-make-selective-list 6 9))) 0)))) +(defmacro with-simple-test (original result &rest body) + (declare (indent 2) (debug (stringp stringp body))) + `(with-temp-buffer + (insert ,original) + ,@body + (should (equal (buffer-string) ,result)))) + +(ert-deftest simple-tests-zap-to-char () + (with-simple-test "abcde" "de" + (goto-char (point-min)) + (zap-to-char 1 ?c)) + (with-simple-test "abcde abc123" "123" + (goto-char (point-min)) + (zap-to-char 2 ?c)) + (let ((case-fold-search t)) + (with-simple-test "abcdeCXYZ" "deCXYZ" + (goto-char (point-min)) + (zap-to-char 1 ?C)) + (with-simple-test "abcdeCXYZ" "XYZ" + (goto-char (point-min)) + (zap-to-char 1 ?C 'interactive)))) + +(ert-deftest simple-tests-zap-up-to-char () + (with-simple-test "abcde" "cde" + (goto-char (point-min)) + (zap-up-to-char 1 ?c)) + (with-simple-test "abcde abc123" "c123" + (goto-char (point-min)) + (zap-up-to-char 2 ?c)) + (let ((case-fold-search t)) + (with-simple-test "abcdeCXYZ" "cdeCXYZ" + (goto-char (point-min)) + (zap-up-to-char 1 ?C)) + (with-simple-test "abcdeCXYZ" "CXYZ" + (goto-char (point-min)) + (zap-up-to-char 1 ?C 'interactive)))) + + (provide 'simple-test) ;;; simple-tests.el ends here --8<-----------------------------cut here---------------end--------------->8--- In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw scroll bars) of 2022-04-08 built Repository revision: 022a1f48a4e2005be7aa66b67eb2f17f8386c853 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12011000 System Description: Debian GNU/Linux 11 (bullseye) From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 09 02:03:33 2022 Received: (at 54804) by debbugs.gnu.org; 9 Apr 2022 06:03:33 +0000 Received: from localhost ([127.0.0.1]:36571 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nd4C5-0006jz-Bw for submit@debbugs.gnu.org; Sat, 09 Apr 2022 02:03:33 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38482) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nd4C3-0006jn-Gs for 54804@debbugs.gnu.org; Sat, 09 Apr 2022 02:03:32 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39884) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nd4By-0002hp-3l; Sat, 09 Apr 2022 02:03:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=UTALK6rKP4e3IrFf2eKKKrBOAWzjCfBHq7d03fviY+M=; b=KABpDJ8o4xUO oLWo7JS0u/NZgtmLOKatcy6qcbRvfpWUjaQu30Sqy9Xd4JaDlbS2gUtrD31Xnhq70RaGHzRNdR9cz tF4xOeO1T/isSA2x9pquisZIKOU+D862PJa8izECD1kQLetCY1jBm0vh4E0apXcpmoiFZIhlqWu01 /n4Ig0pwb1RpwfR9mEphMM3hn8fSHHcCbfpy0o9Jx34HusyJ7ATmr6fpwVQ4XhmPimThuvqhjwMoF YEbd2hcye4nhvuumk6Z5b4fPmp3wcMX9k3v4q6HqfyLU95FDaC2fKeg1Fgjr2FUFxhntqh9Mi1QKj /OdWj60K1Wys3wZ4wNaxGA==; Received: from [87.69.77.57] (port=1428 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nd4Bw-0006yQ-Lt; Sat, 09 Apr 2022 02:03:25 -0400 Date: Sat, 09 Apr 2022 09:03:38 +0300 Message-Id: <83bkxaaj45.fsf@gnu.org> From: Eli Zaretskii To: Tino Calancha In-Reply-To: <87ee27fd1a.fsf@gmail.com> (message from Tino Calancha on Sat, 09 Apr 2022 00:03:45 +0200) Subject: Re: bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter References: <87ee27fd1a.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54804 Cc: 54804@debbugs.gnu.org, uyennhi.qm@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Tino Calancha > Date: Sat, 09 Apr 2022 00:03:45 +0200 > Cc: uyennhi.qm@gmail.com > > A wishlist for the `zap-to-char' and `zap-up-to-char': > In interactive calls, when users input an upper-case letter then perform > a case-sensitive search. > > This behavior is analog to what `isearch' does. Thanks, but why does the implementation have to be so complicated? Isn't this just about turning off case-fold-search while searching for the character? What am I missing? From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 16 06:58:17 2022 Received: (at 54804) by debbugs.gnu.org; 16 Apr 2022 10:58:17 +0000 Received: from localhost ([127.0.0.1]:60777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nfg88-00089Q-Pu for submit@debbugs.gnu.org; Sat, 16 Apr 2022 06:58:17 -0400 Received: from mail-ed1-f45.google.com ([209.85.208.45]:37601) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nfg87-00089B-5k for 54804@debbugs.gnu.org; Sat, 16 Apr 2022 06:58:15 -0400 Received: by mail-ed1-f45.google.com with SMTP id b15so12510557edn.4 for <54804@debbugs.gnu.org>; Sat, 16 Apr 2022 03:58:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=fiT9z8EZrymA62AW+ynuqZ8MbsCfhtu9z8eUxeswenY=; b=XKvAuhj1mUQjhrmL007pkQGaAi342etXZ5tcUrykDFbY/8YpA7oQXPppDeAkYLOz0v G9YH6b+yEhtURvk65kwQ6d52u5qbCFaqpbQ88torzyAWyZfnVJXsfT0sG01bkcg38Hwt M0NAkj4SqUjy38lPxkrvejh3Lir7VZaTdeXhOsM5AXqrkQQQX4vvjtf3MYtWJEduN6ZC N1xC42S23UjxBo3eE8lhIvSF/xB3HsEnO9rudgJ6Pl7c5dy6uERK4VssTvyjpM7lIn+v 3h9OXo7+jg5dy4y6hub4Ar6XTngayd2FHxQAitBt21drLoIC+xp2hkbsjYq1+dtSwYA8 G/YQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=fiT9z8EZrymA62AW+ynuqZ8MbsCfhtu9z8eUxeswenY=; b=alkZb610Zkf0TxXMzH91Buvz26UxDOwkDJhwYztKCcJ8cQA1TgCR872Kmu7jE2JMqu BIbXC/REK92RXkIOL5IqkiwBMb/qumQzvvnZNuy7Ivgt2yk75+T8L6CGfcnNydEfPb6K 8mtFNipFtHk8YfmWSwAZa+fh1dmTk6NHt/4FbKWCvFBisTuvswQWIEWW/vimaw/8t7NZ 7SdrncIJDpnoeh2cjOJd+Iq3ffbbJZ+eINpllpeEvOYgKJj48o7hdWhsq5tP7Y2LNKB9 zuoacmUodPru2Fn0J2P0biJLIvqIyZeBtcTH33xgNXmnpDtCE+97KU5PGFzVIvcHlene hZHQ== X-Gm-Message-State: AOAM5311uv9+lHuPQpI/XkRK+LKjeFgYAYpKXBEj04B9b0A3ygyB1cUs VamrpUcbbwY6nLSMKrPnH7s= X-Google-Smtp-Source: ABdhPJwUptTsLQqWb0py2GMmwWie5i5E4DuVa8JM+wQPhnJ5tLRq8HuhQGiydCD77LLB8BHYCrzceg== X-Received: by 2002:aa7:df92:0:b0:41d:84fd:5d92 with SMTP id b18-20020aa7df92000000b0041d84fd5d92mr3210936edy.337.1650106689127; Sat, 16 Apr 2022 03:58:09 -0700 (PDT) Received: from eprince ([193.118.249.171]) by smtp.gmail.com with ESMTPSA id e22-20020a170906505600b006da7d71f25csm2568890ejk.41.2022.04.16.03.58.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Apr 2022 03:58:08 -0700 (PDT) From: Tino Calancha To: Eli Zaretskii Subject: Re: bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter References: <87ee27fd1a.fsf@gmail.com> <83bkxaaj45.fsf@gnu.org> Date: Sat, 16 Apr 2022 12:58:06 +0200 In-Reply-To: <83bkxaaj45.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 09 Apr 2022 09:03:38 +0300") Message-ID: <878rs55m81.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 3.5 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eli Zaretskii writes: >> A wishlist for the `zap-to-char' and `zap-up-to-char': >> In interactive calls, when users input an upper-case letter then perform >> a case-sensitive search. >> >> This behavior is analog to what [...] Content analysis details: (3.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [193.118.249.171 listed in zen.spamhaus.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tino.calancha[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.45 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.45 listed in wl.mailspike.net] -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Debbugs-Envelope-To: 54804 Cc: 54804@debbugs.gnu.org, uyennhi.qm@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.5 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eli Zaretskii writes: >> A wishlist for the `zap-to-char' and `zap-up-to-char': >> In interactive calls, when users input an upper-case letter then perform >> a case-sensitive search. >> >> This behavior is analog to what [...] Content analysis details: (2.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.45 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.45 listed in wl.mailspike.net] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [193.118.249.171 listed in zen.spamhaus.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tino.calancha[at]gmail.com) -0.0 T_SCC_BODY_TEXT_LINE No description available. -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Eli Zaretskii writes: >> A wishlist for the `zap-to-char' and `zap-up-to-char': >> In interactive calls, when users input an upper-case letter then perform >> a case-sensitive search. >> >> This behavior is analog to what `isearch' does. > > but why does the implementation have to be so complicated? > Isn't this just about turning off case-fold-search while searching for > the character? What am I missing? The patch is moving the shared code in zap-to/zap-up-to in a helper function. This has 2 motivations: - reduce the code duplication. - define these two related functions close each other. - separate the logic of the function to calculate the region to kill. If you prefer, we can keep the functions in their current locations (simple.el/misc.el) with a patch like this one: --8<-----------------------------cut here---------------start------------->8--- diff --git a/lisp/misc.el b/lisp/misc.el index d85f889ffd..e771d2b315 100644 --- a/lisp/misc.el +++ b/lisp/misc.el @@ -64,20 +64,32 @@ copy-from-above-command ;; Variation of `zap-to-char'. ;;;###autoload -(defun zap-up-to-char (arg char) +(defun zap-up-to-char (arg char &optional interactive) "Kill up to, but not including ARGth occurrence of CHAR. Case is ignored if `case-fold-search' is non-nil in the current buffer. Goes backward if ARG is negative; error if CHAR not found. -Ignores CHAR at point." +Ignores CHAR at point. +Called interactively, do a case sensitive search if the char is an +upper case letter." (interactive (list (prefix-numeric-value current-prefix-arg) (read-char-from-minibuffer "Zap up to char: " - nil 'read-char-history))) - (let ((direction (if (>= arg 0) 1 -1))) + nil 'read-char-history) + t)) + ;; Avoid "obsolete" warnings for translation-table-for-input. + (with-no-warnings + (if (char-table-p translation-table-for-input) + (setq char (or (aref translation-table-for-input char) char)))) + (let* ((direction (if (>= arg 0) 1 -1)) + (str (char-to-string char)) + (upper-case (let (case-fold-search) (string-match-p "[[:upper:]]" str))) + (case-fold-search (if (and interactive upper-case) + nil + case-fold-search))) (kill-region (point) (progn (forward-char direction) (unwind-protect - (search-forward (char-to-string char) nil nil arg) + (search-forward str nil nil arg) (backward-char direction)) (point))))) diff --git a/lisp/simple.el b/lisp/simple.el index eb65701803..2f3c43b9db 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -6031,21 +6031,27 @@ backward-delete-char-untabify ;; Avoid warning about delete-backward-char (with-no-warnings (delete-backward-char n killp)))) -(defun zap-to-char (arg char) +(defun zap-to-char (arg char &optional interactive) "Kill up to and including ARGth occurrence of CHAR. Case is ignored if `case-fold-search' is non-nil in the current buffer. Goes backward if ARG is negative; error if CHAR not found. -See also `zap-up-to-char'." +See also `zap-up-to-char'. +Called interactively, do a case sensitive search if the char is an +upper case letter." (interactive (list (prefix-numeric-value current-prefix-arg) (read-char-from-minibuffer "Zap to char: " - nil 'read-char-history))) + nil 'read-char-history)) + t) ;; Avoid "obsolete" warnings for translation-table-for-input. (with-no-warnings (if (char-table-p translation-table-for-input) (setq char (or (aref translation-table-for-input char) char)))) - (kill-region (point) (progn - (search-forward (char-to-string char) nil nil arg) - (point)))) + (let* ((str (char-to-string char)) + (upper-case (let (case-fold-search) (string-match-p "[[:upper:]]" str))) + (case-fold-search (if (and interactive upper-case) + nil + case-fold-search))) + (kill-region (point) (search-forward str nil nil arg)))) ;; kill-line and its subroutines. --8<-----------------------------cut here---------------end--------------->8--- From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 16 07:33:45 2022 Received: (at 54804) by debbugs.gnu.org; 16 Apr 2022 11:33:45 +0000 Received: from localhost ([127.0.0.1]:60876 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nfggS-0002oF-O3 for submit@debbugs.gnu.org; Sat, 16 Apr 2022 07:33:45 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56000) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nfggQ-0002o1-4U for 54804@debbugs.gnu.org; Sat, 16 Apr 2022 07:33:43 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59380) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nfggK-0000NX-Ld; Sat, 16 Apr 2022 07:33:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=3xTQlr0X4mKF3Br0eGQL4o31xjPYFgmHyTKpiiWcD8s=; b=BB4xGsHR4xkl IeP2PUnF3zI09Aia3evsYIjtc+zcUjUlpu+bxCJN1VCeJgb4+p38dDDWI1gnZsGSLZ+/jMxnQ+TWu EDPgHJJmVRdWiV5M4Ibu0+hsWY7pcxUbLwXk3Wc+OC+92n60xcYBGT0P+8vGvMBDGb2lpcYbW2uh8 S6/rdLpF3BNRNJ9vzo+5JcAi9DSkpqP1epAN6jVIiY38ywxP1Nky7Gy5pAyFzDktFqv06t5xH+qAS ZPGP6SSwqXGBWRRZIUsGYIPmYVeoewqMEmySLCeJb8VeIEq68eyHG5hDxdvU8rKnl6X4tCZmaFDq4 JJydU2KhRLL0VAzT6gVC/w==; Received: from [87.69.77.57] (port=2584 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nfggJ-0000cs-V8; Sat, 16 Apr 2022 07:33:36 -0400 Date: Sat, 16 Apr 2022 14:33:45 +0300 Message-Id: <834k2t1cva.fsf@gnu.org> From: Eli Zaretskii To: Tino Calancha In-Reply-To: <878rs55m81.fsf@gmail.com> (message from Tino Calancha on Sat, 16 Apr 2022 12:58:06 +0200) Subject: Re: bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter References: <87ee27fd1a.fsf@gmail.com> <83bkxaaj45.fsf@gnu.org> <878rs55m81.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54804 Cc: 54804@debbugs.gnu.org, uyennhi.qm@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Tino Calancha > Cc: 54804@debbugs.gnu.org, uyennhi.qm@gmail.com > Date: Sat, 16 Apr 2022 12:58:06 +0200 > > Eli Zaretskii writes: > > > but why does the implementation have to be so complicated? > > Isn't this just about turning off case-fold-search while searching for > > the character? What am I missing? > > The patch is moving the shared code in zap-to/zap-up-to in a > helper function. This has 2 motivations: > - reduce the code duplication. > - define these two related functions close each other. > - separate the logic of the function to calculate the region to kill. > > If you prefer, we can keep the functions in their current > locations (simple.el/misc.el) with a patch like this one: What I'd prefer is to have a single function (in subr.el) that determines whether a character is an upper- or lower-case, and then use that function in a simple condition in these two commands. The function to check whether a character is upper-case doesn't have to make a string from the character and then use the "heavy artillery" of string-match-p, it could instead use something like (characterp (get-char-code-property CHAR 'uppercase)) (But beware of the situation where the Unicode tables are not yet available during bootstrap -- in those cases the function should IMO punt and return nil no matter what the character is, or maybe support just the ASCII characters. To test whether the 'uppercase table is available, see if unicode-property-table-internal returns non-nil.) > + ;; Avoid "obsolete" warnings for translation-table-for-input. > + (with-no-warnings > + (if (char-table-p translation-table-for-input) > + (setq char (or (aref translation-table-for-input char) char)))) translation-table-for-input is obsolete for a reason, so adding it to a new function is not something we want to do. If anything, we should remove it from the old function. From debbugs-submit-bounces@debbugs.gnu.org Mon May 09 12:17:22 2022 Received: (at 54804) by debbugs.gnu.org; 9 May 2022 16:17:22 +0000 Received: from localhost ([127.0.0.1]:59258 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1no64Y-0007Xq-0V for submit@debbugs.gnu.org; Mon, 09 May 2022 12:17:22 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:58079) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1no64W-0007Xd-CT for 54804@debbugs.gnu.org; Mon, 09 May 2022 12:17:20 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 4FD2A5C019F; Mon, 9 May 2022 12:17:15 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 09 May 2022 12:17:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=cc:cc:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1652113035; x=1652199435; bh=b+ MbTMkX6Jwpk190zWrf2nNuagHd/4wSz1rf5IV1K28=; b=L8EiNBxTf8AQaDhk8W HM0sVyo3F2/DdvzaSLYu3M2E1nnsMswCCGXO50JSwE3Sqd02mk9Ax3bB1qW6So8D TTLfWoOZuNwLIn8Uko7GxkSWDCThW9H6kmXYbSQ0t0yV/mq1TwXWp57gdI1a9ojT h18YAmxXG1BXb3BRkyJjvX1bFcWufohu7FepfVjOrsHiuwmUTOGlKDHVXtw6NMny gb1G5LW/M8aXFxHEW8yoSxMBrsxbWf17bjUGvP4lrY49ks8PrEAQ/lXuUd/+nHYR ryQg+nvTIX+1wMPF8asalIe7ZPmKEtf9GTaaetX5QDNnPs9BeLzv5KoRWaFxiEMm uHIA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1652113035; x= 1652199435; bh=b+MbTMkX6Jwpk190zWrf2nNuagHd/4wSz1rf5IV1K28=; b=w a/syl1iu1gWF/MiY7bqVUA8mwtg62chhQqVnD1UhK1tWPFKp7VUoO4wPfu01geSS 43T1YGZwTqXPCSSjutN1eadyD7ucTu+4n9CLeCkTxUQQWGZkySN16+aPcGnKhbpU xVYUhJ1LvtA6257eAZMqWn/NbvcpWb5YWgEZzGKLx6bKgei1pt4cCaRfR8/UnZbb rjoo+3SgaKwfpFzYa4xi2WvbMdX9ikP0HYl8IVzflf22K2LX3uriBKYkGxgT1bp8 L4S6Y5HOSUAmgmy43NNcAuFgCNeVllMQr1qEEZHHUHSNJxSQozIG5vQBWzFCZkeN 4PYw0VmumDKNxbDYthPBA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeelgdelkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufgjfhgffffkgggtsehttddttddtredtnecuhfhrohhmpefuvggrnhcu hghhihhtthhonhcuoehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvgeqne cuggftrfgrthhtvghrnhepvdejtedtieetjeegjeekgffghedtkeeltdeftdetkefgueek fedtudfhteeljeeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 9 May 2022 12:17:14 -0400 (EDT) Received: by athena.silentflame.com (Postfix, from userid 1000) id 8E62C1B8942; Mon, 9 May 2022 16:17:13 +0000 (UTC) From: Sean Whitton To: Tino Calancha Subject: Re: bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter In-Reply-To: <834k2t1cva.fsf@gnu.org> References: <87ee27fd1a.fsf@gmail.com> <83bkxaaj45.fsf@gnu.org> <878rs55m81.fsf@gmail.com> <834k2t1cva.fsf@gnu.org> User-Agent: Notmuch/0.36 Emacs/29.0.50 (x86_64-pc-linux-gnu) Date: Mon, 09 May 2022 09:17:13 -0700 Message-ID: <87pmkmsmt2.fsf@athena.silentflame.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 54804 Cc: 54804@debbugs.gnu.org, Eli Zaretskii , uyennhi.qm@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hello Tino, Any progress on this? I would like this functionality. Thanks. On Sat 16 Apr 2022 at 02:33pm +03, Eli Zaretskii wrote: >> From: Tino Calancha >> Cc: 54804@debbugs.gnu.org, uyennhi.qm@gmail.com >> Date: Sat, 16 Apr 2022 12:58:06 +0200 >> >> Eli Zaretskii writes: >> >> > but why does the implementation have to be so complicated? >> > Isn't this just about turning off case-fold-search while searching for >> > the character? What am I missing? >> >> The patch is moving the shared code in zap-to/zap-up-to in a >> helper function. This has 2 motivations: >> - reduce the code duplication. >> - define these two related functions close each other. >> - separate the logic of the function to calculate the region to kill. >> >> If you prefer, we can keep the functions in their current >> locations (simple.el/misc.el) with a patch like this one: > > What I'd prefer is to have a single function (in subr.el) that > determines whether a character is an upper- or lower-case, and then > use that function in a simple condition in these two commands. > > The function to check whether a character is upper-case doesn't have > to make a string from the character and then use the "heavy artillery" > of string-match-p, it could instead use something like > > (characterp (get-char-code-property CHAR 'uppercase)) > > (But beware of the situation where the Unicode tables are not yet > available during bootstrap -- in those cases the function should IMO > punt and return nil no matter what the character is, or maybe support > just the ASCII characters. To test whether the 'uppercase table is > available, see if unicode-property-table-internal returns non-nil.) > >> + ;; Avoid "obsolete" warnings for translation-table-for-input. >> + (with-no-warnings >> + (if (char-table-p translation-table-for-input) >> + (setq char (or (aref translation-table-for-input char) char)))) > > translation-table-for-input is obsolete for a reason, so adding it to > a new function is not something we want to do. If anything, we should > remove it from the old function. > > > -- Sean Whitton From debbugs-submit-bounces@debbugs.gnu.org Tue May 10 17:14:30 2022 Received: (at 54804) by debbugs.gnu.org; 10 May 2022 21:14:30 +0000 Received: from localhost ([127.0.0.1]:35330 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1noXBe-000730-AW for submit@debbugs.gnu.org; Tue, 10 May 2022 17:14:30 -0400 Received: from mail-wm1-f53.google.com ([209.85.128.53]:55823) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1noXBd-00072p-Df for 54804@debbugs.gnu.org; Tue, 10 May 2022 17:14:29 -0400 Received: by mail-wm1-f53.google.com with SMTP id m62so85152wme.5 for <54804@debbugs.gnu.org>; Tue, 10 May 2022 14:14:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=U6pfbID/FhtmRldaKk/AgcwblUk9n+ML2JDexGekCck=; b=A8iXPa0Wy8wksgH+OO7PqA3BJX7utg74XMh2Ea1B2oH5wpEkP9ksETzAmh35I94s2C gLGCXggb0luFhY+rLNojDdPgL6xPyqssrsmgkHMUPYAs0XclLLAo2GAfybvqHgDMxQ0K Ip8u+15bWtbgwW+lE99+WOSu+N6SBcNbQ2mvOk04oSGQ8XyWCCAjBRtczwTdicvX2Muz 44g3lb+L2fSdtsJJi/GWovhPVr2W6gOHaDdMwgQpCPzzi44ELt18B8s4Vo0i5miaM+Gv 5St3hR8E9WPx21Lv2+WpkCzHJ2gE5VpuMURjvsphtmYLcKidV+vA4M8+jOr04xrOabxn pxcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=U6pfbID/FhtmRldaKk/AgcwblUk9n+ML2JDexGekCck=; b=bhePLHtu8dMVOpBQzNLH1nZOTDv63PvJ78NksjzpgOuFSv1yRr0tvZzrRnNc8pSgZz +Rm2joSb7iI7XWLtYe2PWBieoO6O26jl9JB3C2qHY3c4hJM0JyeI0xGWDyA/fsxa1z7E MwCcdQ7DTBi1irgIXyoACaPLN0Kh6OFX52HeJGq6mOwMcycSIJvaHc+NdHHmos5SDujL ie3Cp8aewN3uX7P6t3iTRho4uzCz/Xvc9Pz/d3MbfSNvii/XYnNreuEkIxCSXmAwTs8P 9UYBLdjs9ivYdyGZUvaIKZojLAOIGQA56perWWskEqnT2xI2Z8V9RvxyJ+fh8a0cI4kA a6iA== X-Gm-Message-State: AOAM532iYSZpiak6T4p2kGit+o0oLgqUY91Q6dYTqvPH8/Tghb4aJItq iqd7lk1KoRg0DlUwg2fpi9w= X-Google-Smtp-Source: ABdhPJx6n0gkgpN0nWyYc3m1SI7y2zBHnysvukQ41FHOpOZtBU6D814/bBaVZX7KiZsywa84umAteQ== X-Received: by 2002:a05:600c:5104:b0:394:5d72:ff81 with SMTP id o4-20020a05600c510400b003945d72ff81mr1740705wms.123.1652217263084; Tue, 10 May 2022 14:14:23 -0700 (PDT) Received: from eprince ([193.118.249.171]) by smtp.gmail.com with ESMTPSA id y12-20020a056000168c00b0020c5253d8d4sm17330323wrd.32.2022.05.10.14.14.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 May 2022 14:14:22 -0700 (PDT) From: Tino Calancha To: Eli Zaretskii Subject: Re: bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter References: <87ee27fd1a.fsf@gmail.com> <83bkxaaj45.fsf@gnu.org> <878rs55m81.fsf@gmail.com> <834k2t1cva.fsf@gnu.org> Date: Tue, 10 May 2022 23:14:20 +0200 In-Reply-To: <834k2t1cva.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 16 Apr 2022 14:33:45 +0300") Message-ID: <87ilqdnl8z.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 3.5 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eli Zaretskii writes: > What I'd prefer is to have a single function (in subr.el) that > determines whether a character is an upper- or lower-case > it could instead use something like > > (characterp (get-char-code-property CHAR 'uppercase)) > > (But beware of the situation where the Unicode tables are not yet > available during bootstrap -- in [...] Content analysis details: (3.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [193.118.249.171 listed in zen.spamhaus.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tino.calancha[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.128.53 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.128.53 listed in wl.mailspike.net] -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Debbugs-Envelope-To: 54804 Cc: 54804@debbugs.gnu.org, uyennhi.qm@gmail.com, Sean Whitton X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.5 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eli Zaretskii writes: > What I'd prefer is to have a single function (in subr.el) that > determines whether a character is an upper- or lower-case > it could instead use something like > > (characterp (get-char-code-property CHAR 'uppercase)) > > (But beware of the situation where the Unicode tables are not yet > available during bootstrap -- in [...] Content analysis details: (2.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.128.53 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.128.53 listed in wl.mailspike.net] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [193.118.249.171 listed in zen.spamhaus.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tino.calancha[at]gmail.com) -0.0 T_SCC_BODY_TEXT_LINE No description available. -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Eli Zaretskii writes: > What I'd prefer is to have a single function (in subr.el) that > determines whether a character is an upper- or lower-case > it could instead use something like > > (characterp (get-char-code-property CHAR 'uppercase)) > > (But beware of the situation where the Unicode tables are not yet > available during bootstrap -- in those cases the function should IMO > punt and return nil no matter what the character is, or maybe support > just the ASCII characters. To test whether the 'uppercase table is > available, see if unicode-property-table-internal returns non-nil.) Is it the following implementation OK for such a function? --8<-----------------------------cut here---------------start------------->= 8--- commit 74dd575d3ca8e5217a3c1457dbc011007ecc0800 Author: Tino Calancha Date: Tue May 10 23:01:34 2022 +0200 Add char-upcase-p predicate diff --git a/lisp/simple.el b/lisp/simple.el index edcc226bfa..dc5e0f2ce8 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -6054,6 +6054,14 @@ backward-delete-char-untabify ;; Avoid warning about delete-backward-char (with-no-warnings (delete-backward-char n killp)))) =20 +(defun char-upcase-p (char) + "Return non-nil if CHAR is an upper-case unicode character. +If the Unicode tables are not yet available, e.g. during bootstrap, +then the function restricts to the ASCII character set." + (cond ((unicode-property-table-internal 'lowercase) + (characterp (get-char-code-property char 'lowercase))) + ((and (>=3D char ?A) (<=3D char ?Z))))) + (defun zap-to-char (arg char) "Kill up to and including ARGth occurrence of CHAR. Case is ignored if `case-fold-search' is non-nil in the current buffer. diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el index 89803e5ce2..8072cd9a61 100644 --- a/test/lisp/subr-tests.el +++ b/test/lisp/subr-tests.el @@ -1074,5 +1074,12 @@ test-local-set-state (should (=3D subr-test--local 2)) (should-not (boundp 'subr-test--unexist))))) =20 +(ert-deftest test-char-upcase-p () + "Tests for `char-upcase-p'." + (dolist (c (list ?R ?S ?=CE=A9 ?=CE=A8)) + (should (char-upcase-p c))) + (dolist (c (list ?a ?b ?=CE=B1 ?=CE=B2)) + (should-not (char-upcase-p c)))) + (provide 'subr-tests) ;;; subr-tests.el ends here --8<-----------------------------cut here---------------end--------------->= 8--- From debbugs-submit-bounces@debbugs.gnu.org Wed May 11 07:15:12 2022 Received: (at 54804) by debbugs.gnu.org; 11 May 2022 11:15:12 +0000 Received: from localhost ([127.0.0.1]:36216 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nokJE-0008CF-Av for submit@debbugs.gnu.org; Wed, 11 May 2022 07:15:12 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51236) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nokJD-0008C2-AW for 54804@debbugs.gnu.org; Wed, 11 May 2022 07:15:11 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36912) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nokJ4-0002yJ-4i; Wed, 11 May 2022 07:15:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=8hq92LqBz65OgSXyQP6Vfsp45Dybm1Bp2XcbwCbeDXk=; b=Wbriv6vn0RH8 Oza9BYdPQc0xQLoiVF8z2kCHneC0hW/DdFKYmqiI33p7h3U+3b/BbLzwG3+UZW6e4cqqo2oEfjFzL Kl1bPPfmrbN9ZlCT5Er1oUrs2Glvk/Nm1eXCyLeFZh1J423GpyIvLuTR4gP6mH70RBt8+aQMfEsSW hkZnQ2wEK93rVk0RuYr3oZLG1bQDg1olaSSk8CC8iIGILNXpThrIAED3IyZQ/ntNs/4GbIr1Y1syK GzDlmE7Ts1MvRMmVXszUC5CDsBkZthcvo12VX67aiuXf14RxByueALifupUJz1+c19HRz6xHIw1K/ sv6tH6hAT0CFm3dwbwPI6Q==; Received: from [87.69.77.57] (port=4910 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nokJ3-0005rJ-17; Wed, 11 May 2022 07:15:01 -0400 Date: Wed, 11 May 2022 14:15:00 +0300 Message-Id: <83bkw4s4ln.fsf@gnu.org> From: Eli Zaretskii To: Tino Calancha In-Reply-To: <87ilqdnl8z.fsf@gmail.com> (message from Tino Calancha on Tue, 10 May 2022 23:14:20 +0200) Subject: Re: bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter References: <87ee27fd1a.fsf@gmail.com> <83bkxaaj45.fsf@gnu.org> <878rs55m81.fsf@gmail.com> <834k2t1cva.fsf@gnu.org> <87ilqdnl8z.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54804 Cc: 54804@debbugs.gnu.org, uyennhi.qm@gmail.com, spwhitton@spwhitton.name X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Tino Calancha > Cc: 54804@debbugs.gnu.org, uyennhi.qm@gmail.com, Sean Whitton > > Date: Tue, 10 May 2022 23:14:20 +0200 > > Eli Zaretskii writes: > > > What I'd prefer is to have a single function (in subr.el) that > > determines whether a character is an upper- or lower-case > > > it could instead use something like > > > > (characterp (get-char-code-property CHAR 'uppercase)) > > > > (But beware of the situation where the Unicode tables are not yet > > available during bootstrap -- in those cases the function should IMO > > punt and return nil no matter what the character is, or maybe support > > just the ASCII characters. To test whether the 'uppercase table is > > available, see if unicode-property-table-internal returns non-nil.) > > Is it the following implementation OK for such a function? Yes, thanks. But please call it char-uppercase-p ("upcase" has the meaning of making a character upper-case). From debbugs-submit-bounces@debbugs.gnu.org Wed May 11 10:43:17 2022 Received: (at 54804) by debbugs.gnu.org; 11 May 2022 14:43:17 +0000 Received: from localhost ([127.0.0.1]:38078 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nonYb-0004zB-5p for submit@debbugs.gnu.org; Wed, 11 May 2022 10:43:17 -0400 Received: from mail-wm1-f51.google.com ([209.85.128.51]:40948) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nonYZ-0004yt-59 for 54804@debbugs.gnu.org; Wed, 11 May 2022 10:43:15 -0400 Received: by mail-wm1-f51.google.com with SMTP id v64-20020a1cac43000000b0038cfd1b3a6dso3370576wme.5 for <54804@debbugs.gnu.org>; Wed, 11 May 2022 07:43:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=upv3XSTTi+blyBLGVcJVNbQO2jDf8du7vEBV/j4568k=; b=Mg++I1IkSv5anlwPJF4CTdDdQrnbCwDFCUfLgseSY82f6NIJ+dgdWpNEK90Tbzejln 5T/dR+MhmUiqt3h9DSRhdzdeXot8UH0GO1hozjBuvGYPtEhepJ++IzGiiAaCiA8vKJIa UcZY3Xw30ctngFyq4xzDMxdlYU9T9uP+HArPuhDY/encFRc+mid6EM7mJcUrNq0NoSSw xBRmFmf/4dA1onzxVIoi7jxH8UIKTquwA0x2LACAp2MhDXwsZT4Qdwni479T+hxMHdi4 VWeQj9csWliOxX7LcT1+6TVW5Rat4WUAPiKJgVkrAIbqctv3KXuqqjljdoWsQYsbyTNU HK3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=upv3XSTTi+blyBLGVcJVNbQO2jDf8du7vEBV/j4568k=; b=5+3V64O/pYCC7C4OseNHYDCInmOPx1nj6DXJYmJ15ElX9NvHqRMVuZAL39x655ubPC qMBRlSmLkgYuYoxCZAVpoijiOUY8BGwPuep+eICeH7ah8uVWpdT6bA1PnraGkSydvb8P R5MBlgrRdQqqhWdH33KTM3RiwBstjpFRa/JpJvY+zCLCuDgJfpz4G2F6sgXExAU2PXka JkIKnv+zr9tsKKxJ8Ja0AQ6hMSNeTlM/8TQkUNdoG7NhPAfYftQvZaXrH9ulL35Xob/o VKS0aCmqhB25MhSh6SWIrED9P3WNtYL3s05lw/fB5Rv1V+3TuLZHO7uvcsuf/nSvTGq9 RV4w== X-Gm-Message-State: AOAM532U5TtgDYN1FvhkvffLDJ8GXL4GKhVji8kKAQyYtKdZ6Tj9JFUa 4cHt1DwR5VN30m+SsQG50QY= X-Google-Smtp-Source: ABdhPJwpbi34g3oNlH4qmMot9tIJ+emPqBPuSpzo2DkAnGKptA7kxbK1k43Lh2TiP7EXy6xlhRNqGw== X-Received: by 2002:a1c:6a01:0:b0:37f:1b18:6b17 with SMTP id f1-20020a1c6a01000000b0037f1b186b17mr5215060wmc.146.1652280189124; Wed, 11 May 2022 07:43:09 -0700 (PDT) Received: from eprince ([193.118.249.171]) by smtp.gmail.com with ESMTPSA id w17-20020a05600018d100b0020c5253d90asm1905836wrq.86.2022.05.11.07.43.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 May 2022 07:43:08 -0700 (PDT) From: Tino Calancha To: Eli Zaretskii Subject: Re: bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter References: <87ee27fd1a.fsf@gmail.com> <83bkxaaj45.fsf@gnu.org> <878rs55m81.fsf@gmail.com> <834k2t1cva.fsf@gnu.org> <87ilqdnl8z.fsf@gmail.com> <83bkw4s4ln.fsf@gnu.org> Date: Wed, 11 May 2022 16:43:06 +0200 In-Reply-To: <83bkw4s4ln.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 11 May 2022 14:15:00 +0300") Message-ID: <87fslgnn9h.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 54804 Cc: 54804@debbugs.gnu.org, uyennhi.qm@gmail.com, spwhitton@spwhitton.name X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> Is it the following implementation OK for such a function? > > Yes, thanks. But please call it char-uppercase-p ("upcase" has the > meaning of making a character upper-case). I'd like to add this `char-uppercase-p'. Once merged, I will finish with the goal of the report. I appreciate a hand with the documentation part. --8<-----------------------------cut here---------------start------------->= 8--- commit aa270a4b8813ac226a61d8e6919f68e9e4ed0973 Author: Tino Calancha Date: Wed May 11 16:34:33 2022 +0200 char-uppercase-p: New predicate =20=20=20=20 Return non-nil if its argument is an upper-case unicode character. =20=20=20=20 Suggested in Bug#54804. =20=20=20=20 * lisp/subr.el (char-uppercase-p): New defun. * etc/NEWS (Lisp Changes in Emacs 29.1): Announce it * doc/lispref/display.texi (Size of Displayed Text): Document it. * test/lisp/subr-tests.el (test-char-uppercase-p): Add a test. diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 9650d22790..1c32458d62 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -2010,6 +2010,14 @@ Size of Displayed Text (@pxref{Usual Display}). @end defun =20 +@defun char-uppercase-p char +This function returns non-nil if @var{char} is an uppercase unicode +character. Be aware that if the Unicode tables are not yet available, +e.g. during bootstrap, then this function gives the right answer only +for @acronym{ASCII} characters; for other characters the function +unconditionally returns @code{nil}. +@end defun + @defun string-width string &optional from to This function returns the width in columns of the string @var{string}, if it were displayed in the current buffer and the selected window. diff --git a/etc/NEWS b/etc/NEWS index 991088a067..57c254bce8 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1794,6 +1794,10 @@ value. The byte compiler will now issue a warning i= f it encounters these forms. =20 =20 ++++ +*** The new predicate 'char-uppercase-p' returns non-nil if its +argument its an uppercase unicode character. + +++ *** 'restore-buffer-modified-p' can now alter buffer auto-save state. With a FLAG value of 'autosaved', it will mark the buffer as having diff --git a/lisp/simple.el b/lisp/simple.el index 89fb0ea97e..525e636ab6 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -6054,6 +6054,14 @@ backward-delete-char-untabify ;; Avoid warning about delete-backward-char (with-no-warnings (delete-backward-char n killp)))) =20 +(defun char-uppercase-p (char) + "Return non-nil if CHAR is an upper-case unicode character. +If the Unicode tables are not yet available, e.g. during bootstrap, +then the function restricts to the ASCII character set." + (cond ((unicode-property-table-internal 'lowercase) + (characterp (get-char-code-property char 'lowercase))) + ((and (>=3D char ?A) (<=3D char ?Z))))) + (defun zap-to-char (arg char) "Kill up to and including ARGth occurrence of CHAR. Case is ignored if `case-fold-search' is non-nil in the current buffer. diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el index 89803e5ce2..a25eb363b0 100644 --- a/test/lisp/subr-tests.el +++ b/test/lisp/subr-tests.el @@ -1074,5 +1074,12 @@ test-local-set-state (should (=3D subr-test--local 2)) (should-not (boundp 'subr-test--unexist))))) =20 +(ert-deftest test-char-uppercase-p () + "Tests for `char-uppercase-p'." + (dolist (c (list ?R ?S ?=CE=A9 ?=CE=A8)) + (should (char-uppercase-p c))) + (dolist (c (list ?a ?b ?=CE=B1 ?=CE=B2)) + (should-not (char-uppercase-p c)))) + (provide 'subr-tests) ;;; subr-tests.el ends here --8<-----------------------------cut here---------------end--------------->= 8--- From debbugs-submit-bounces@debbugs.gnu.org Wed May 11 10:50:13 2022 Received: (at 54804) by debbugs.gnu.org; 11 May 2022 14:50:13 +0000 Received: from localhost ([127.0.0.1]:38082 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nonfJ-0007Og-0y for submit@debbugs.gnu.org; Wed, 11 May 2022 10:50:13 -0400 Received: from quimby.gnus.org ([95.216.78.240]:42554) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nonfH-0007OP-Ds for 54804@debbugs.gnu.org; Wed, 11 May 2022 10:50:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=J+WaVqAIJ0oeUDOdN6/+deUsrPJhW5HMUtmuYQsexlQ=; b=Lmky+bMSHk20TXbpjKaCgs0RS+ oUBWHakbo1XW8dg2j3Ed28WrSVekxGg10aojbnpxsEk1+AbukXE0x3jH3lS8sXJmwgT4JxkLUHk8F FKeGU6MAwFy+74yhSdVXrje236f6ZWo6lWrxSIlljJTJ+HCEJfJjK+0Dyn/GN2WLz/9o=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nonf7-0000vu-Lj; Wed, 11 May 2022 16:50:03 +0200 From: Lars Ingebrigtsen To: Tino Calancha Subject: Re: bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter References: <87ee27fd1a.fsf@gmail.com> <83bkxaaj45.fsf@gnu.org> <878rs55m81.fsf@gmail.com> <834k2t1cva.fsf@gnu.org> <87ilqdnl8z.fsf@gmail.com> <83bkw4s4ln.fsf@gnu.org> <87fslgnn9h.fsf@gmail.com> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAG1BMVEXPrF6ujFCUZ0tw SThYNTCPX0IwJCbxsJn////JGNv/AAAAAWJLR0QIht6VegAAAAd0SU1FB+YFCw4xA0biIUwAAAGW SURBVDjLbdRNVoMwEAfw1BM0+DwAg3GtTnBvM3KAYLxAU/bef+NMPiBQ57Xlld/7zxCaohSXHsgi ogcDUgbRRlUgeIBeg5bqPAyUoMsADPzZFzhnCNJEa+g4Z2bDrSQ7OJjHELy8wfMMSWh91gKWHCK/ uCgwnLQ6dQPC8LGs5UJwyncaBk7swZDS6iwzgmngKgkZrg+JazAVjjPAlZWjLwByIL+BmRPEX/rh hDdHWMzb8x7qjFdlJwE6QHzVL9NybSBkoM+Hb2Yf3BEu3XddYIEy3JLlRFhbuQ2IYTxCvDDw8DHc weWBWzHkGacV3Ndgp39g6XHmIbG2OvFmyPBlsZ3BMDJEvkvWJph3IAnMl7sC744E7zMHloh3ECkD rq0KLBWme+DzGzyuEBmmHfCCU/GBomsTU908cQPVJArQPyCtbE3EHSyO1lbp+murBmIL0x7eg4EA fd+BftkBkvzLxhmtsztI53Pxl2UDt4FtwGED2LTCDXgCuQo3LY+SVHzrtO4/MjzdID1LuM4CHVQo S+aSH0TqD9A5+sqjv/87AAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIyLTA1LTExVDE0OjQ5OjAzKzAw OjAwFRqxLwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMi0wNS0xMVQxNDo0OTowMyswMDowMGRHCZMA AAAASUVORK5CYII= X-Now-Playing: Joni Mitchell's _Travelogue (1)_: "Love" Date: Wed, 11 May 2022 16:50:00 +0200 In-Reply-To: <87fslgnn9h.fsf@gmail.com> (Tino Calancha's message of "Wed, 11 May 2022 16:43:06 +0200") Message-ID: <87o8046s4n.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Tino Calancha writes: > +This function returns non-nil if @var{char} is an uppercase unicode > +character. Do we need to say "Unicode characters" here? I think many will interpret that to mean that it doesn't work on ASCII characters (which it seems like it's doing). Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54804 Cc: Eli Zaretskii , spwhitton@spwhitton.name, 54804@debbugs.gnu.org, uyennhi.qm@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Tino Calancha writes: > +This function returns non-nil if @var{char} is an uppercase unicode > +character. Do we need to say "Unicode characters" here? I think many will interpret that to mean that it doesn't work on ASCII characters (which it seems like it's doing). -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed May 11 11:00:24 2022 Received: (at 54804) by debbugs.gnu.org; 11 May 2022 15:00:24 +0000 Received: from localhost ([127.0.0.1]:38101 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nonp9-0007j1-Mz for submit@debbugs.gnu.org; Wed, 11 May 2022 11:00:24 -0400 Received: from mail-wr1-f52.google.com ([209.85.221.52]:33498) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nonp7-0007ii-8S for 54804@debbugs.gnu.org; Wed, 11 May 2022 11:00:21 -0400 Received: by mail-wr1-f52.google.com with SMTP id x18so3460094wrc.0 for <54804@debbugs.gnu.org>; Wed, 11 May 2022 08:00:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-transfer-encoding; bh=FrX/PJDQ/QJHzCF/2MNikE1iAeRj1ABcZcH9qaht2WU=; b=NI7T2+PwmYpfHWZQNmpUcL2ugYpBf+YGN9frgIr+ctPTObLNPVtgdhyUNGKOMPfY8h fulQrAid6sQ5aFdrj987s6HqMoMftNHdILgzkdf9PYf54eFiJGh0MxowNQXCPLkURl2C BmiqWvZ4cN1vnhtV6Xk/fHzoDF4U/iyBs51tvUkAbOozOH4CnDsp5+YYJ4AEKODHF7Mp GWv/3onL1nKuVaCmxzyKRQd6mKl6mIR4RcFwDNWRDMPrmIKTAssyaG0vrmmRROVVHAoc 037ZRtXTQgZ1CoERbl4NPyow2s1X3wDObxuF+4P5ysZi6346ospm+6hO6tGgU1rqL0sQ ZN9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=FrX/PJDQ/QJHzCF/2MNikE1iAeRj1ABcZcH9qaht2WU=; b=osEycNX8AtPeYJ5/EDmpCR0anKfurk/b2i2sxsR9LVAKX+PrR8SHszHC8OCa2u38+w b/tYy1GQU/856bNJfh0fcPUrOVgIbIHi1VutBvOytw0hM1RiJkHXlB4c9Qbqy7x5Fdzg U7LJZdrb5YVF/PskJ6BnRsGxUIVXKcWlUMljqZVQrZikb77RnbgqFXnFqlaQx3P2OLG4 13hSutBSNmo0bbNIJFiVQEil+D4tyion8IChXqPv891WN3T3lC7Fh/gg7hs5P7pAEKIo vEcI1JHaN2PoSLzX53gfSbw58VTAFoQFHANb75whLZLBekFiSBKw46AqAEenKXv/yA0e wlHA== X-Gm-Message-State: AOAM530bSTHf3A/eEg8L9xp071AZ1kErh48grxz1NCbqjEut4fncD7F6 0vscU1L7hC56EHvP5oRUEdA= X-Google-Smtp-Source: ABdhPJxy9/O/MtQOBklOJyrvhDNYi2R9GpJ0AYi1lvWCqu1V2/7tEmuRA20jDAqV1bifMFwIfEBHEg== X-Received: by 2002:adf:f90d:0:b0:20c:de32:4d35 with SMTP id b13-20020adff90d000000b0020cde324d35mr2675748wrr.583.1652281214896; Wed, 11 May 2022 08:00:14 -0700 (PDT) Received: from rltb ([2a01:e0a:3f3:fb50:58fa:34f8:3a29:1f3e]) by smtp.gmail.com with ESMTPSA id i3-20020adff303000000b0020c5253d923sm1538877wro.111.2022.05.11.08.00.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 May 2022 08:00:14 -0700 (PDT) From: Robert Pluim To: Tino Calancha Subject: Re: bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter References: <87ee27fd1a.fsf@gmail.com> <83bkxaaj45.fsf@gnu.org> <878rs55m81.fsf@gmail.com> <834k2t1cva.fsf@gnu.org> <87ilqdnl8z.fsf@gmail.com> <83bkw4s4ln.fsf@gnu.org> <87fslgnn9h.fsf@gmail.com> Date: Wed, 11 May 2022 17:00:13 +0200 In-Reply-To: <87fslgnn9h.fsf@gmail.com> (Tino Calancha's message of "Wed, 11 May 2022 16:43:06 +0200") Message-ID: <87lev85d36.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 54804 Cc: Eli Zaretskii , spwhitton@spwhitton.name, 54804@debbugs.gnu.org, uyennhi.qm@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> On Wed, 11 May 2022 16:43:06 +0200, Tino Calancha said: Tino> Eli Zaretskii writes: >>> Is it the following implementation OK for such a function? >>=20 >> Yes, thanks. But please call it char-uppercase-p ("upcase" has the >> meaning of making a character upper-case). Tino> I'd like to add this `char-uppercase-p'. Tino> Once merged, I will finish with the goal of the report. Tino> I appreciate a hand with the documentation part. You=CA=BCre *asking* us to nit-pick? You=CA=BCre a brave person =E2=98=BA= =EF=B8=8F Tino> commit aa270a4b8813ac226a61d8e6919f68e9e4ed0973 Tino> Author: Tino Calancha Tino> Date: Wed May 11 16:34:33 2022 +0200 Tino> char-uppercase-p: New predicate =20=20=20=20 Tino> Return non-nil if its argument is an upper-case unicode chara= cter. =20=20=20=20 Tino> Suggested in Bug#54804. =20=20=20=20 Tino> * lisp/subr.el (char-uppercase-p): New defun. Tino> * etc/NEWS (Lisp Changes in Emacs 29.1): Announce it Tino> * doc/lispref/display.texi (Size of Displayed Text): Document= it. Tino> * test/lisp/subr-tests.el (test-char-uppercase-p): Add a test. Tino> diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi Tino> index 9650d22790..1c32458d62 100644 Tino> --- a/doc/lispref/display.texi Tino> +++ b/doc/lispref/display.texi Tino> @@ -2010,6 +2010,14 @@ Size of Displayed Text Tino> (@pxref{Usual Display}). Tino> @end defun =20 Tino> +@defun char-uppercase-p char Tino> +This function returns non-nil if @var{char} is an uppercase unic= ode Tino> +character. Be aware that if the Unicode tables are not yet avai= lable, Tino> +e.g. during bootstrap, then this function gives the right answer= only Tino> +for @acronym{ASCII} characters; for other characters the function Tino> +unconditionally returns @code{nil}. Tino> +@end defun Tino> + Be active: 'Return non-nil if ...'. So: Return non-@code{nil} if @var{char} is an uppercase character according to Unicode. Be aware that if the Unicode tables are not yet available, e.g. during bootstrap, this gives the correct answer only for @acronym{ASCII} characters; for other characters it always returns @code{nil}. Tino> @defun string-width string &optional from to Tino> This function returns the width in columns of the string @var{st= ring}, Tino> if it were displayed in the current buffer and the selected wind= ow. Tino> diff --git a/etc/NEWS b/etc/NEWS Tino> index 991088a067..57c254bce8 100644 Tino> --- a/etc/NEWS Tino> +++ b/etc/NEWS Tino> @@ -1794,6 +1794,10 @@ value. The byte compiler will now issue a= warning if it encounters Tino> these forms. =20 =20 Tino> ++++ Tino> +*** The new predicate 'char-uppercase-p' returns non-nil if its Tino> +argument its an uppercase unicode character. The header line should fit on one line. So *** New predicate 'char-uppercase-p'. This returns... Tino> + Tino> +++ Tino> *** 'restore-buffer-modified-p' can now alter buffer auto-save s= tate. Tino> With a FLAG value of 'autosaved', it will mark the buffer as hav= ing Tino> diff --git a/lisp/simple.el b/lisp/simple.el Tino> index 89fb0ea97e..525e636ab6 100644 Tino> --- a/lisp/simple.el Tino> +++ b/lisp/simple.el Tino> @@ -6054,6 +6054,14 @@ backward-delete-char-untabify Tino> ;; Avoid warning about delete-backward-char Tino> (with-no-warnings (delete-backward-char n killp)))) =20 Tino> +(defun char-uppercase-p (char) Tino> + "Return non-nil if CHAR is an upper-case unicode character. Tino> +If the Unicode tables are not yet available, e.g. during bootstr= ap, Tino> +then the function restricts to the ASCII character set." I=CA=BCd say 'gives correct answers only for ASCII characters' Robert --=20 From debbugs-submit-bounces@debbugs.gnu.org Wed May 11 11:20:04 2022 Received: (at 54804) by debbugs.gnu.org; 11 May 2022 15:20:04 +0000 Received: from localhost ([127.0.0.1]:38158 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1noo8C-000261-8x for submit@debbugs.gnu.org; Wed, 11 May 2022 11:20:04 -0400 Received: from mail-ed1-f45.google.com ([209.85.208.45]:45672) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1noo8A-00025P-MM for 54804@debbugs.gnu.org; Wed, 11 May 2022 11:20:03 -0400 Received: by mail-ed1-f45.google.com with SMTP id be20so2908648edb.12 for <54804@debbugs.gnu.org>; Wed, 11 May 2022 08:20:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=Ak1+hX+o7eG70X7jzGAvzovEExDytb/CURFF3owyErM=; b=AXCP3x23gnJJIKHfbLOHCo5PHmCK0rpeCBd3dVIB1KuDb3Y77YVG3PA1rgmFPBQ2WI kA8mDSt5acJs/v07aalAX22glOd7cdgTHDJtojaXsOZDR0MUuRueIl4cnUAAlwznuHSS 1RlNEdAkHauZe9NGQC/SHPKo20kFVygCJq9gONOeqdkqNgtwLE7YS4ylu3lZo5qUdZk3 FtN1Km2VkW6P/Dj3R6/DiBWyIa19cU1ZHaANA3zt7gfni0atYs7HZWvGfiQkEVKfDSD7 x0mI1qtCRF2Nd4DlqK1njvHVQebRYafEg7ctMsNoHOQFunWzbliXhjAvux0TEKyP46sR kt8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=Ak1+hX+o7eG70X7jzGAvzovEExDytb/CURFF3owyErM=; b=UjF0Bq8AphUGTqGhzo5HWy/o8UUt5BOSKgNSGkTJi6vAyixnxIBpnBmZWmbk4ppuzW dqdiuHxHKF/CqmLyQMJ7N2m0W9lo+CARwcHd5DKReiEqKcaTugIQqxFYtQYRGHZgfejb Fs6SjVK/0/0QvHI8xSQzJbM8OO6DXNl+PYBfyJCEjCAbpSnidCnxSDEDnZEGm1PV7Uh9 5Y2M9PA6uD12fYF2Lg3MbgLrpLdF9VyMMFrUSGKLK19gtAl5f9p+zJJRJ545v8PyrJQB +dvRqUiHvV6CdlAUnaKl5WDKR1+IERxpLKm7RjXsjmyjq5Z5Tyqep3C2Fvl4IZTTcDQo aQJQ== X-Gm-Message-State: AOAM531/3U67h8sgXr+syXYERNL89hKyyMtVaDPvcSxzuAJAYo+rPkUa 4Oz8/4UB2Zuj+42judnxLU0= X-Google-Smtp-Source: ABdhPJyy5HKyoXEnKRgzFyVSGhPtgsJsMpNeLGBKb36A4dux4nTYG0v7iJnVXuzRm1cTzhlVoZMKVA== X-Received: by 2002:a05:6402:4383:b0:427:b18b:a1b with SMTP id o3-20020a056402438300b00427b18b0a1bmr29681549edc.80.1652282396872; Wed, 11 May 2022 08:19:56 -0700 (PDT) Received: from eprince ([193.118.249.171]) by smtp.gmail.com with ESMTPSA id yj14-20020a170907708e00b006f3ef214e46sm1061557ejb.172.2022.05.11.08.19.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 May 2022 08:19:56 -0700 (PDT) From: Tino Calancha To: Robert Pluim Subject: Re: bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter References: <87ee27fd1a.fsf@gmail.com> <83bkxaaj45.fsf@gnu.org> <878rs55m81.fsf@gmail.com> <834k2t1cva.fsf@gnu.org> <87ilqdnl8z.fsf@gmail.com> <83bkw4s4ln.fsf@gnu.org> <87fslgnn9h.fsf@gmail.com> <87lev85d36.fsf@gmail.com> Date: Wed, 11 May 2022 17:19:55 +0200 In-Reply-To: <87lev85d36.fsf@gmail.com> (Robert Pluim's message of "Wed, 11 May 2022 17:00:13 +0200") Message-ID: <87bkw4nlk4.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 54804 Cc: uyennhi.qm@gmail.com, Eli Zaretskii , 54804@debbugs.gnu.org, spwhitton@spwhitton.name X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Lars Ingebrigtsen writes: > Do we need to say "Unicode characters" here? I think many will > interpret that to mean that it doesn't work on ASCII characters (which > it seems like it's doing). Good point. I have dropped Unicode. Robert Pluim writes: > Tino> I appreciate a hand with the documentation part. > > You=CA=BCre *asking* us to nit-pick? You=CA=BCre a brave person =E2=98=BA= =EF=B8=8F You know, I've never had a native english speaker gf. Sniff, sniff. Thanks for the great suggestions. All are in. Now I am pushing these changes. From debbugs-submit-bounces@debbugs.gnu.org Wed May 11 11:27:13 2022 Received: (at 54804) by debbugs.gnu.org; 11 May 2022 15:27:13 +0000 Received: from localhost ([127.0.0.1]:38175 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nooF7-0002Jn-6l for submit@debbugs.gnu.org; Wed, 11 May 2022 11:27:13 -0400 Received: from mail-out.m-online.net ([212.18.0.10]:54392) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nooF5-0002Je-Dd for 54804@debbugs.gnu.org; Wed, 11 May 2022 11:27:12 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4KyzKn5GXGz1s88t; Wed, 11 May 2022 17:27:09 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4KyzKn2Xj2z1qqkC; Wed, 11 May 2022 17:27:09 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de 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 qDmaCdqFFh_z; Wed, 11 May 2022 17:27:08 +0200 (CEST) X-Auth-Info: IG7HXHA2MsIBmfly348xCzoRUQAP175vLEie2RhITbV6uYaf4f1f/PzGstSAOCb1 Received: from igel.home (ppp-46-244-167-40.dynamic.mnet-online.de [46.244.167.40]) (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; Wed, 11 May 2022 17:27:08 +0200 (CEST) Received: by igel.home (Postfix, from userid 1000) id 08DFE2C377F; Wed, 11 May 2022 17:27:08 +0200 (CEST) From: Andreas Schwab To: Robert Pluim Subject: Re: bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter References: <87ee27fd1a.fsf@gmail.com> <83bkxaaj45.fsf@gnu.org> <878rs55m81.fsf@gmail.com> <834k2t1cva.fsf@gnu.org> <87ilqdnl8z.fsf@gmail.com> <83bkw4s4ln.fsf@gnu.org> <87fslgnn9h.fsf@gmail.com> <87lev85d36.fsf@gmail.com> X-Yow: It's the RINSE CYCLE!! They've ALL IGNORED the RINSE CYCLE!! Date: Wed, 11 May 2022 17:27:07 +0200 In-Reply-To: <87lev85d36.fsf@gmail.com> (Robert Pluim's message of "Wed, 11 May 2022 17:00:13 +0200") Message-ID: <877d6sum2c.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.5 (/) X-Debbugs-Envelope-To: 54804 Cc: uyennhi.qm@gmail.com, Eli Zaretskii , spwhitton@spwhitton.name, 54804@debbugs.gnu.org, Tino Calancha X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.5 (-) On Mai 11 2022, Robert Pluim wrote: > Return non-@code{nil} if @var{char} is an uppercase character > according to Unicode. Be aware that if the Unicode tables are not yet > available, e.g. during bootstrap, this gives the correct answer only > for @acronym{ASCII} characters; for other characters it always returns > @code{nil}. I don't think it is necessary to talk about bootstrapping in the manual. -- 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." From debbugs-submit-bounces@debbugs.gnu.org Wed May 11 11:39:23 2022 Received: (at 54804) by debbugs.gnu.org; 11 May 2022 15:39:23 +0000 Received: from localhost ([127.0.0.1]:38184 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nooQt-0004ra-If for submit@debbugs.gnu.org; Wed, 11 May 2022 11:39:23 -0400 Received: from mail-ed1-f47.google.com ([209.85.208.47]:33707) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nooQr-0004rK-E9 for 54804@debbugs.gnu.org; Wed, 11 May 2022 11:39:21 -0400 Received: by mail-ed1-f47.google.com with SMTP id p4so3115211edx.0 for <54804@debbugs.gnu.org>; Wed, 11 May 2022 08:39:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:date:to:cc:subject:in-reply-to:message-id:references :mime-version; bh=j35V3Ep1Od9xEoNWpRFctIRPtPu09QcrsIgXR58NvxU=; b=GFlvxGG4ZJGhRmRp94XhT5VJY4l8NhDDymdavuHTOHE82vC4BvoNgjXSgFsy9Xph1m 8bodm8ltv6c7mQt62kH2MwAxe6blycFwEsVAh/6b85LeR6gIJEfwUQm0qPJWBRzmTdiZ HNN5YE3XImqEJgJ/08MOdKge3Ys0V55+Nb+KyOmjcEfdwz1unUB28hTXSk5aXpxzhVi2 wA/ABQj9F0uffrUY2U4EW70INpU5QnW4ErQ6Pmhd6A1tOF9Ani1vWkS9p5E5lKarJ3Fa 0LCxHF+CL5ZS7QyjvGom+PweBc32lKcMPJzjPKp1gUKQtnHodKYcrJrT0xWilpeehUFB FzRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:mime-version; bh=j35V3Ep1Od9xEoNWpRFctIRPtPu09QcrsIgXR58NvxU=; b=qgnXdkPXRJUOLTYnR5FtziaZ6+/rkTQv9UW7zSmgw5gt0znVxxJgeGID+jbb+dM8Tn BcvYWSnD2gCwombA+yw4TPOkIJocKGKf1pdtaT0AD4ffsi71Vn4QVRPzNsbP/u93/pEN 9kvY3Pp/fp8thMdHynjTQrX80hUGmZrAS5xHe0rvcuxfQzEni7NmfNSMosanIWeIzxsq +X/S/HFvYJguWd4HuGWLckkRKN1+Yf3Lgrgd6U8naJQsWJWZ2W6AsmGyu+QkYdkY3jwQ lSOXdK4kP/WuBiVoLWfYyT4btTGpiama8EtmyMfa2O98to6newOmVBrGoiYg8VnJg6vO w3qw== X-Gm-Message-State: AOAM532kzpDh3rvVp1t461XTNYIhPzkvk5dW6rHmD6RUUAQma3W6l9dv geuPkQdFbH9WOy1pKUcrN8A= X-Google-Smtp-Source: ABdhPJx04Evg09jTa8TMH62cl41D9fqA4q6dQ4vktr0Uk0gkFixjXKir7VigmoqTHv8o+DLddpqAPQ== X-Received: by 2002:a05:6402:27c9:b0:427:ba7f:6288 with SMTP id c9-20020a05640227c900b00427ba7f6288mr29545252ede.416.1652283555860; Wed, 11 May 2022 08:39:15 -0700 (PDT) Received: from eprince ([193.118.249.171]) by smtp.gmail.com with ESMTPSA id z11-20020a170906668b00b006f4fc3850a5sm1183023ejo.32.2022.05.11.08.39.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 May 2022 08:39:15 -0700 (PDT) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Wed, 11 May 2022 17:38:55 +0200 (CEST) To: Andreas Schwab Subject: Re: bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter In-Reply-To: <877d6sum2c.fsf@igel.home> Message-ID: <4548a66-c8f8-57de-58db-6241a1f16cc4@gmail.com> References: <87ee27fd1a.fsf@gmail.com> <83bkxaaj45.fsf@gnu.org> <878rs55m81.fsf@gmail.com> <834k2t1cva.fsf@gnu.org> <87ilqdnl8z.fsf@gmail.com> <83bkw4s4ln.fsf@gnu.org> <87fslgnn9h.fsf@gmail.com> <87lev85d36.fsf@gmail.com> <877d6sum2c.fsf@igel.home> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 54804 Cc: 54804@debbugs.gnu.org, Tino Calancha , Robert Pluim , Eli Zaretskii , uyennhi.qm@gmail.com, spwhitton@spwhitton.name X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Wed, 11 May 2022, Andreas Schwab wrote: > On Mai 11 2022, Robert Pluim wrote: > >> Return non-@code{nil} if @var{char} is an uppercase character >> according to Unicode. Be aware that if the Unicode tables are not yet >> available, e.g. during bootstrap, this gives the correct answer only >> for @acronym{ASCII} characters; for other characters it always returns >> @code{nil}. > > I don't think it is necessary to talk about bootstrapping in the manual. Right... How about replacing? "available, e.g. during bootstrap, this gives the correct answer only..." with "available, e.g. while compiling the Emac source code, this gives the correct answer only..." PD: I am having issues pushing: my password is not working. If I am not able to make it work, then I will post here the final patch so that someone else can push it. From debbugs-submit-bounces@debbugs.gnu.org Wed May 11 11:57:41 2022 Received: (at 54804) by debbugs.gnu.org; 11 May 2022 15:57:41 +0000 Received: from localhost ([127.0.0.1]:38215 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nooib-0005SF-8r for submit@debbugs.gnu.org; Wed, 11 May 2022 11:57:41 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44192) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nooiZ-0005Ry-Iu for 54804@debbugs.gnu.org; Wed, 11 May 2022 11:57:39 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43796) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nooiU-00049Q-7E; Wed, 11 May 2022 11:57:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=fMfeO6b0ya1VCfogjlWey8+OgR2Klj7ckzjIyl9FzzI=; b=qeSY4LPJpiKy TBeJbZ1xZSGqCNPpWYjTSA0K2kLNyAv2bpnGN1pms5NY1lBhuqF3Up0tx+c+ocnEWC8UxhZ5WY1gN frp9qnLEiOWL3rtNMdORUM750kXmXCOW9D4/zMew+dxr6LqImLaTv7w+6et+PlktsAkCzf7fnboU/ SjEWPpST+rzFgqMs8YtG3AUnmqjB+ljAVZwc28Wc8I8KN0RDog5WivaXyI33CpTaP/w6VxARojbQW jj+PJc3hjjDyXBLGwCPsCwySERZUCtrglUHcX7/9mvFomTzxbm+B18V6rfaya27xGuSpjR4eddR6c t0c9NDW4iByq5xOrptTfOA==; Received: from [87.69.77.57] (port=2556 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nooiS-00045a-4u; Wed, 11 May 2022 11:57:34 -0400 Date: Wed, 11 May 2022 18:57:33 +0300 Message-Id: <83k0asqcya.fsf@gnu.org> From: Eli Zaretskii To: Tino Calancha In-Reply-To: <87fslgnn9h.fsf@gmail.com> (message from Tino Calancha on Wed, 11 May 2022 16:43:06 +0200) Subject: Re: bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter References: <87ee27fd1a.fsf@gmail.com> <83bkxaaj45.fsf@gnu.org> <878rs55m81.fsf@gmail.com> <834k2t1cva.fsf@gnu.org> <87ilqdnl8z.fsf@gmail.com> <83bkw4s4ln.fsf@gnu.org> <87fslgnn9h.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54804 Cc: 54804@debbugs.gnu.org, uyennhi.qm@gmail.com, spwhitton@spwhitton.name X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Tino Calancha > Cc: 54804@debbugs.gnu.org, uyennhi.qm@gmail.com, spwhitton@spwhitton.name > Date: Wed, 11 May 2022 16:43:06 +0200 > > +@defun char-uppercase-p char > +This function returns non-nil if @var{char} is an uppercase unicode ^^^ @code{nil} > +character. Be aware that if the Unicode tables are not yet available, > +e.g. during bootstrap, then this function gives the right answer only > +for @acronym{ASCII} characters; for other characters the function > +unconditionally returns @code{nil}. This manual is not for Emacs developers, it is for Lisp programmers. Therefore, the last sentence should be removed. > ++++ > +*** The new predicate 'char-uppercase-p' returns non-nil if its > +argument its an uppercase unicode character. The first line of a NEWS entry should be a complete sentence, and end with a period. > +(defun char-uppercase-p (char) > + "Return non-nil if CHAR is an upper-case unicode character. Just "upper-case character", no need to say "Unicode". Thanks. From debbugs-submit-bounces@debbugs.gnu.org Wed May 11 12:11:18 2022 Received: (at 54804) by debbugs.gnu.org; 11 May 2022 16:11:18 +0000 Received: from localhost ([127.0.0.1]:38232 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1noovm-00082P-5c for submit@debbugs.gnu.org; Wed, 11 May 2022 12:11:18 -0400 Received: from mail-out.m-online.net ([212.18.0.10]:45757) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1noovj-00082B-Lb for 54804@debbugs.gnu.org; Wed, 11 May 2022 12:11:16 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4Kz0Jf4bbmz1s89M; Wed, 11 May 2022 18:11:14 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4Kz0Jf475Fz1qqkB; Wed, 11 May 2022 18:11:14 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de 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 Pbx-fw5jIR8z; Wed, 11 May 2022 18:11:13 +0200 (CEST) X-Auth-Info: ClWa+b6+DNd6kMeZo6Za95fd1seGzSZ/HHlAvxIp/W+3a0oT2P+3O8jWIsmbsHZT Received: from igel.home (ppp-46-244-167-40.dynamic.mnet-online.de [46.244.167.40]) (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; Wed, 11 May 2022 18:11:13 +0200 (CEST) Received: by igel.home (Postfix, from userid 1000) id 53B582C377F; Wed, 11 May 2022 18:11:13 +0200 (CEST) From: Andreas Schwab To: Tino Calancha Subject: Re: bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter References: <87ee27fd1a.fsf@gmail.com> <83bkxaaj45.fsf@gnu.org> <878rs55m81.fsf@gmail.com> <834k2t1cva.fsf@gnu.org> <87ilqdnl8z.fsf@gmail.com> <83bkw4s4ln.fsf@gnu.org> <87fslgnn9h.fsf@gmail.com> <87lev85d36.fsf@gmail.com> <877d6sum2c.fsf@igel.home> <4548a66-c8f8-57de-58db-6241a1f16cc4@gmail.com> X-Yow: America!! I saw it all!! Vomiting! Waving! JERRY FALWELLING into your void tube of UHF oblivion!! SAFEWAY of the mind -- Date: Wed, 11 May 2022 18:11:13 +0200 In-Reply-To: <4548a66-c8f8-57de-58db-6241a1f16cc4@gmail.com> (Tino Calancha's message of "Wed, 11 May 2022 17:38:55 +0200 (CEST)") Message-ID: <8735hguk0u.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.5 (/) X-Debbugs-Envelope-To: 54804 Cc: uyennhi.qm@gmail.com, Robert Pluim , 54804@debbugs.gnu.org, Eli Zaretskii , spwhitton@spwhitton.name X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.5 (-) On Mai 11 2022, Tino Calancha wrote: > On Wed, 11 May 2022, Andreas Schwab wrote: > >> On Mai 11 2022, Robert Pluim wrote: >> >>> Return non-@code{nil} if @var{char} is an uppercase character >>> according to Unicode. Be aware that if the Unicode tables are not yet >>> available, e.g. during bootstrap, this gives the correct answer only >>> for @acronym{ASCII} characters; for other characters it always returns >>> @code{nil}. >> >> I don't think it is necessary to talk about bootstrapping in the manual. > Right... How about replacing? > "available, e.g. during bootstrap, this gives the correct answer only..." > > with > > "available, e.g. while compiling the Emac source code, this gives the > correct answer only..." I don't think there is a need for this at all in the manual. It could be added as a comment in the source, though. -- 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." From debbugs-submit-bounces@debbugs.gnu.org Wed May 11 12:19:33 2022 Received: (at 54804) by debbugs.gnu.org; 11 May 2022 16:19:33 +0000 Received: from localhost ([127.0.0.1]:38252 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nop3W-0008HO-PM for submit@debbugs.gnu.org; Wed, 11 May 2022 12:19:33 -0400 Received: from mail-ej1-f53.google.com ([209.85.218.53]:45915) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nop3V-0008HA-Tc for 54804@debbugs.gnu.org; Wed, 11 May 2022 12:19:18 -0400 Received: by mail-ej1-f53.google.com with SMTP id ch13so5039413ejb.12 for <54804@debbugs.gnu.org>; Wed, 11 May 2022 09:19:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:date:to:cc:subject:in-reply-to:message-id:references :mime-version; bh=Zp6DWJ7mbw5pZL1cUWSSMcncj2DFz6eRbtKh7fj+T5w=; b=qD/i3Tg6rTtbBTjwgKI0CYEehpk+CD5Db2WxcQeOtLUCZSYcZr/4pqp2AWmvSngGvT QLhXq/9nwCc1lJuBkttHuxgTg3DRZoAL6MqLpqdN4xMQKMjwllkBBi8mtAMTRKGxFsue BjXKGFNalrHm/x7qjV9l6mX+eObkWEK9U9AkWGgdKo0S0ZXbzi4Z/J26FeGtB4hs7UBp cw550HQ72DfEYh1LTJ6mEleS0b60WmS27KwRv/4NSNuzWm6SxZ8VByQmKfEP5wElTy5M ZhNZeUaLVe7y1ceORSHmEETRAwW5Mxrg9ofYKLDeKxpS9XglhB19DNzW4laWA/9D3j1E v0CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:mime-version; bh=Zp6DWJ7mbw5pZL1cUWSSMcncj2DFz6eRbtKh7fj+T5w=; b=vMa3BG7CRt671ayx7Mv0iCKXgjAAw0Wy8FfRcUzmXGM94T05RQvVDE2vZem8ko4ozi Dn6pm2WhsErUbhc6YG95l0mAXRq00XN8qura+A3dXdolUs19H/xPqt3QG9XC7pPl13V6 Bu2+ADlxueJVxX4wbzHhDOOHZuH8Knbu/T1yN2x+vXqd3ZOgzXpK/O81FEP8G4hS/+Wi 3XSGtOUrM9xMZvk704DsOmQO7BIyHV91pIJ9pnkpMBdSbLoXJPaDoK76jB9qDxPQoY/e MsOOcIaf0vfBCzAdnmW2VqKdbZUTGMioJ5BR2yFqTzIFK3X9yeaUEE9sjXwrE3qtL0fz KOmA== X-Gm-Message-State: AOAM531kdE7s73+KAbe+vKTrcEuP17g28LDLtNC7qveyPZqLfc4eOxfJ EBiwtsTOy+2QzdCjVHqLhms= X-Google-Smtp-Source: ABdhPJwEcT25uRTdxPhWddGt/rkGJHFvHZh9XQ0PgbEh1lDsPig0gKAHJ4RCMLLo5Nat6ICIAE3RgQ== X-Received: by 2002:a17:907:6d8e:b0:6f4:73c3:89ac with SMTP id sb14-20020a1709076d8e00b006f473c389acmr25767126ejc.120.1652285951921; Wed, 11 May 2022 09:19:11 -0700 (PDT) Received: from eprince ([193.118.249.171]) by smtp.gmail.com with ESMTPSA id fb21-20020a1709073a1500b006f3ef214e1fsm1093405ejc.133.2022.05.11.09.19.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 May 2022 09:19:11 -0700 (PDT) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Wed, 11 May 2022 18:18:55 +0200 (CEST) To: Andreas Schwab Subject: Re: bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter In-Reply-To: <8735hguk0u.fsf@igel.home> Message-ID: <218f952c-747d-c32-5bce-5ad078a51f41@gmail.com> References: <87ee27fd1a.fsf@gmail.com> <83bkxaaj45.fsf@gnu.org> <878rs55m81.fsf@gmail.com> <834k2t1cva.fsf@gnu.org> <87ilqdnl8z.fsf@gmail.com> <83bkw4s4ln.fsf@gnu.org> <87fslgnn9h.fsf@gmail.com> <87lev85d36.fsf@gmail.com> <877d6sum2c.fsf@igel.home> <4548a66-c8f8-57de-58db-6241a1f16cc4@gmail.com> <8735hguk0u.fsf@igel.home> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 54804 Cc: 54804@debbugs.gnu.org, Tino Calancha , Robert Pluim , Eli Zaretskii , uyennhi.qm@gmail.com, spwhitton@spwhitton.name X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Wed, 11 May 2022, Andreas Schwab wrote: >> "available, e.g. while compiling the Emac source code, this gives the >> correct answer only..." > > I don't think there is a need for this at all in the manual. It could > be added as a comment in the source, though. I have removed completely that sentence and pushed to the master branch. Thank you Andreas. From debbugs-submit-bounces@debbugs.gnu.org Thu May 12 11:55:49 2022 Received: (at 54804) by debbugs.gnu.org; 12 May 2022 15:55:50 +0000 Received: from localhost ([127.0.0.1]:41995 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1npBAL-00070w-8V for submit@debbugs.gnu.org; Thu, 12 May 2022 11:55:49 -0400 Received: from mail-ed1-f53.google.com ([209.85.208.53]:37451) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1npBAJ-00070h-6k for 54804@debbugs.gnu.org; Thu, 12 May 2022 11:55:47 -0400 Received: by mail-ed1-f53.google.com with SMTP id k27so6793310edk.4 for <54804@debbugs.gnu.org>; Thu, 12 May 2022 08:55:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=GowL6mWu54tSm02jHWJuQ7SC6Fe5LmJpWtTBqHQLST4=; b=XgSgc5+IA+XswmOpNRVOkcSB8MHEFoUFUH1/OTvQ258lDWUV6CMEC2JnCoVAzRCE5o LlxUoSknU90xLWfpg+5Kn9+gWxs/uRoJsqNEh+ZNlXeFRrcYeyx8t8ElApXD6t93cpzt SIjm2S8maKK7pE6fT3tcKwGupyd2Njlq1X0O1gv437uZTlJlyrBZcyEiZHrw3XmlHPcl 2dDp+VlkYac/q3KgP2/zPMVc9Kg0T/Gj9W8QGZiihMTez0RsHaj61kk3VlBovGJySzDG j6KyY8IEhiFMGh8Yo6Hcsi+iy+WrzkqIyBWMmGuAyA18lTbeyv3XPI44OxbW9BvzEsgz ulQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=GowL6mWu54tSm02jHWJuQ7SC6Fe5LmJpWtTBqHQLST4=; b=ovxs/SjN4h1NKJY8DsB/kFIZy2vKFA0Htn8/OQqkXPVm7xo8AlDvP3sbNeu1Ij/NU2 L8/j6JuEaWzneIFZuDvt/iRwU7BSrNgPHxA6YbADk7jy/WnQuR9AXL8k4PKuFk5jm1xn jGe70vuQ0/7RVDz7wmOJ3GcZ6fCZ+IbOjMIKc0E2zyRmFy1hD00U0tCQaDfNaFxj3Fd+ exa/L/VwPoK4aNH8pq/MFk1Jgo4ydigYz66WpGNYZ9+aLU9omM6rD26yAXGPcHjwsSzk rvCGDvmdyHtvERt6Wzy6N7QJCpToOmn2AjTVHDamzLy251W/47HrA9IHllVgxgN8G0vH lVCg== X-Gm-Message-State: AOAM5322HgI4RUEB+Xehv465X17/EIxq7Ej++1L7QjfG7YepNBkQsdf1 58B9XGQr+T3tnPcflgD5nwM= X-Google-Smtp-Source: ABdhPJzjEp8Hrr8BuT0z0ldGny+e7KMZqCBTNYAosqhvaAtSja6sQqplGh9Qizl3mEYdU+/3mKo0Sg== X-Received: by 2002:a05:6402:11cd:b0:427:bda5:542f with SMTP id j13-20020a05640211cd00b00427bda5542fmr36264288edw.290.1652370941058; Thu, 12 May 2022 08:55:41 -0700 (PDT) Received: from eprince ([193.118.249.171]) by smtp.gmail.com with ESMTPSA id l1-20020a50c101000000b0042617ba63c2sm2656533edf.76.2022.05.12.08.55.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 May 2022 08:55:40 -0700 (PDT) From: Tino Calancha To: Andreas Schwab Subject: Re: bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter References: <87ee27fd1a.fsf@gmail.com> <83bkxaaj45.fsf@gnu.org> <878rs55m81.fsf@gmail.com> <834k2t1cva.fsf@gnu.org> <87ilqdnl8z.fsf@gmail.com> <83bkw4s4ln.fsf@gnu.org> <87fslgnn9h.fsf@gmail.com> <87lev85d36.fsf@gmail.com> <877d6sum2c.fsf@igel.home> <4548a66-c8f8-57de-58db-6241a1f16cc4@gmail.com> <8735hguk0u.fsf@igel.home> <218f952c-747d-c32-5bce-5ad078a51f41@gmail.com> Date: Thu, 12 May 2022 17:55:38 +0200 In-Reply-To: <218f952c-747d-c32-5bce-5ad078a51f41@gmail.com> (Tino Calancha's message of "Wed, 11 May 2022 18:18:55 +0200 (CEST)") Message-ID: <878rr6oidh.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 54804 Cc: 54804@debbugs.gnu.org, spwhitton@spwhitton.name, Eli Zaretskii , Robert Pluim , uyennhi.qm@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Tino Calancha writes: > I have removed completely that sentence and pushed > to the master branch. The Empire Strikes Back --8<-----------------------------cut here---------------start------------->8--- commit 86750ab021ea889766a717458ed28a54e6a40ad3 Author: Tino Calancha Date: Thu May 12 17:48:09 2022 +0200 zap-to-char: case sensitive for upper-case characters In interactive calls, behave case-sensitively if the given char is an upper-case character. Same for zap-up-to-char. This is analog to what the user-level incremental search feature does. * lisp/misc.el (zap-up-to-char): Add an optional arg INTERACTIVE. Perform a case-sensitive search when INTERACTIVE is non-nil and CHAR is an upper-case character. * lisp/simple.el (zap-to-char): Same. * etc/NEWS (Editing Changes in Emacs 29.1): Announce this change. * test/lisp/misc-tests.el ((misc-test-zap-up-to-char): Add test cases. * test/lisp/simple-tests.el (with-simple-test): Add helper macro. (simple-tests-zap-to-char): Add a test. diff --git a/etc/NEWS b/etc/NEWS index 3bdc497f18..d6493e77e5 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -672,6 +672,12 @@ recreate it anew next time 'imenu' is invoked. * Editing Changes in Emacs 29.1 +--- +** 'zap-to-char' case sensitivity on interactive calls. +The command now behaves as case-sensitive for interactive calls when is +invoked with an uppercase argument, regardless of the +`case-fold-search' value. Likewise, for 'zap-up-to-char'. + --- ** 'scroll-other-window' and 'scroll-other-window-down' now respects remapping. These commands (bound to 'C-M-v' and 'C-M-V') used to scroll the other diff --git a/lisp/misc.el b/lisp/misc.el index d85f889ffd..f92debf013 100644 --- a/lisp/misc.el +++ b/lisp/misc.el @@ -64,15 +64,21 @@ copy-from-above-command ;; Variation of `zap-to-char'. ;;;###autoload -(defun zap-up-to-char (arg char) +(defun zap-up-to-char (arg char &optional interactive) "Kill up to, but not including ARGth occurrence of CHAR. Case is ignored if `case-fold-search' is non-nil in the current buffer. Goes backward if ARG is negative; error if CHAR not found. -Ignores CHAR at point." +Ignores CHAR at point. +Called interactively, do a case sensitive search if CHAR +is an upper-case character." (interactive (list (prefix-numeric-value current-prefix-arg) (read-char-from-minibuffer "Zap up to char: " - nil 'read-char-history))) - (let ((direction (if (>= arg 0) 1 -1))) + nil 'read-char-history) + t)) + (let ((direction (if (>= arg 0) 1 -1)) + (case-fold-search (if (and interactive (char-uppercase-p char)) + nil + case-fold-search))) (kill-region (point) (progn (forward-char direction) diff --git a/lisp/simple.el b/lisp/simple.el index 3812f6d8c6..7d6c55c190 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -6062,21 +6062,25 @@ char-uppercase-p (characterp (get-char-code-property char 'lowercase))) ((and (>= char ?A) (<= char ?Z))))) -(defun zap-to-char (arg char) +(defun zap-to-char (arg char &optional interactive) "Kill up to and including ARGth occurrence of CHAR. Case is ignored if `case-fold-search' is non-nil in the current buffer. Goes backward if ARG is negative; error if CHAR not found. -See also `zap-up-to-char'." +See also `zap-up-to-char'. +Called interactively, do a case sensitive search if CHAR +is an upper-case character." (interactive (list (prefix-numeric-value current-prefix-arg) (read-char-from-minibuffer "Zap to char: " - nil 'read-char-history))) + nil 'read-char-history)) + t) ;; Avoid "obsolete" warnings for translation-table-for-input. (with-no-warnings (if (char-table-p translation-table-for-input) (setq char (or (aref translation-table-for-input char) char)))) - (kill-region (point) (progn - (search-forward (char-to-string char) nil nil arg) - (point)))) + (let ((case-fold-search (if (and interactive (char-uppercase-p char)) + nil + case-fold-search))) + (kill-region (point) (search-forward (char-to-string char) nil nil arg)))) ;; kill-line and its subroutines. diff --git a/test/lisp/misc-tests.el b/test/lisp/misc-tests.el index 36a8726b88..236223ef49 100644 --- a/test/lisp/misc-tests.el +++ b/test/lisp/misc-tests.el @@ -44,7 +44,14 @@ misc-test-zap-up-to-char (zap-up-to-char 1 ?c)) (with-misc-test "abcde abc123" "c123" (goto-char (point-min)) - (zap-up-to-char 2 ?c))) + (zap-up-to-char 2 ?c)) + (let ((case-fold-search t)) + (with-misc-test "abcdeCXYZ" "cdeCXYZ" + (goto-char (point-min)) + (zap-up-to-char 1 ?C)) + (with-misc-test "abcdeCXYZ" "CXYZ" + (goto-char (point-min)) + (zap-up-to-char 1 ?C 'interactive)))) (ert-deftest misc-test-upcase-char () (with-misc-test "abcde" "aBCDe" diff --git a/test/lisp/simple-tests.el b/test/lisp/simple-tests.el index dcab811bb5..2baf7124d7 100644 --- a/test/lisp/simple-tests.el +++ b/test/lisp/simple-tests.el @@ -971,5 +971,27 @@ test-undo-region ;;(should (= (length (delq nil (undo-make-selective-list 5 9))) 0)) (should (= (length (delq nil (undo-make-selective-list 6 9))) 0)))) + +;;; Tests for `zap-to-char' + +(defmacro with-simple-test (original result &rest body) + (declare (indent 2) (debug (stringp stringp body))) + `(with-temp-buffer + (insert ,original) + (goto-char (point-min)) + ,@body + (should (equal (buffer-string) ,result)))) + +(ert-deftest simple-tests-zap-to-char () + (with-simple-test "abcde" "de" + (zap-to-char 1 ?c)) + (with-simple-test "abcde abc123" "123" + (zap-to-char 2 ?c)) + (let ((case-fold-search t)) + (with-simple-test "abcdeCXYZ" "deCXYZ" + (zap-to-char 1 ?C)) + (with-simple-test "abcdeCXYZ" "XYZ" + (zap-to-char 1 ?C 'interactive)))) + (provide 'simple-test) ;;; simple-tests.el ends here --8<-----------------------------cut here---------------end--------------->8--- From debbugs-submit-bounces@debbugs.gnu.org Fri May 13 02:48:45 2022 Received: (at 54804) by debbugs.gnu.org; 13 May 2022 06:48:45 +0000 Received: from localhost ([127.0.0.1]:42833 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1npP6T-0002a6-7a for submit@debbugs.gnu.org; Fri, 13 May 2022 02:48:45 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51906) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1npP6R-0002Zm-20 for 54804@debbugs.gnu.org; Fri, 13 May 2022 02:48:43 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55328) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1npP6K-0003Gx-Bw; Fri, 13 May 2022 02:48:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=mzhAHYZBynGWOc1dvWHNlcOEOaIidXj+aFA6lxgyXb8=; b=LcdbG1nNGNEy +PbyOGXJ+Z2ZugU1cNI7kV8enjTKE7skjQwlzwGxmFRzKttxawTDhrWXU1q95+Z26yWMhy5Y/hN+C CFcenpTIs17MqOY8zDIXXoGCJCkqbvCKNKd3oJzKDltoQXyRw29S4aafI9ImZL8URU6D8R3Dr8dSD tSpTcoOSspTTTGjsuEbwu2sNe/qatpDaO5Kg7TX3eUVuJ6oMe31xMgEWKIs72GkvJGJF6vLvMMvPQ k5BNnrz3bW61svsghjBfUT2Vx+bV+ry97aJ5AnfTxNJxF8rZxUGyY2eniJfm/teByzXig4QILOjTR lCC/DHrhCvspSrDVYEJdew==; Received: from [87.69.77.57] (port=2309 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1npP6J-0005kG-Re; Fri, 13 May 2022 02:48:36 -0400 Date: Fri, 13 May 2022 09:48:41 +0300 Message-Id: <83czgind12.fsf@gnu.org> From: Eli Zaretskii To: Tino Calancha In-Reply-To: <878rr6oidh.fsf@gmail.com> (message from Tino Calancha on Thu, 12 May 2022 17:55:38 +0200) Subject: Re: bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter References: <87ee27fd1a.fsf@gmail.com> <83bkxaaj45.fsf@gnu.org> <878rs55m81.fsf@gmail.com> <834k2t1cva.fsf@gnu.org> <87ilqdnl8z.fsf@gmail.com> <83bkw4s4ln.fsf@gnu.org> <87fslgnn9h.fsf@gmail.com> <87lev85d36.fsf@gmail.com> <877d6sum2c.fsf@igel.home> <4548a66-c8f8-57de-58db-6241a1f16cc4@gmail.com> <8735hguk0u.fsf@igel.home> <218f952c-747d-c32-5bce-5ad078a51f41@gmail.com> <878rr6oidh.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54804 Cc: 54804@debbugs.gnu.org, spwhitton@spwhitton.name, schwab@linux-m68k.org, rpluim@gmail.com, uyennhi.qm@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Tino Calancha > Cc: 54804@debbugs.gnu.org, Robert Pluim , Eli Zaretskii > , uyennhi.qm@gmail.com, spwhitton@spwhitton.name > Date: Thu, 12 May 2022 17:55:38 +0200 > > * lisp/misc.el (zap-up-to-char): Add an optional arg INTERACTIVE. > Perform a case-sensitive search when INTERACTIVE is non-nil and > CHAR is an upper-case character. I don't understand why the need for the new INTERACTIVE argument. It is also undocumented in the doc strings. > --- a/etc/NEWS > +++ b/etc/NEWS > @@ -672,6 +672,12 @@ recreate it anew next time 'imenu' is invoked. > > * Editing Changes in Emacs 29.1 > > +--- > +** 'zap-to-char' case sensitivity on interactive calls. NEWS is read in Outline mode, and its text should make sense when only the headings are visible. The above heading doesn't have enough information to be useful without the body, because it says almost nothing about the change. Here's a better heading: ** 'zap-to-char' and 'zap-up-to-char' are case-sensitive for upper-case chars > +The command now behaves as case-sensitive for interactive calls when is > +invoked with an uppercase argument, regardless of the > +`case-fold-search' value. Likewise, for 'zap-up-to-char'. The body should describe both commands equally. > -(defun zap-up-to-char (arg char) > +(defun zap-up-to-char (arg char &optional interactive) > "Kill up to, but not including ARGth occurrence of CHAR. > Case is ignored if `case-fold-search' is non-nil in the current buffer. > Goes backward if ARG is negative; error if CHAR not found. > -Ignores CHAR at point." > +Ignores CHAR at point. > +Called interactively, do a case sensitive search if CHAR "If called interactively, ..." And, as mentioned above, I don't think I understand why we need to do this only in interactive calls. Non-interactive invocations already have a way to request case-sensitivity, by let-binding case-fold-search, right? > diff --git a/test/lisp/simple-tests.el b/test/lisp/simple-tests.el > index dcab811bb5..2baf7124d7 100644 > --- a/test/lisp/simple-tests.el > +++ b/test/lisp/simple-tests.el > @@ -971,5 +971,27 @@ test-undo-region > ;;(should (= (length (delq nil (undo-make-selective-list 5 9))) 0)) > (should (= (length (delq nil (undo-make-selective-list 6 9))) 0)))) > > + > +;;; Tests for `zap-to-char' Should we have the tests for zap-* functions in one place, rather than two? > +(defmacro with-simple-test (original result &rest body) > + (declare (indent 2) (debug (stringp stringp body))) > + `(with-temp-buffer > + (insert ,original) > + (goto-char (point-min)) > + ,@body > + (should (equal (buffer-string) ,result)))) This macro is specific to zap-* functions, I think. So its name should reflect that fact. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Tue May 17 08:34:19 2022 Received: (at 54804) by debbugs.gnu.org; 17 May 2022 12:34:19 +0000 Received: from localhost ([127.0.0.1]:56011 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nqwP5-0000nM-Ge for submit@debbugs.gnu.org; Tue, 17 May 2022 08:34:19 -0400 Received: from mail-ed1-f43.google.com ([209.85.208.43]:34354) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nqwP0-0000n4-G7 for 54804@debbugs.gnu.org; Tue, 17 May 2022 08:34:18 -0400 Received: by mail-ed1-f43.google.com with SMTP id en5so8101554edb.1 for <54804@debbugs.gnu.org>; Tue, 17 May 2022 05:34:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=JF05Oh+V0okUNdVYQSZfb7iLV7RWcPVb9U86BOxQTCs=; b=UT7mQqWzqBqkNgd3Z88AMGBHodllLOe1PUZG6zHeUmO7mhy/Urvpf64boNYORcux1e 2Y/3iS6yq8PB7HU6aFN/39PR0hx7vY6Pl35uSjQJY20Xm2c4k83tulTVO04GPPA+V+UL T7A4g59zLaJ4eepmFHVoZYiUzehz4BD6Lk1auRbF/cu4KEmGxNv0N7CJGuvmF+845hcm Szd+Gwgj6jIf193I0uAiWM6CP0XDcbQ0ZI71VGGffAHm5mGyjKlCWY959bofUXNzz419 xlYw4lJPxTIpjmKyTnwl17MlEvfUP47ognsb7N/h+aH0wwROu1sfuA7P7lf7xijxHRkh dfyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=JF05Oh+V0okUNdVYQSZfb7iLV7RWcPVb9U86BOxQTCs=; b=WI4Tq/LphQSQuMh1wcATQWme3dWyCOL3lp4N0YFpgXeRmbzZlid8s2UxI6aYbKcHrZ jz0j4UzdIi45iTnn6ncbsifgORqdodgguPDRxHvL8jnFcTo+s4Cj52gYonEZmf/vouJJ mHf56Hwt4AJqKXGs1FQpGzP6W1v7+410WHHvRaAgV+HyAXSdGvyvvdFIfDaECnladKsT UzGIntRlPok8rOAlIsVNQxy5jvciLZumciBVrPBKFxfAkPtS5VU7wlovnf6EwGZ26HPt Y8aCuVNnKM9ePJRAOhD+Sn1ztQT4cOqaKelRTC5zTlStH9NqYofD6L6RPbH9j9YlZxnm LyEQ== X-Gm-Message-State: AOAM533cJPKSpkIUK2uwq7XBfGW5wm2O9uoRyQvBusU6STnfk0vPZINA Vnb/rdPvSlgQlq7F02CB2jQ= X-Google-Smtp-Source: ABdhPJyvv1ENRQiO9hacCoCjB+xDHWNyGih19jZF4pkIY3wHCphIEOWjoTsuiQNCkCA59DV7YvMVKw== X-Received: by 2002:a50:fe8d:0:b0:42a:b3a4:6ac2 with SMTP id d13-20020a50fe8d000000b0042ab3a46ac2mr9850361edt.131.1652790848515; Tue, 17 May 2022 05:34:08 -0700 (PDT) Received: from eprince ([193.118.249.171]) by smtp.gmail.com with ESMTPSA id cn9-20020a0564020ca900b0042aca5edba7sm749776edb.57.2022.05.17.05.34.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 May 2022 05:34:07 -0700 (PDT) From: Tino Calancha To: Eli Zaretskii Subject: Re: bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter References: <87ee27fd1a.fsf@gmail.com> <83bkxaaj45.fsf@gnu.org> <878rs55m81.fsf@gmail.com> <834k2t1cva.fsf@gnu.org> <87ilqdnl8z.fsf@gmail.com> <83bkw4s4ln.fsf@gnu.org> <87fslgnn9h.fsf@gmail.com> <87lev85d36.fsf@gmail.com> <877d6sum2c.fsf@igel.home> <4548a66-c8f8-57de-58db-6241a1f16cc4@gmail.com> <8735hguk0u.fsf@igel.home> <218f952c-747d-c32-5bce-5ad078a51f41@gmail.com> <878rr6oidh.fsf@gmail.com> <83czgind12.fsf@gnu.org> Date: Tue, 17 May 2022 14:34:06 +0200 In-Reply-To: <83czgind12.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 13 May 2022 09:48:41 +0300") Message-ID: <874k1onxs1.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 3.5 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eli Zaretskii writes: I have added Stefan, who suggests using the interactive arg (see explanation below). I have also added Juri, who is expert on isearch. >> From: Tino Calancha >> * lisp/misc.el (zap-up-to-char): Add an optional arg INTERACTIVE. >> Perform a case-sensitive search when INTERACTIVE is non-nil and >> CHAR is an upper-case character. > > [...] Content analysis details: (3.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [193.118.249.171 listed in zen.spamhaus.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tino.calancha[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.43 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.43 listed in wl.mailspike.net] -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Debbugs-Envelope-To: 54804 Cc: 54804@debbugs.gnu.org, juri@linkov.net, uyennhi.qm@gmail.com, monnier@iro.umontreal.ca, spwhitton@spwhitton.name X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.5 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eli Zaretskii writes: I have added Stefan, who suggests using the interactive arg (see explanation below). I have also added Juri, who is expert on isearch. >> From: Tino Calancha >> * lisp/misc.el (zap-up-to-char): Add an optional arg INTERACTIVE. >> Perform a case-sensitive search when INTERACTIVE is non-nil and >> CHAR is an upper-case character. > > [...] Content analysis details: (2.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.43 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.43 listed in wl.mailspike.net] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [193.118.249.171 listed in zen.spamhaus.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tino.calancha[at]gmail.com) -0.0 T_SCC_BODY_TEXT_LINE No description available. -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Eli Zaretskii writes: I have added Stefan, who suggests using the interactive arg (see explanation below). I have also added Juri, who is expert on isearch. >> From: Tino Calancha >> * lisp/misc.el (zap-up-to-char): Add an optional arg INTERACTIVE. >> Perform a case-sensitive search when INTERACTIVE is non-nil and >> CHAR is an upper-case character. > > I don't understand why the need for the new INTERACTIVE argument. > And, as mentioned above, I don't think I understand why we need to do > this only in interactive calls. Non-interactive invocations already > have a way to request case-sensitivity, by let-binding > case-fold-search, right? I'll try to explain this. This is what Emacs does for isearch/search. If you go to the *scratch* buffer, and you do C-s T C-s C-s you only jump on 'T', that is, you skip the 't'. This is regardless on the `case-fold-search' value. Calling from Lisp: (search-forward "T" nil t) we'll also jump on the 't' if `case-fold-search' is non-nil. I want the analog behavior for zap-to... commands: automatic case sensitivity when the char is uppercase. I want this behavior on interactive calls only, for instance when users do `M-z'. How to detect that the users are calling these commands interactively? I got inspired from this comment found at the docstring of `called-interactively-p' (Stefan wrote that): "Instead of using this function, it is cleaner and more reliable to give yo= ur function an extra optional argument whose =E2=80=98interactive=E2=80=99 spe= c specifies non-nil unconditionally ("p" is a good way to do this), or via (not (or executing-kbd-macro noninteractive))." From debbugs-submit-bounces@debbugs.gnu.org Tue May 17 08:42:10 2022 Received: (at 54804) by debbugs.gnu.org; 17 May 2022 12:42:10 +0000 Received: from localhost ([127.0.0.1]:56017 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nqwWg-00010Y-Av for submit@debbugs.gnu.org; Tue, 17 May 2022 08:42:10 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34038) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nqwWe-00010J-Lk for 54804@debbugs.gnu.org; Tue, 17 May 2022 08:42:09 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58258) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nqwWY-0004u1-SC; Tue, 17 May 2022 08:42:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=R7CUfo+/Kqj20di2opr35xevbjkQ7f1mBAxNEyR9NZY=; b=M8TvWvmUyCFL +/WSGFMj8EYn9u6UvPR/1RoJ937uyr5fVgo8ZGZ3w+Qdus8UYtDXX0Xhn6Ap7Sn5lFOUJ0cHf5yR3 4kaLdXhuNyJeejhFX7bhVIYci9uRUhSdwiCDmCaqAdkM+NLwDFx9Xnh2n8UqYDoeT1osDFpf8wjFZ 4D6VZcK4lkrHTuU1JWEZGgqaijU8Rja9KqjhRV98GP5ms846EzH7bs3vDAM+po06NDCLmGf80VeiZ 0Q9/c2EZIPQiL6l1TkmtCNtP3mUYB4FI+bbTr6UNk6cc3i+kbwuFBWITPWRRcp+hkZSiuklXZGzeG Pg+AnbgNMyBYD8ksWV5LMQ==; Received: from [87.69.77.57] (port=2920 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nqwWY-00020v-Be; Tue, 17 May 2022 08:42:02 -0400 Date: Tue, 17 May 2022 15:41:53 +0300 Message-Id: <83pmkcgwku.fsf@gnu.org> From: Eli Zaretskii To: Tino Calancha In-Reply-To: <874k1onxs1.fsf@gmail.com> (message from Tino Calancha on Tue, 17 May 2022 14:34:06 +0200) Subject: Re: bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter References: <87ee27fd1a.fsf@gmail.com> <83bkxaaj45.fsf@gnu.org> <878rs55m81.fsf@gmail.com> <834k2t1cva.fsf@gnu.org> <87ilqdnl8z.fsf@gmail.com> <83bkw4s4ln.fsf@gnu.org> <87fslgnn9h.fsf@gmail.com> <87lev85d36.fsf@gmail.com> <877d6sum2c.fsf@igel.home> <4548a66-c8f8-57de-58db-6241a1f16cc4@gmail.com> <8735hguk0u.fsf@igel.home> <218f952c-747d-c32-5bce-5ad078a51f41@gmail.com> <878rr6oidh.fsf@gmail.com> <83czgind12.fsf@gnu.org> <874k1onxs1.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54804 Cc: 54804@debbugs.gnu.org, juri@linkov.net, uyennhi.qm@gmail.com, monnier@iro.umontreal.ca, spwhitton@spwhitton.name X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Tino Calancha > Cc: 54804@debbugs.gnu.org, spwhitton@spwhitton.name,uyennhi.qm@gmail.com, > , juri@linkov.net > Date: Tue, 17 May 2022 14:34:06 +0200 > > Eli Zaretskii writes: > > I have added Stefan, who suggests using the interactive arg (see > explanation below). > I have also added Juri, who is expert on isearch. > > >> From: Tino Calancha > >> * lisp/misc.el (zap-up-to-char): Add an optional arg INTERACTIVE. > >> Perform a case-sensitive search when INTERACTIVE is non-nil and > >> CHAR is an upper-case character. > > > > I don't understand why the need for the new INTERACTIVE argument. > > > And, as mentioned above, I don't think I understand why we need to do > > this only in interactive calls. Non-interactive invocations already > > have a way to request case-sensitivity, by let-binding > > case-fold-search, right? > > I'll try to explain this. > > This is what Emacs does for isearch/search. Search is a much more complex set of features and commands in Emacs. These two commands are much simpler, and I see no reason to try to be compatible with search commands, since these two commands don't search anything. > I want the analog behavior for zap-to... commands: automatic > case sensitivity when the char is uppercase. > I want this behavior on interactive calls only, for instance when users > do `M-z'. As I said I disagree: these are DWIMish features that are best reserved for interactive invocation. In calls from Lisp, it is confusing to have the behavior change so drastically depending on the letter-case of an argument. From debbugs-submit-bounces@debbugs.gnu.org Tue May 17 08:51:32 2022 Received: (at 54804) by debbugs.gnu.org; 17 May 2022 12:51:32 +0000 Received: from localhost ([127.0.0.1]:56029 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nqwfk-0001Ik-H1 for submit@debbugs.gnu.org; Tue, 17 May 2022 08:51:32 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:33928) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nqwfj-0001IX-95 for 54804@debbugs.gnu.org; Tue, 17 May 2022 08:51:31 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 7BB6C80767; Tue, 17 May 2022 08:51:25 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 222318063C; Tue, 17 May 2022 08:51:24 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1652791884; bh=cGkRBApE246zD2ZCycw9svApaLtdI5nAV0cQf7REgPI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=RaV36SwhKHUZ4OO5Im2nq3CYfNusZXDi3cgwK7MA+qllSYe6DqkTNekSqfy7O9Uch 2+uq19TMDR4zs7mkblXwiLO+2J1StE/rlJFXjwnOiI2ZjY9+LvziV2FJiDRGkggl5c 4zsC7AdOXZNur5Q2ZqWif9mJHuVVbYLJJVAsDwKE9g5JrAcMenKC7PIcVJoQkoTS7n fVffk5xT0yHbPzaTkoyGnOTn9gPOha6rjHVmUTRlpu1MqJR556A41E6hOoMOFkb6sQ tXXEOZ2j4kVQRpp4mEC42v25v0Wj+UqX/103iia5e1occzCdjI/oBsptRnjpqs2xjL iKr+n+nu6PrQg== Received: from pastel (unknown [45.72.221.51]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id D8E4A1207CC; Tue, 17 May 2022 08:51:23 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter Message-ID: References: <87ee27fd1a.fsf@gmail.com> <83bkxaaj45.fsf@gnu.org> <878rs55m81.fsf@gmail.com> <834k2t1cva.fsf@gnu.org> <87ilqdnl8z.fsf@gmail.com> <83bkw4s4ln.fsf@gnu.org> <87fslgnn9h.fsf@gmail.com> <87lev85d36.fsf@gmail.com> <877d6sum2c.fsf@igel.home> <4548a66-c8f8-57de-58db-6241a1f16cc4@gmail.com> <8735hguk0u.fsf@igel.home> <218f952c-747d-c32-5bce-5ad078a51f41@gmail.com> <878rr6oidh.fsf@gmail.com> <83czgind12.fsf@gnu.org> <874k1onxs1.fsf@gmail.com> <83pmkcgwku.fsf@gnu.org> Date: Tue, 17 May 2022 08:51:22 -0400 In-Reply-To: <83pmkcgwku.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 17 May 2022 15:41:53 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.054 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54804 Cc: juri@linkov.net, 54804@debbugs.gnu.org, spwhitton@spwhitton.name, uyennhi.qm@gmail.com, Tino Calancha X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> I want the analog behavior for zap-to... commands: automatic >> case sensitivity when the char is uppercase. >> I want this behavior on interactive calls only, for instance when users >> do `M-z'. > > As I said I disagree: these are DWIMish features that are best > reserved for interactive invocation. In calls from Lisp, it is > confusing to have the behavior change so drastically depending on the > letter-case of an argument. Am I misunderstanding something or are you two violently agreeing? Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue May 17 08:54:11 2022 Received: (at 54804) by debbugs.gnu.org; 17 May 2022 12:54:11 +0000 Received: from localhost ([127.0.0.1]:56038 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nqwiJ-0001NM-4J for submit@debbugs.gnu.org; Tue, 17 May 2022 08:54:11 -0400 Received: from mail-ed1-f42.google.com ([209.85.208.42]:35753) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nqwiH-0001N6-6X for 54804@debbugs.gnu.org; Tue, 17 May 2022 08:54:09 -0400 Received: by mail-ed1-f42.google.com with SMTP id c10so1133642edr.2 for <54804@debbugs.gnu.org>; Tue, 17 May 2022 05:54:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:date:to:cc:subject:in-reply-to:message-id:references :mime-version; bh=peV99xOlefSZ3wAuqKYb/mxz47X7kIsFcqe9vlJro1Q=; b=UEEc6j0gI0CIz7Wc+1u6pBjzO0leW0an8DGDtV6KKSHMDkzG1sL1eFPvazl9T/gI/5 i6ZKrvYZPNSdkY9ayAoHVkeDPwMehRQmhAJ2xTOac9Ob6x6tWRvvYvp5E5R6BR8+184Q 3WMcwFl0DZq3XnkO0Ovopr+GoqmVZ11yMptOo5NPU1cRRjqc/USlv15pqFKbjNrHQVkR OamcF4bcERq0u2+sND5C808i2bJ0fiQJwxmKpqVdNCL9BYobqLwmKp2YEUewkOiLA+iD vT5J/4F2BFog3xpzdmbm4KFA4Te+7WP2MRRY5+kEpyw2kzdE0OtpfkhU3ucHserPrf43 PDcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:mime-version; bh=peV99xOlefSZ3wAuqKYb/mxz47X7kIsFcqe9vlJro1Q=; b=EVwMkPwMzk5PXO2Fwed2jCfLnJ8JCYaQc7osLbG6qtb6jDcXim1D9IdJHTMyuMsdYi 3ypvOZGCd5fwH6R4x5qjv1rzV9+DGKQDWbM6FU+1DGP0sNkaXCSrLUXEnSlSuh3UXhvx IYVniJ2xDuituHG+OuQK8oSgn2jVBWOOU7f3lVcaQcBfZeNek2qthOgHjxJth0sgwD/y KBd/o825Jj2Z4C/kMUiwqPQ4uFtb30b0mMRMoy5M0fQSd0dXIxPsma0DqEMW73GSOYUS 6df7KyKx8yNcGVRsXije49uhNRmz8spx9/h/oDlH8Hrm/T1jqE5gcNI1wVBKs/PYVhA9 9Dag== X-Gm-Message-State: AOAM533pgG6YdGi4W+cESJ/rj4kaOe4AbciOFE4d6RkWixXPFaDzVD6q GGSHQw1lDkgw4G573xjBlD8= X-Google-Smtp-Source: ABdhPJyLR1tv6INDbEJ7+d0BhdjXzay7RhFd+hsYvuetKJxf6ZWhL4WuGfK5LKbN3BdxrQYRNNhGcg== X-Received: by 2002:aa7:c595:0:b0:42a:b571:2726 with SMTP id g21-20020aa7c595000000b0042ab5712726mr9409803edq.48.1652792042906; Tue, 17 May 2022 05:54:02 -0700 (PDT) Received: from eprince ([193.118.249.171]) by smtp.gmail.com with ESMTPSA id r6-20020aa7d146000000b0042ab9da73e6sm2481972edo.94.2022.05.17.05.54.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 May 2022 05:54:02 -0700 (PDT) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Tue, 17 May 2022 14:53:41 +0200 (CEST) To: Stefan Monnier Subject: Re: bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter In-Reply-To: Message-ID: <39917dfe-5c28-96a-13d2-1f4bdaef449f@gmail.com> References: <87ee27fd1a.fsf@gmail.com> <83bkxaaj45.fsf@gnu.org> <878rs55m81.fsf@gmail.com> <834k2t1cva.fsf@gnu.org> <87ilqdnl8z.fsf@gmail.com> <83bkw4s4ln.fsf@gnu.org> <87fslgnn9h.fsf@gmail.com> <87lev85d36.fsf@gmail.com> <877d6sum2c.fsf@igel.home> <4548a66-c8f8-57de-58db-6241a1f16cc4@gmail.com> <8735hguk0u.fsf@igel.home> <218f952c-747d-c32-5bce-5ad078a51f41@gmail.com> <878rr6oidh.fsf@gmail.com> <83czgind12.fsf@gnu.org> <874k1onxs1.fsf@gmail.com> <83pmkcgwku.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Spam-Score: 3.5 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Tue, 17 May 2022, Stefan Monnier wrote: >>> I want the analog behavior for zap-to... commands: automatic >>> case sensitivity when the char is uppercase. >>> I want this behavior on interactive calls only, for instance when users >>> do `M- [...] Content analysis details: (3.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [193.118.249.171 listed in zen.spamhaus.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tino.calancha[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.42 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.42 listed in wl.mailspike.net] -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Debbugs-Envelope-To: 54804 Cc: 54804@debbugs.gnu.org, Tino Calancha , juri@linkov.net, Eli Zaretskii , uyennhi.qm@gmail.com, spwhitton@spwhitton.name X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.5 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Tue, 17 May 2022, Stefan Monnier wrote: >>> I want the analog behavior for zap-to... commands: automatic >>> case sensitivity when the char is uppercase. >>> I want this behavior on interactive calls only, for instance when users >>> do `M- [...] Content analysis details: (2.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.42 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.42 listed in wl.mailspike.net] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [193.118.249.171 listed in zen.spamhaus.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tino.calancha[at]gmail.com) -0.0 T_SCC_BODY_TEXT_LINE No description available. -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager On Tue, 17 May 2022, Stefan Monnier wrote: >>> I want the analog behavior for zap-to... commands: automatic >>> case sensitivity when the char is uppercase. >>> I want this behavior on interactive calls only, for instance when users >>> do `M-z'. >> >> As I said I disagree: these are DWIMish features that are best >> reserved for interactive invocation. In calls from Lisp, it is >> confusing to have the behavior change so drastically depending on the >> letter-case of an argument. > > Am I misunderstanding something or are you two violently agreeing? We both agree with a sword in a hand. I don't want to change the behavior on Lisp call! Just let me know the nice way to detect that the call is interactive and then I will inject the feature :-) From debbugs-submit-bounces@debbugs.gnu.org Tue May 17 09:39:01 2022 Received: (at 54804) by debbugs.gnu.org; 17 May 2022 13:39:01 +0000 Received: from localhost ([127.0.0.1]:56114 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nqxPh-0002dd-Br for submit@debbugs.gnu.org; Tue, 17 May 2022 09:39:01 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47434) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nqxPe-0002dK-BL for 54804@debbugs.gnu.org; Tue, 17 May 2022 09:38:59 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59414) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nqxPY-0007Ml-Py; Tue, 17 May 2022 09:38:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=xiDOOzHM6ZRFBiIu52uW7nYF50KFti5q2lWVW1x77KQ=; b=d4mcu3+nehTi aXpAWXbbC9X04Wm4o5Ppgseh+hE9I4gvTa2xJolbA8V7doNQpEwkI+zch/6PHzAWEgvWmFzv4kCXT bt4ShazGxd0PfXVw1iEwzGmB+P/+k5uNUXWfAAmUELM6HsyE+Mf3gVgOwnKMawIqgyRo4YBGr/TjY TKs+gtn/sbIKiskqcMB2OV/4hNWxLpBaMbyH8Q8RpKYpZf2dw2gTakPOjnx4m2l+Pe9+CY7MS8i24 lOWPtdT+z0BYVzvY6JnCTal33rf6YFyUE918jgiXeCsGgtG8kzCp9KEhqsMQfrx5ZHsC5E+YTvufk U627AwQpFRupc1yMm0UaRQ==; Received: from [87.69.77.57] (port=2468 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nqxPY-0002G7-8C; Tue, 17 May 2022 09:38:52 -0400 Date: Tue, 17 May 2022 16:38:43 +0300 Message-Id: <83czgcgty4.fsf@gnu.org> From: Eli Zaretskii To: Tino Calancha In-Reply-To: <39917dfe-5c28-96a-13d2-1f4bdaef449f@gmail.com> (message from Tino Calancha on Tue, 17 May 2022 14:53:41 +0200 (CEST)) Subject: Re: bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter References: <87ee27fd1a.fsf@gmail.com> <83bkxaaj45.fsf@gnu.org> <878rs55m81.fsf@gmail.com> <834k2t1cva.fsf@gnu.org> <87ilqdnl8z.fsf@gmail.com> <83bkw4s4ln.fsf@gnu.org> <87fslgnn9h.fsf@gmail.com> <87lev85d36.fsf@gmail.com> <877d6sum2c.fsf@igel.home> <4548a66-c8f8-57de-58db-6241a1f16cc4@gmail.com> <8735hguk0u.fsf@igel.home> <218f952c-747d-c32-5bce-5ad078a51f41@gmail.com> <878rr6oidh.fsf@gmail.com> <83czgind12.fsf@gnu.org> <874k1onxs1.fsf@gmail.com> <83pmkcgwku.fsf@gnu.org> <39917dfe-5c28-96a-13d2-1f4bdaef449f@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54804 Cc: 54804@debbugs.gnu.org, tino.calancha@gmail.com, juri@linkov.net, monnier@iro.umontreal.ca, uyennhi.qm@gmail.com, spwhitton@spwhitton.name X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Tino Calancha > Date: Tue, 17 May 2022 14:53:41 +0200 (CEST) > cc: Eli Zaretskii , Tino Calancha , > 54804@debbugs.gnu.org, spwhitton@spwhitton.name, uyennhi.qm@gmail.com, > juri@linkov.net > > > > On Tue, 17 May 2022, Stefan Monnier wrote: > > >>> I want the analog behavior for zap-to... commands: automatic > >>> case sensitivity when the char is uppercase. > >>> I want this behavior on interactive calls only, for instance when users > >>> do `M-z'. > >> > >> As I said I disagree: these are DWIMish features that are best > >> reserved for interactive invocation. In calls from Lisp, it is > >> confusing to have the behavior change so drastically depending on the > >> letter-case of an argument. > > > > Am I misunderstanding something or are you two violently agreeing? > > We both agree with a sword in a hand. > > I don't want to change the behavior on Lisp call! > Just let me know the nice way to detect that the call is interactive and > then I will inject the feature :-) If you only make the search case-sensitive in the 'interactive' form, that happens automagically. From debbugs-submit-bounces@debbugs.gnu.org Tue May 17 10:31:29 2022 Received: (at 54804) by debbugs.gnu.org; 17 May 2022 14:31:29 +0000 Received: from localhost ([127.0.0.1]:57555 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nqyET-0006d1-E4 for submit@debbugs.gnu.org; Tue, 17 May 2022 10:31:29 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:16887) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nqyES-0006co-65 for 54804@debbugs.gnu.org; Tue, 17 May 2022 10:31:28 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 912AB440C48; Tue, 17 May 2022 10:31:22 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 49EA944076F; Tue, 17 May 2022 10:31:21 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1652797881; bh=2xQufb/AuOJD93VBNuakDDO4eLhYk4QJ+X/0XV3I84A=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=P3huCGW7iIuVzmCl94nPplMJAkReZuyuM7cDzvzhl6kmdb9lVJs7LasYxXellgrfM R34clZGhnEPdnXPAwr7SSFIG/hPpK8Gq+wBwvyUbKYEN6S6KyzPiqGre5pgrAUnXJl j6IhaoNxiHaUeKiDwSrqJXJCvtfR/gtqz+A2mmFIDZZpphtEyGD8PdpMNQPDcT2cI1 BHYtOJzCzR72PRsaUOrixRj0dFBgKZIqzm1a9XrejTR/mTWXDy0lNk/+aHPitDs6pK 4QGYr0m6qkUtbjnMUfw80TbVbJS0dGJd4SByOrWcWggTz88DP/y67J9h6XNNQEhd33 QGc/2L60HESXQ== Received: from pastel (unknown [45.72.221.51]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id C58B4120202; Tue, 17 May 2022 10:31:20 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter Message-ID: References: <87ee27fd1a.fsf@gmail.com> <83bkxaaj45.fsf@gnu.org> <878rs55m81.fsf@gmail.com> <834k2t1cva.fsf@gnu.org> <87ilqdnl8z.fsf@gmail.com> <83bkw4s4ln.fsf@gnu.org> <87fslgnn9h.fsf@gmail.com> <87lev85d36.fsf@gmail.com> <877d6sum2c.fsf@igel.home> <4548a66-c8f8-57de-58db-6241a1f16cc4@gmail.com> <8735hguk0u.fsf@igel.home> <218f952c-747d-c32-5bce-5ad078a51f41@gmail.com> <878rr6oidh.fsf@gmail.com> <83czgind12.fsf@gnu.org> <874k1onxs1.fsf@gmail.com> <83pmkcgwku.fsf@gnu.org> <39917dfe-5c28-96a-13d2-1f4bdaef449f@gmail.com> <83czgcgty4.fsf@gnu.org> Date: Tue, 17 May 2022 10:31:19 -0400 In-Reply-To: <83czgcgty4.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 17 May 2022 16:38:43 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.052 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54804 Cc: spwhitton@spwhitton.name, 54804@debbugs.gnu.org, juri@linkov.net, uyennhi.qm@gmail.com, Tino Calancha X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > If you only make the search case-sensitive in the 'interactive' form, > that happens automagically. I don't understand what you mean by that: the search doesn't take place inside the interactive form, so he can't really control the case-sensitivity from the interactive form, except (as he does) by using the interactive form to pass extra info (in the form of the `interactive` arg) to tell the search code that the call was made interactively and should hence use the "fancier" form of case sensitivity. Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue May 17 15:44:10 2022 Received: (at 54804) by debbugs.gnu.org; 17 May 2022 19:44:10 +0000 Received: from localhost ([127.0.0.1]:58076 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nr374-0000uD-JN for submit@debbugs.gnu.org; Tue, 17 May 2022 15:44:10 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:47497) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nr373-0000tz-BV for 54804@debbugs.gnu.org; Tue, 17 May 2022 15:44:09 -0400 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 80B27100009; Tue, 17 May 2022 19:43:59 +0000 (UTC) From: Juri Linkov To: Tino Calancha Subject: Re: bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter Organization: LINKOV.NET References: <87ee27fd1a.fsf@gmail.com> <83bkxaaj45.fsf@gnu.org> <878rs55m81.fsf@gmail.com> <834k2t1cva.fsf@gnu.org> <87ilqdnl8z.fsf@gmail.com> <83bkw4s4ln.fsf@gnu.org> <87fslgnn9h.fsf@gmail.com> <87lev85d36.fsf@gmail.com> <877d6sum2c.fsf@igel.home> <4548a66-c8f8-57de-58db-6241a1f16cc4@gmail.com> <8735hguk0u.fsf@igel.home> <218f952c-747d-c32-5bce-5ad078a51f41@gmail.com> <878rr6oidh.fsf@gmail.com> <83czgind12.fsf@gnu.org> <874k1onxs1.fsf@gmail.com> Date: Tue, 17 May 2022 22:32:27 +0300 In-Reply-To: <874k1onxs1.fsf@gmail.com> (Tino Calancha's message of "Tue, 17 May 2022 14:34:06 +0200") Message-ID: <861qwsvwlg.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 54804 Cc: uyennhi.qm@gmail.com, Eli Zaretskii , 54804@debbugs.gnu.org, monnier@iro.umontreal.ca, spwhitton@spwhitton.name X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > This is what Emacs does for isearch/search. > > If you go to the *scratch* buffer, and you do > C-s T C-s C-s > you only jump on 'T', that is, you skip the 't'. This is regardless > on the `case-fold-search' value. Isearch has an additional option 'search-upper-case', although I'm not sure if such complexity is worthy to add to zap-to. Maybe only for interactive use. From debbugs-submit-bounces@debbugs.gnu.org Wed May 18 03:25:57 2022 Received: (at 54804) by debbugs.gnu.org; 18 May 2022 07:25:57 +0000 Received: from localhost ([127.0.0.1]:58803 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nrE4C-0002Y0-Vd for submit@debbugs.gnu.org; Wed, 18 May 2022 03:25:57 -0400 Received: from mail-ed1-f47.google.com ([209.85.208.47]:40464) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nrE4B-0002Xn-0g for 54804@debbugs.gnu.org; Wed, 18 May 2022 03:25:55 -0400 Received: by mail-ed1-f47.google.com with SMTP id i40so1807697eda.7 for <54804@debbugs.gnu.org>; Wed, 18 May 2022 00:25:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:message-id:mime-version; bh=sr8hh/n0+oIlMWXvF4n3We71L0JrLG53yn+Tpl8JLnU=; b=fRxFzC6w25Rqyeq5G57R+p58Qkrp/Z6GLzALfBtEOyhpoMRtmA5QIyloTomW/rma6x TT4rShHh/Tb6OpgGa22q22/KD2DKMNgClQwOkIXjgzbX0O6vRvz+yUL89Ef0hn9xHOdK zt+XDnnjJFEzfw6zCfzJ+cocZzmUb1mPrGXcUN1TFZz0P1Af33jFnqS9zMmMYpHBquog jAfZp8EhwjLSy2N0UIhWh33OXdrSz7RQQOJErtgvOIjkrugdl4xsSHz9L0+DtA3u3anv xLK8j+ES9hJBE3E7Esk3n/uYnvdd2fkRNchNu3RUIE1j4hcQhLcbErHx0O6KAVlPYPL3 ek4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:message-id :mime-version; bh=sr8hh/n0+oIlMWXvF4n3We71L0JrLG53yn+Tpl8JLnU=; b=JeQMj515zvK7InOIZF+fld6caqV2rJRljjaKixfmP9YG7p35bERZ2+iaaYQ2TNt5bq 94z69AYOJSxJ8695o4Ji3FLboUXAUrxmbAdvozwAZMgWw62elFE9OW+jQ2zpsRdVRco3 nLrfoqLMXz5WLMLJWyvtA9kDXJjCsCqCtxNKvvmpxhXQT8QEVLQRqax8sirc4VKWMYnb Yx5Pxsf3xkD1m2byuhHLS9yJ6MaMWlE7qmx1JaWkzjc4NZNN1UCh3tfZ+vVYCFCHOSoH 5MxxzKzkzR5T5IoGfmOSjfZ4KjTjottkgZLduG2I0OjMWPJ/T46sQr0aberhF+Jq3ewM u3aQ== X-Gm-Message-State: AOAM532rxLVuBANME1cLDac8Vv1miYjwxbHWsFKvuP75NDBIOsbGusz0 KWdSHmipTOoy7xnwVC/KSgM= X-Google-Smtp-Source: ABdhPJwDI+RGFfKjhd11qNJWRtkyzhxzVkFJhY9uq0J6pFczMepg45B7rwMbqrFa2/mpyQQgCE7Wnw== X-Received: by 2002:aa7:c14a:0:b0:42a:9ddd:2019 with SMTP id r10-20020aa7c14a000000b0042a9ddd2019mr20444980edp.43.1652858749106; Wed, 18 May 2022 00:25:49 -0700 (PDT) Received: from eprince ([193.118.249.171]) by smtp.gmail.com with ESMTPSA id h22-20020aa7cdd6000000b0042abb914d6asm855236edw.69.2022.05.18.00.25.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 00:25:48 -0700 (PDT) From: Tino Calancha To: Eli Zaretskii Subject: Re: bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter References: <87ee27fd1a.fsf@gmail.com> <83bkxaaj45.fsf@gnu.org> <878rs55m81.fsf@gmail.com> <834k2t1cva.fsf@gnu.org> <87ilqdnl8z.fsf@gmail.com> <83bkw4s4ln.fsf@gnu.org> <87fslgnn9h.fsf@gmail.com> <87lev85d36.fsf@gmail.com> <877d6sum2c.fsf@igel.home> <4548a66-c8f8-57de-58db-6241a1f16cc4@gmail.com> <8735hguk0u.fsf@igel.home> <218f952c-747d-c32-5bce-5ad078a51f41@gmail.com> <878rr6oidh.fsf@gmail.com> <83czgind12.fsf@gnu.org> Date: Wed, 18 May 2022 09:25:46 +0200 Message-ID: <87y1yzmhdx.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 3.5 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eli Zaretskii writes: >> diff --git a/test/lisp/simple-tests.el b/test/lisp/simple-tests.el >> index dcab811bb5..2baf7124d7 100644 >> --- a/test/lisp/simple-tests.el >> +++ b/test/lisp/simple-tests.el >> @@ -971,5 +971,27 [...] Content analysis details: (3.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [193.118.249.171 listed in zen.spamhaus.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tino.calancha[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.47 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.47 listed in wl.mailspike.net] -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Debbugs-Envelope-To: 54804 Cc: uyennhi.qm@gmail.com, 54804@debbugs.gnu.org, schwab@linux-m68k.org, rpluim@gmail.com, spwhitton@spwhitton.name X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.5 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eli Zaretskii writes: >> diff --git a/test/lisp/simple-tests.el b/test/lisp/simple-tests.el >> index dcab811bb5..2baf7124d7 100644 >> --- a/test/lisp/simple-tests.el >> +++ b/test/lisp/simple-tests.el >> @@ -971,5 +971,27 [...] Content analysis details: (2.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.47 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.47 listed in wl.mailspike.net] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [193.118.249.171 listed in zen.spamhaus.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tino.calancha[at]gmail.com) -0.0 T_SCC_BODY_TEXT_LINE No description available. -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Eli Zaretskii writes: >> diff --git a/test/lisp/simple-tests.el b/test/lisp/simple-tests.el >> index dcab811bb5..2baf7124d7 100644 >> --- a/test/lisp/simple-tests.el >> +++ b/test/lisp/simple-tests.el >> @@ -971,5 +971,27 @@ test-undo-region >> ;;(should (= (length (delq nil (undo-make-selective-list 5 9))) 0)) >> (should (= (length (delq nil (undo-make-selective-list 6 9))) 0)))) >> >> + >> +;;; Tests for `zap-to-char' > > Should we have the tests for zap-* functions in one place, rather than > two? My understanding is that we only test in `foo-tests.el' functions beloging to `foo.el'. For historical reasons: `zap-to-char' is defined in simple.el `zap-up-to-char' is defined in misc.el We can move the latter to simple.el, then test the functions in the same file. Some people dislike that because it affects the Git history. I am OK with whatever the people prefer here. From debbugs-submit-bounces@debbugs.gnu.org Fri May 20 18:59:59 2022 Received: (at 54804) by debbugs.gnu.org; 20 May 2022 22:59:59 +0000 Received: from localhost ([127.0.0.1]:40356 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nsBbC-0007d3-QN for submit@debbugs.gnu.org; Fri, 20 May 2022 18:59:58 -0400 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:42793) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nsBb8-0007co-MU for 54804@debbugs.gnu.org; Fri, 20 May 2022 18:59:57 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 662FF320092E; Fri, 20 May 2022 18:59:48 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 20 May 2022 18:59:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=cc:cc:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1653087587; x=1653173987; bh=H4 hhAJob0btbuUwmlBycjVdeSMKI93xPX+sLZd/EIlY=; b=FqAGiwOicmj5CLLoD/ sAOu17uuvGR/hpCm4ik3ddURXzIqkZZ3/ed28cP6I3XPK0ukX1sKk/IVkC51nV/w D6aphioF84QLSvOcmNyNUvgIBRuFunWo8mzngFya8FNwyZELQAe3S3wVtXU0wozA UswFi5bojIOeyNnZ3WRaRo7V5KhTvqba9d6aNi7SRBpQwTD+uvAVUUzaM63VB97a azng6IHCnKz4ucksroE0EYOFpJQ9+32FeqNYVFK0j994ghX8OSAd6wg7rJC7wtuC EdwbEgsaSnx5mA3hxDWOU7BllDHWWMKmpDOwe9m0BJoSiIXqgkrFjbAvN9xfrLme mnlQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1653087587; x=1653173987; bh=H4hhAJob0btbuUwmlBycjVdeSMKI 93xPX+sLZd/EIlY=; b=Pir+kdQOYkP8i/nlxQjw12KrOJXEi0ruVrc/Pay5UcHR 6/FsmRSuNAiJZ9o3hRZOKvdIugsohS9o3CJgaUsqIj+cmq7I4HzOtx/eNBjeXpgE fLk0cX593AuSnLZND7rGvUKaJpxMVtBIy9OkppkJrUc5edFja24t5pTblTmeFY5J pTJSC1eOfVwu6C5m1FQ53DDhGQdmNYOU2RKunKzhZg4N8jCj0XxEuFdHjlSxRelX usGCxRJ6KhHiZ7P39Bn+IACM7OfA9y3KZfGzRxTXZQrc03PLzSFYu8Wiw3Fse5E9 928+Tnppy29qRbzUC00j1AIMSHa2Xec9ZD9IVjZSBg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrieehgdduhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufgjfhgffffkgggtsehttddttddtredtnecuhfhrohhmpefuvggrnhcu hghhihhtthhonhcuoehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvgeqne cuggftrfgrthhtvghrnhepvdejtedtieetjeegjeekgffghedtkeeltdeftdetkefgueek fedtudfhteeljeeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgv X-ME-Proxy: Feedback-ID: i23c04076:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 20 May 2022 18:59:47 -0400 (EDT) Received: by athena.silentflame.com (Postfix, from userid 1000) id B37421B59B1; Fri, 20 May 2022 22:59:45 +0000 (UTC) From: Sean Whitton To: Tino Calancha , Andreas Schwab Subject: Re: bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter In-Reply-To: <878rr6oidh.fsf@gmail.com> References: <87ee27fd1a.fsf@gmail.com> <83bkxaaj45.fsf@gnu.org> <878rs55m81.fsf@gmail.com> <834k2t1cva.fsf@gnu.org> <87ilqdnl8z.fsf@gmail.com> <83bkw4s4ln.fsf@gnu.org> <87fslgnn9h.fsf@gmail.com> <87lev85d36.fsf@gmail.com> <877d6sum2c.fsf@igel.home> <4548a66-c8f8-57de-58db-6241a1f16cc4@gmail.com> <8735hguk0u.fsf@igel.home> <218f952c-747d-c32-5bce-5ad078a51f41@gmail.com> <878rr6oidh.fsf@gmail.com> User-Agent: Notmuch/0.36 Emacs/29.0.50 (x86_64-pc-linux-gnu) Date: Fri, 20 May 2022 15:59:45 -0700 Message-ID: <878rqvzu72.fsf@athena.silentflame.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 54804 Cc: 54804@debbugs.gnu.org, Eli Zaretskii , Robert Pluim , uyennhi.qm@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hello Tino, On Thu 12 May 2022 at 05:55pm +02, Tino Calancha wrote: > commit 86750ab021ea889766a717458ed28a54e6a40ad3 > Author: Tino Calancha > Date: Thu May 12 17:48:09 2022 +0200 > > zap-to-char: case sensitive for upper-case characters > > In interactive calls, behave case-sensitively if the given char > is an upper-case character. Same for zap-up-to-char. > > This is analog to what the user-level incremental search feature does. Could we have a defcustom to always be case-sensitive, please? I like the way C-s works by default but for zap-* I'd prefer case sensitivity in every case. Thanks. -- Sean Whitton From debbugs-submit-bounces@debbugs.gnu.org Sat May 21 01:38:55 2022 Received: (at 54804) by debbugs.gnu.org; 21 May 2022 05:38:55 +0000 Received: from localhost ([127.0.0.1]:40541 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nsHpH-0003He-Gj for submit@debbugs.gnu.org; Sat, 21 May 2022 01:38:55 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41872) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nsHpD-0003HO-K1 for 54804@debbugs.gnu.org; Sat, 21 May 2022 01:38:53 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46140) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nsHp8-0005SA-9q; Sat, 21 May 2022 01:38:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=xARRVoryE9MWPIPdbIGjaN55+xK9ecHxcNULOXGI4YI=; b=FA2ALCQfOq/Y umfbpTMgDr8MWJCbZVcI/9peZYdNuY8IKO9yh6gvf9YfV7l4sdpqU+TsdHkwsbwBHqERPlBqnAyb8 GANXrOXWM2n7gFrfv34TVW+a4PRDZcpuWgTrxP5tQ+dIjKiqZ0BvXVPz/t4V2bTDatrTxUYJqxB22 Wj7O2ea2UlglmnRBWloStqzP0DjJdvDRzZyTXEwdZ3Gtq2hifHWTqyuaOL8Cx6na/wOBxa2Sy3+E8 HGKbMw7wvhWbHEN9lDUg2h8WpAmka12bW5U43tf2ilhKtl5vzbl1tJ+FzUeHX1u1JRForRZbvWtM7 yW2qULNl+5NGuUoNM2nSWA==; Received: from [87.69.77.57] (port=1291 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nsHp6-0007pj-NC; Sat, 21 May 2022 01:38:45 -0400 Date: Sat, 21 May 2022 08:38:44 +0300 Message-Id: <83bkvra1i3.fsf@gnu.org> From: Eli Zaretskii To: Sean Whitton In-Reply-To: <878rqvzu72.fsf@athena.silentflame.com> (message from Sean Whitton on Fri, 20 May 2022 15:59:45 -0700) Subject: Re: bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter References: <87ee27fd1a.fsf@gmail.com> <83bkxaaj45.fsf@gnu.org> <878rs55m81.fsf@gmail.com> <834k2t1cva.fsf@gnu.org> <87ilqdnl8z.fsf@gmail.com> <83bkw4s4ln.fsf@gnu.org> <87fslgnn9h.fsf@gmail.com> <87lev85d36.fsf@gmail.com> <877d6sum2c.fsf@igel.home> <4548a66-c8f8-57de-58db-6241a1f16cc4@gmail.com> <8735hguk0u.fsf@igel.home> <218f952c-747d-c32-5bce-5ad078a51f41@gmail.com> <878rr6oidh.fsf@gmail.com> <878rqvzu72.fsf@athena.silentflame.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54804 Cc: uyennhi.qm@gmail.com, 54804@debbugs.gnu.org, rpluim@gmail.com, tino.calancha@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Sean Whitton > Cc: 54804@debbugs.gnu.org, Robert Pluim , Eli Zaretskii > , uyennhi.qm@gmail.com > Date: Fri, 20 May 2022 15:59:45 -0700 > > > commit 86750ab021ea889766a717458ed28a54e6a40ad3 > > Author: Tino Calancha > > Date: Thu May 12 17:48:09 2022 +0200 > > > > zap-to-char: case sensitive for upper-case characters > > > > In interactive calls, behave case-sensitively if the given char > > is an upper-case character. Same for zap-up-to-char. > > > > This is analog to what the user-level incremental search feature does. > > Could we have a defcustom to always be case-sensitive, please? We already have: case-fold-search. > I like the way C-s works by default but for zap-* I'd prefer case > sensitivity in every case. Why? It is a slippery slope to have a separate case-sensitivity option for each command or a couple of commands. If that is what you want, you can always write your own one-line wrapper around each of these commands, but I don't see any reason that Emacs should provide that for everyone. So I don't think we should provide such a defcustom for these two commands. From debbugs-submit-bounces@debbugs.gnu.org Sat May 21 05:31:07 2022 Received: (at 54804-done) by debbugs.gnu.org; 21 May 2022 09:31:07 +0000 Received: from localhost ([127.0.0.1]:40703 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nsLRz-00015P-8t for submit@debbugs.gnu.org; Sat, 21 May 2022 05:31:07 -0400 Received: from mail-ej1-f49.google.com ([209.85.218.49]:44815) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nsLRu-00014m-3o for 54804-done@debbugs.gnu.org; Sat, 21 May 2022 05:31:05 -0400 Received: by mail-ej1-f49.google.com with SMTP id f21so5871206ejh.11 for <54804-done@debbugs.gnu.org>; Sat, 21 May 2022 02:31:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=/fA/VDoqTxJM8mKn9iMaq6d9/6GsBxnP5DfbCri7OB8=; b=Fa+YDkXZ8ilxYdaxX1ZEVVJcdqvuesUmMcoSCR38UkseQpvHqBVNb7yhneulHliF9S VlJGpMP+WK1Mzph8slBiwTzI5yCjqPO//EutT7oJEqMTFjx1cA6Wtv+KXeiJ0yD4Py/V c46RvvXbkVjG5tv0iJ3Q/zOnHP068NpXtw3UmILUdQg2cg54+N8s7xm/MZ8x9sU0wRn1 v2kAPNWZ7U6cN49BcW84yfMtmzjV6Y8VbRWwKIrCFpfD3o+s8WekE5pvVPNxSU3rN08V qtYoqfQeJnVspgD/3VM06SDiGAAgDAyIyeaNatBcR1Ll3sN9o/3ThX/VJ7PMr8k8zaM+ wWOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=/fA/VDoqTxJM8mKn9iMaq6d9/6GsBxnP5DfbCri7OB8=; b=Nsa2rNz6KiWO++RsPTSRvkAlX2rpQFlyu+fxaxmxoaDD8RcVzvH4G2DVRAYxd+i/uo sPbvmDWommsUPVbVCuCfNeb1aGzuBVInuPaHrqD2U05lft98eASVthRq9V//6UB8oBLJ Ew0R5BLXbYBp0pzAGEj9rSRmU4u2x73Z485zFwq2vn2p7PoAZk+bIKX+JtBpxXdUXmUR iwXuIcdFBHijsH762+TWzn/gnqFHnu3Q9FeeLCtESafgCXGEj8LxzXaWu4oJZETrnuhC XxmQTjL+fuBRJk7s7Vha1xBIJoAUqPUa6sQ6lVNox8K1eYbs21TDp7fQsgYmx1b187dO DVXQ== X-Gm-Message-State: AOAM532kbp1hFigcXWW26m1pBo6tAAJCYZ98PQv7IElHpSCerts9Qqvz bXITziWNlmH4CEIH0koR888= X-Google-Smtp-Source: ABdhPJyWzpRfGcr1Zq/XbtI+4G7GW9SV3b9FkWGVbtiFcXb9Np9KYGVYmPZCDnxXEnerok+C5Stmzw== X-Received: by 2002:a17:907:9602:b0:6df:e82c:f84 with SMTP id gb2-20020a170907960200b006dfe82c0f84mr11965495ejc.590.1653125456123; Sat, 21 May 2022 02:30:56 -0700 (PDT) Received: from eprince ([193.118.249.171]) by smtp.gmail.com with ESMTPSA id c62-20020a509fc4000000b0042aae3f282esm5345626edf.65.2022.05.21.02.30.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 May 2022 02:30:55 -0700 (PDT) From: Tino Calancha To: 54804-done@debbugs.gnu.org Subject: Re: bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter References: <87ee27fd1a.fsf@gmail.com> <83bkxaaj45.fsf@gnu.org> <878rs55m81.fsf@gmail.com> <834k2t1cva.fsf@gnu.org> <87ilqdnl8z.fsf@gmail.com> <83bkw4s4ln.fsf@gnu.org> <87fslgnn9h.fsf@gmail.com> <87lev85d36.fsf@gmail.com> <877d6sum2c.fsf@igel.home> <4548a66-c8f8-57de-58db-6241a1f16cc4@gmail.com> <8735hguk0u.fsf@igel.home> <218f952c-747d-c32-5bce-5ad078a51f41@gmail.com> <878rr6oidh.fsf@gmail.com> <878rqvzu72.fsf@athena.silentflame.com> <83bkvra1i3.fsf@gnu.org> Date: Sat, 21 May 2022 11:30:53 +0200 In-Reply-To: <83bkvra1i3.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 21 May 2022 08:38:44 +0300") Message-ID: <87v8tzmdv6.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 3.6 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eli Zaretskii writes: >> From: Sean Whitton >> Could we have a defcustom to always be case-sensitive, please? > > We already have: case-fold-search. > So I don't think we should provide such a defcustom for these two > c [...] Content analysis details: (3.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [193.118.249.171 listed in zen.spamhaus.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tino.calancha[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.218.49 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.218.49 listed in wl.mailspike.net] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Debbugs-Envelope-To: 54804-done Cc: uyennhi.qm@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.6 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eli Zaretskii writes: >> From: Sean Whitton >> Could we have a defcustom to always be case-sensitive, please? > > We already have: case-fold-search. > So I don't think we should provide such a defcustom for these two > c [...] Content analysis details: (2.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.218.49 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.218.49 listed in wl.mailspike.net] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [193.118.249.171 listed in zen.spamhaus.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tino.calancha[at]gmail.com) 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders -0.0 T_SCC_BODY_TEXT_LINE No description available. -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Eli Zaretskii writes: >> From: Sean Whitton >> Could we have a defcustom to always be case-sensitive, please? > > We already have: case-fold-search. > So I don't think we should provide such a defcustom for these two > commands. I agree with Eli's point. Pushed into master branch as commit: zap-to-char: case sensitive for upper-case characters (212aea97f9c9fdabdf7e8a47e64c8243953a7690) From debbugs-submit-bounces@debbugs.gnu.org Sat May 21 14:53:56 2022 Received: (at 54804) by debbugs.gnu.org; 21 May 2022 18:53:56 +0000 Received: from localhost ([127.0.0.1]:42967 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nsUEe-0002Fl-Fw for submit@debbugs.gnu.org; Sat, 21 May 2022 14:53:56 -0400 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:46763) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nsUEb-0002FW-Cc for 54804@debbugs.gnu.org; Sat, 21 May 2022 14:53:55 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 146143200406; Sat, 21 May 2022 14:53:46 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Sat, 21 May 2022 14:53:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=cc:cc:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1653159226; x=1653245626; bh=Ri 9o2Bf/RF8Z4kWlD7pzbyc32GdW52a3J/qeAasdBMw=; b=qJavoUSrVwK3qNX7HR cCwS9SqDxP1KcZfhsccTwV/uiOFj3sx3kbTrxfFETq5lUPW0DwvtJ9ZEdw3TaY95 uBqcVPyOpvrgBD5f7KXIywvPE5h4qkTs6ex6U89hhMUk42jkmASA3fAdUOPGeq7X MOIRnDubH4E0j1xh7Hdb0eXVgGeRMT5dgKaPmFdo8QdjgW2OdgM4dDCZ2mkjK0/p K9TcDyvFQUXz+6RY0S8cqZcEppl53lcNvYHauFU1TaVdeMrOX5xiqpl7b3V7lAAJ hn5sEABl0zK5tqYqGQpmhu16CZm/iTsoSuMzw24IJE3QcoqB9nKhb6zN5JfIH/07 SQUA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1653159226; x=1653245626; bh=Ri9o2Bf/RF8Z4kWlD7pzbyc32GdW 52a3J/qeAasdBMw=; b=kwJ3fPUyqmH4H4R3UGbClsEzsqNCYWffsE5oSwz5lxm8 MU64z/Kd22RpP4E1QIKmZIfJ1wHWhtgZUMYqUIjVqhRddk0rjn/TDwi8KzdZeXf6 s4SwCDxfx0XrU9NZTHg4uhjTTSk8NopzuoEouieQrzsKhkV+nB9ZTQBDmNjTdfgj RsklEiVfj6vcH/SxAJ8K5gUBeY/YSARQjMMePj8GT5ONUua29T4eHLxJ1Hw4F/Lj ryhy39096CnxACh1r5hI2brQR/h/cvBNa/WopMfM3DPjD5ZtWox3NZDnvaGfSOPv T/lDIk31aVgWW/NHJdIPDVIy1rx4ZckPlzRTCR78qA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrieeigdduvdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefujghffgffkfggtgesthdttddttdertdenucfhrhhomhepufgvrghn ucghhhhithhtohhnuceoshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgvqe enucggtffrrghtthgvrhhnpedvjeettdeiteejgeejkefggfehtdekledtfedtteekgfeu keeftdduhfetleejkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvg X-ME-Proxy: Feedback-ID: i23c04076:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 21 May 2022 14:53:46 -0400 (EDT) Received: by athena.silentflame.com (Postfix, from userid 1000) id A7DF21B5DBA; Sat, 21 May 2022 18:53:44 +0000 (UTC) From: Sean Whitton To: Eli Zaretskii Subject: Re: bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter In-Reply-To: <83bkvra1i3.fsf@gnu.org> References: <87ee27fd1a.fsf@gmail.com> <83bkxaaj45.fsf@gnu.org> <878rs55m81.fsf@gmail.com> <834k2t1cva.fsf@gnu.org> <87ilqdnl8z.fsf@gmail.com> <83bkw4s4ln.fsf@gnu.org> <87fslgnn9h.fsf@gmail.com> <87lev85d36.fsf@gmail.com> <877d6sum2c.fsf@igel.home> <4548a66-c8f8-57de-58db-6241a1f16cc4@gmail.com> <8735hguk0u.fsf@igel.home> <218f952c-747d-c32-5bce-5ad078a51f41@gmail.com> <878rr6oidh.fsf@gmail.com> <878rqvzu72.fsf@athena.silentflame.com> <83bkvra1i3.fsf@gnu.org> User-Agent: Notmuch/0.36 Emacs/29.0.50 (x86_64-pc-linux-gnu) Date: Sat, 21 May 2022 11:53:44 -0700 Message-ID: <87h75iyax3.fsf@athena.silentflame.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 54804 Cc: uyennhi.qm@gmail.com, 54804@debbugs.gnu.org, rpluim@gmail.com, tino.calancha@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hello, On Sat 21 May 2022 at 08:38am +03, Eli Zaretskii wrote: >> Could we have a defcustom to always be case-sensitive, please? > > We already have: case-fold-search. > >> I like the way C-s works by default but for zap-* I'd prefer case >> sensitivity in every case. > > Why? Hard to say -- C-s never surprises me but when 'M-z a' jumps to an A it does :) > It is a slippery slope to have a separate case-sensitivity option for > each command or a couple of commands. If that is what you want, you > can always write your own one-line wrapper around each of these > commands, but I don't see any reason that Emacs should provide that > for everyone. > > So I don't think we should provide such a defcustom for these two > commands. I agree, adding a wrapper of my own is better. Thanks for the commit, Tino, and to the reviewers. -- Sean Whitton From unknown Sat Aug 16 20:57:08 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 19 Jun 2022 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator