From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Greselin Newsgroups: gmane.emacs.help Subject: Emacs 26.2 - Scroll command breaks if allowed during Isearch Date: Wed, 13 Nov 2019 17:06:33 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="39420"; mail-complaints-to="usenet@blaine.gmane.org" To: Help Gnu Emacs mailing list Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 13 17:07:26 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iUvAz-000A7L-K1 for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Nov 2019 17:07:25 +0100 Original-Received: from localhost ([::1]:46890 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iUvAy-0005Ib-CP for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Nov 2019 11:07:24 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40191) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iUvAm-0005IU-Tt for help-gnu-emacs@gnu.org; Wed, 13 Nov 2019 11:07:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iUvAl-0000pe-P7 for help-gnu-emacs@gnu.org; Wed, 13 Nov 2019 11:07:12 -0500 Original-Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]:35197) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iUvAl-0000pM-JK for help-gnu-emacs@gnu.org; Wed, 13 Nov 2019 11:07:11 -0500 Original-Received: by mail-pg1-x52e.google.com with SMTP id q22so1665790pgk.2 for ; Wed, 13 Nov 2019 08:07:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=/YgkLVBncaamgBtKIsAaMxbEHEU8wUme33644G8q6iY=; b=d95ZVYdwFSK+oRPHC8GjrUbPmq+JkXnQBSjqilhetEX1kluJ8F6ZM3t7aEDlSAW2js GdVrIaAEWr5MMxzPqHEv/zztWEWMAYBvhjOLqSMhoGdl1UX88JWhoKCPzpGT7WwHqjY5 iupOwUXmU9DH1e4chTxVFJRYO8Bk/RLcNDeSe7M0RgS0SUKyNXIzVkMx0Fs4lAhsi/Qe MpoFUonSvWpo7PW0piRmYRh0cJvBRrSlAxIaUkvHvWzsIvrNwaGFkit8HoRXh4fWr8dG v8aVxyJQKvKKAZo7Z8n4miC9Tl7Mp4sQdTrylGUPjjJWN4MbdPOErohQgu4cBt+DlC6K a9Vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=/YgkLVBncaamgBtKIsAaMxbEHEU8wUme33644G8q6iY=; b=VjJ/Fbmn6FCplrjT7KIAyFleMp3Ppr5+5ccz42KU9hzkeK58DgXF0UTyanb1ahcD9m DQdI8HFSnn0m0g7YAtOxIPGLAYFIkVI3dFnG09LjzoA62xKg0HNYwxdPDe7X0YQO0tRx nypKKgE6WalkJCNQn83j4VW4I4WdIZ4cVJLQ3z6RJsMJGoDG9hmccqc3yTMnPR991And 6ey/WZox6GEQIVqAhb9QyP0jxGUF3CKPKYc+6BL/ZRyL1Va9FAn1DIq9lvw9188mQL2R SFcCl8UdtKX6sOKqlKXN6FqDVxl8r1RmlSxKZe6h6G2bvPbB9D2xaXX099ttGzun5COd RlBA== X-Gm-Message-State: APjAAAVZStwe2I9mPbA09BfSv0goyXlQgy+bJylE4su9uF8GWcqpZvMR OgkS3uT1N/wDWGtKPnnwyisVV4K4FRF7c0cG2aP5aOB7 X-Google-Smtp-Source: APXvYqzIN6ld+Lzyucj56mOZ+5eMlIX8AOaW3vsMr8HKdlMhD5rgWl2H77TLSpos2GA/7YpwF6o+Vx0XitHGpHdgaHw= X-Received: by 2002:aa7:8495:: with SMTP id u21mr5167224pfn.159.1573661229105; Wed, 13 Nov 2019 08:07:09 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::52e X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:121833 Archived-At: Hello, I noticed that a command that uses `set-window-hscroll' doesn't work the same way during an isearch if `isearch-allow-scroll' is non nil and the command has the properties `scroll-command' or `isearch-scroll'. To reproduce, run `emacs -Q' and evaluate -------------------------------------------------------------------------------- ;; 0123456789 ;; Set up the window and enable scrolling during isearch. (set-frame-width nil 80) (setq hscroll-margin 5) (toggle-truncate-lines) (setq isearch-allow-scroll t) (defun h-scroll () (interactive) (set-window-hscroll (selected-window) 10)) (defun h-not-so-scroll () (interactive) (set-window-hscroll (selected-window) 10)) ;; Even if you comment out one of these two settings the behaviour is the same (put 'h-scroll 'scroll-command t) (put 'h-scroll 'isearch-scroll t) (global-set-key (kbd "C-S-l") #'h-scroll) (global-set-key (kbd "C-S-k") #'h-not-so-scroll) -------------------------------------------------------------------------------- Now `h-scroll' (C-S-l) never quits isearch but - when I search for 0 in the first line and type C-S-l nothing happens (`window-hscroll' remains 0); - if I search for 1 <= n <= 5 (columns 74 to 78, within `hscroll-margin' from the right edge), isearch scrolls the window left, C-S-l then brings it back all the way to the right (`window-hscroll' is brought back to 0); - if I search for n >= 6 then type C-S-l, `window-hscroll' is set to 10, as expected. C-S-k always sets `window-hscroll' to 10, but it exits isearch. Outside of isearch both commands always work correctly. What's the reason for this behaviour? Can I change it so that `h-scroll' always sets the `window-hscroll' to 10 without exiting isearch? Thanks, Andrea