From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.bugs Subject: bug#39154: 27.0.60; Use character history in zap-up-to-char Date: Thu, 16 Jan 2020 19:49:12 +0100 Message-ID: <87blr31bkn.fsf@calancha-pc.dy.bbexcite.jp> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="22134"; mail-complaints-to="usenet@ciao.gmane.io" Cc: juri linkov To: 39154@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 16 19:50:20 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1isADj-0005dj-Ot for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 16 Jan 2020 19:50:19 +0100 Original-Received: from localhost ([::1]:47064 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1isADi-0007kG-AC for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 16 Jan 2020 13:50:18 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39891) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1isADV-0007eh-24 for bug-gnu-emacs@gnu.org; Thu, 16 Jan 2020 13:50:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1isADS-0006d1-T1 for bug-gnu-emacs@gnu.org; Thu, 16 Jan 2020 13:50:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60605) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1isADS-0006ce-BJ for bug-gnu-emacs@gnu.org; Thu, 16 Jan 2020 13:50:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1isADS-0004rx-07; Thu, 16 Jan 2020 13:50:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: juri@linkov.net, bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 Jan 2020 18:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 39154 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: juri linkov Original-Received: via spool by submit@debbugs.gnu.org id=B.157920057318673 (code B ref -1); Thu, 16 Jan 2020 18:50:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 Jan 2020 18:49:33 +0000 Original-Received: from localhost ([127.0.0.1]:38344 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1isACv-0004r4-NI for submit@debbugs.gnu.org; Thu, 16 Jan 2020 13:49:33 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:53359) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1isACq-0004qq-Cg for submit@debbugs.gnu.org; Thu, 16 Jan 2020 13:49:27 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39816) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1isACp-0007bD-0S for bug-gnu-emacs@gnu.org; Thu, 16 Jan 2020 13:49:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1isACn-0006E7-Nh for bug-gnu-emacs@gnu.org; Thu, 16 Jan 2020 13:49:22 -0500 Original-Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:39342) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1isACn-0006D6-HU for bug-gnu-emacs@gnu.org; Thu, 16 Jan 2020 13:49:21 -0500 Original-Received: by mail-wr1-x42c.google.com with SMTP id y11so20250466wrt.6 for ; Thu, 16 Jan 2020 10:49:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=oA5dJxJt/fEToQr7A5HGJX7O+kj1V11etVFUQX0S0SE=; b=ucABe2ggj0HJOsSvOAP7DuOkhG82mHqioLXFKD73nO3Y4eHc0XoqTBTKa9+sHcQxuD 0MKr9Q6oEYfs3m+QCsWQy3nqbYs0zswgTuF96Knwl/cR+9uVMUw9XxEWfxR7Lo9cTUsL d/YkNAB++6oFdzWBBnC/VyWXij0AXVe7yCjpfNEtX9+OzZmsQAZ6xDcmk+FPWgFKgmUl Q9KQUcD2zwBo57aK7tXi+HXmZJqZuTDe3a0p+WN1paOpb3lCLFQUqtSCBzWtQrtntWxK ZMq0QZ26v8vUVaLSM/JHImKKrYuI5runysoarvWg8wFRFSs6Ec7bMWelUxaesniSrpjc KBWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=oA5dJxJt/fEToQr7A5HGJX7O+kj1V11etVFUQX0S0SE=; b=etmhQR0Teknj5J0odvPnL0ITF4iiG9i+AZ73mpR/UI3QdIrQ6l1l7ncaOjrx+Mf9bK wO3/VNzx34x3Ric1RZQ6udwG7imrTueHzyFTULqTJ6gIAWZpXoXZjYOXpn/EjsXKHwTr WhuSdlSLmFZGGy55SATZS5yCfthwnBEMedOrsYnqdII7ioGckKZ4ZAA7FkPeYumkNNWT xgnMa/UL+jKYMfi2cDQ05PXJRe2etFJP4DrmzOQiZGTuTuuEIcKApWc0GMp0joa0xwxL Ddbj7GncS/OxgqYs0nBsf677c//5D/chBEBQLstyOS0FDb6QSThXqzuM89TPBJgG0VzC G7BQ== X-Gm-Message-State: APjAAAWQ2qHU78amixFVEbOY/xSAsjofUWOux3SGzEOpRpLKZOS18Uf+ ItI1ELVFCo3YsvVtn5dLF9tYaFnW X-Google-Smtp-Source: APXvYqxDDlenMpUqrMhgtRH1H0TLGxhYVRvleFJI6/ccemHAfns5YqZ8UNJrUkg7kzGRa5X0LEmeqw== X-Received: by 2002:adf:b605:: with SMTP id f5mr4635414wre.383.1579200558096; Thu, 16 Jan 2020 10:49:18 -0800 (PST) Original-Received: from calancha-pc.dy.bbexcite.jp ([31.7.242.222]) by smtp.gmail.com with ESMTPSA id p18sm5767513wmg.4.2020.01.16.10.49.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2020 10:49:17 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:174732 Archived-At: X-Debbugs-Cc: Juri Linkov Severity: wishlist While zapping I saw in the news about recent `zap-to-char' changes... ( I mean Emacs news, I don't watch TV! :-| ) We might want to extend that to cover `zap-up-to-char' as well; as many others, I weardly use the former, but I often use the latter. --8<-----------------------------cut here---------------start------------->8--- commit 5436b891aadaf649ae6ab3e204b74c76bfa4e6f8 Author: Tino Calancha Date: Thu Jan 16 19:30:03 2020 +0100 Use character history in zap-up-to-char Extend commit 'Add CHARS arg to read-char-from-minibuffer compatible with read-char-choice.' (04ab67470706f1c66bdf08e4078ea3dffd79b41e) to `zap-up-to-char'. * lisp/misc.el (lisp/misc.el): Use same interactive specification as in `zap-to-char'. * etc/NEWS (): Mention zap-up-to-char as well. diff --git a/etc/NEWS b/etc/NEWS index d6eb5d9e66..08e8907a2c 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -603,10 +603,10 @@ navigation and editing of large files. +++ ** 'zap-to-char' now uses the history of characters you used to zap to. -'zap-to-char' uses the new 'read-char-from-minibuffer' function to allow -navigating through the history of characters that have been input. -This is mostly useful for characters that have complex input methods -where inputting the character again may involve many keystrokes. +'zap-to-char' and 'zap-up-to-char' use the new 'read-char-from-minibuffer' +function to allow navigating through the history of characters that +have been input. This is mostly useful for characters that have complex +input methods where inputting the character again may involve many keystrokes. +++ ** 'save-some-buffers' now has a new action in the prompt: 'C-f' will diff --git a/lisp/misc.el b/lisp/misc.el index 05244a6ea2..8b6b7a7e0d 100644 --- a/lisp/misc.el +++ b/lisp/misc.el @@ -69,7 +69,9 @@ zap-up-to-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 "p\ncZap up to char: ") + (interactive (list (prefix-numeric-value current-prefix-arg) + (read-char-from-minibuffer "Zap to char: " + nil 'read-char-history))) (let ((direction (if (>= arg 0) 1 -1))) (kill-region (point) (progn --8<-----------------------------cut here---------------end--------------->8--- In GNU Emacs 27.0.60 (build 52, x86_64-pc-linux-gnu, GTK+ Version 3.24.5) of 2020-01-16 built on calancha-pc.dy.bbexcite.jp Repository revision: 52080b5778cbe535c331fa14539aecd88f2be0a0 Repository branch: emacs-27 Windowing system distributor 'The X.Org Foundation', version 11.0.12004000 System Description: Debian GNU/Linux 10 (buster)