From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#15839: 24.3.50; `isearch-allow-scroll': be able to scroll point off screen temporarily Date: Fri, 07 Dec 2018 01:03:54 +0200 Organization: LINKOV.NET Message-ID: <87o99y5kbp.fsf@mail.linkov.net> References: <51df60b6-e152-4989-a27e-70dadb9b7474@default> <8736rqgk6f.fsf@mail.linkov.net> <87y39gexdo.fsf@mail.linkov.net> <877egzmmyk.fsf@mail.linkov.net> <8af20443-841d-4211-99ae-269e042a9a33@default> <875zwidonq.fsf@mail.linkov.net> <178ca8ac-fb45-4cef-a48d-d916a60860be@default> <87a7lsu7rn.fsf@mail.linkov.net> <24e8fff5-67d8-49ac-801e-1e5f49d2037f@default> <875zwfed5h.fsf@mail.linkov.net> <5a6a3254-f742-44e9-a498-b6d5a375a873@default> <87va4ai16x.fsf@mail.linkov.net> <87zhtk164k.fsf@web.de> <87woon33bp.fsf@mail.linkov.net> <87mupij1g0.fsf@web.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1544140749 12108 195.159.176.226 (6 Dec 2018 23:59:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 6 Dec 2018 23:59:09 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 15839@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 07 00:59:05 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gV3Xt-00032P-0C for geb-bug-gnu-emacs@m.gmane.org; Fri, 07 Dec 2018 00:59:05 +0100 Original-Received: from localhost ([::1]:43506 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gV3Zz-00038B-Ft for geb-bug-gnu-emacs@m.gmane.org; Thu, 06 Dec 2018 19:01:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42039) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gV3Zq-00036m-7K for bug-gnu-emacs@gnu.org; Thu, 06 Dec 2018 19:01:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gV3Zm-0005kU-FX for bug-gnu-emacs@gnu.org; Thu, 06 Dec 2018 19:01:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60123) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gV3Zm-0005kO-AC for bug-gnu-emacs@gnu.org; Thu, 06 Dec 2018 19:01:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gV3Zm-0001mq-6m for bug-gnu-emacs@gnu.org; Thu, 06 Dec 2018 19:01:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 07 Dec 2018 00:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15839 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 15839-submit@debbugs.gnu.org id=B15839.15441408546824 (code B ref 15839); Fri, 07 Dec 2018 00:01:02 +0000 Original-Received: (at 15839) by debbugs.gnu.org; 7 Dec 2018 00:00:54 +0000 Original-Received: from localhost ([127.0.0.1]:36144 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gV3ZZ-0001lv-Vt for submit@debbugs.gnu.org; Thu, 06 Dec 2018 19:00:53 -0500 Original-Received: from ladybird.maple.relay.mailchannels.net ([23.83.214.98]:42904) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gV3ZU-0001lf-Tz for 15839@debbugs.gnu.org; Thu, 06 Dec 2018 19:00:49 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 6D131435BB; Fri, 7 Dec 2018 00:00:43 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a68.g.dreamhost.com (unknown [100.96.20.98]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 2B33443571; Fri, 7 Dec 2018 00:00:43 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a68.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.16.2); Fri, 07 Dec 2018 00:00:43 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Shelf-Relation: 4b6e0bc039311ca4_1544140843283_571744823 X-MC-Loop-Signature: 1544140843283:2969612708 X-MC-Ingress-Time: 1544140843283 Original-Received: from pdx1-sub0-mail-a68.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a68.g.dreamhost.com (Postfix) with ESMTP id E0AD47FE56; Thu, 6 Dec 2018 16:00:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=YWqqPc4wZ8jN+N3Oyx+/LgFyn7M=; b= n46AVN+CfOct0t4N8B5Ioydj/VpxNfHNnqOpouK9+HBgCumGkBP7jmx47+2YGj5G unZcVZTUJFfF66wRk5T2a67DTmh7Y1RXB6yOas+/mT00JociLAdC/ah5wnrYS3Kd SYZA1eLqoTHqRQ9ouTEpM2+nh8G9T3VHo2qVWA2c7K8= Original-Received: from mail.jurta.org (m91-129-103-7.cust.tele2.ee [91.129.103.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a68.g.dreamhost.com (Postfix) with ESMTPSA id 896C87FE51; Thu, 6 Dec 2018 16:00:41 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a68 In-Reply-To: <87mupij1g0.fsf@web.de> (Michael Heerdegen's message of "Thu, 06 Dec 2018 13:15:43 +0100") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrudefkedgudekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdefrdejnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtfedrjedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehmihgthhgrvghlpghhvggvrhguvghgvghnseifvggsrdguvgenucevlhhushhtvghrufhiiigvpedt 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: 208.118.235.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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:153154 Archived-At: >> Isn't this binding of shift-left and shift-right from Org mode? > > No, I simply have personal global bindings for these: > > (global-set-key [(shift left)] #'backward-char) > (global-set-key [(shift right)] #'forward-char) Your keybindings are related to cursor motion, so it makes sense to allow them to work in isearch-mode. One way to do this: (define-key isearch-mode-map [(shift left)] (lambda (&optional n) (interactive "^p") (setq isearch-pre-move-point (point)) (call-interactively 'backward-char))) (define-key isearch-mode-map [(shift right)] (lambda (&optional n) (interactive "^p") (setq isearch-pre-move-point (point)) (call-interactively 'forward-char))) Or do you want to be able to put properties to allow a command, e.g.: (put 'backward-char 'isearch-move 'enabled) (put 'forward-char 'isearch-move 'enabled) with such patch diff --git a/lisp/isearch.el b/lisp/isearch.el index dcd119a517..6b0d9f03af 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -2871,7 +2871,11 @@ isearch-pre-command-hook (stringp (nth 1 (interactive-form this-command))) (string-match-p "^^" (nth 1 (interactive-form this-command)))))) (and (eq isearch-yank-on-move 'shift) - this-command-keys-shift-translated)) + (or (and this-command-keys-shift-translated + (symbolp this-command) + (not (eq (get this-command 'isearch-move) 'disabled))) + (and (symbolp this-command) + (eq (get this-command 'isearch-move) 'enabled))))) (setq this-command-keys-shift-translated nil) (setq isearch-pre-move-point (point))) ;; Append control characters to the search string I'm still not sure if this needed to be generalized more, and how far. For example, I think that shift-left and shift-right from org-mode should exit Isearch as well as windmove shift-keys should exit Isearch and move focus to another window.