From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.help Subject: Re: Set-window-vscroll sometimes doesn't work Date: Sun, 18 Oct 2020 15:12:10 -0400 Message-ID: <4F2C1811-940E-4C58-8EE0-37AA3B666E12@gmail.com> References: <72B62847-3F35-412A-9F74-88442A936B19@gmail.com> <83eelvsivm.fsf@gnu.org> <853C8CD1-B58B-4F22-A889-4AB2AEE3DD80@gmail.com> <83imb7qw46.fsf@gnu.org> <66013ADF-731C-4922-8AF7-EAFDBF43C33C@gmail.com> <83ft6bqv0q.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35647"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 18 21:12:51 2020 Return-path: Envelope-to: geh-help-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 1kUE6t-0009Cl-RA for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 18 Oct 2020 21:12:51 +0200 Original-Received: from localhost ([::1]:52028 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUE6s-0003fn-R0 for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 18 Oct 2020 15:12:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55502) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUE6L-0003fH-CK for help-gnu-emacs@gnu.org; Sun, 18 Oct 2020 15:12:17 -0400 Original-Received: from mail-io1-xd2f.google.com ([2607:f8b0:4864:20::d2f]:44936) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kUE6H-0000lb-KU; Sun, 18 Oct 2020 15:12:15 -0400 Original-Received: by mail-io1-xd2f.google.com with SMTP id b8so10421945ioh.11; Sun, 18 Oct 2020 12:12:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=8MmbKCz9NTp1gcCsxxg5LKjoGFaszl+BeXJO8Qe/p1o=; b=VONYLWAz31BHNajeHuiRPDjITZSMOiESZzrSPJap8o8A66bS0/n9phBvom3pVJzYiN DHChAm+uW+EZL2YHPUjP6PaI0r9+LKXdmpnFDiecEwm2CPb6Ejvai+OVEVLv48fboP4G N8ZK7+NOiBNR294ktkioc/03Ut9Z3D+LNT3bCCVpi+v5INkP6qlu9ctZmCS9wQGmAsg4 j1JQGD6YV1uI7whkAsJdjayJ0rUsmhRiPdnYTbyZUr1JDd6PQjQCEKlMXEbh21XB7h/0 cp4i0rPfbFbv6FBnPrLhr/XeqiAfLh6K9FY/LFYvOyNmkaJmfsT5oneilcAMkA875vTj HUCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=8MmbKCz9NTp1gcCsxxg5LKjoGFaszl+BeXJO8Qe/p1o=; b=jWXciFZy37Nn9nmg7KAe0NzkGWQLf/NBibTJS9rtRr4vRKJSV9RqmMeLiEBxE1et3N +IHeCtdxvQp15oQObtojskG/BkZBZgAavG3woRysGfypmDg1Sz8sQ87Y4Gvr95QkdOWe YL9QpjNXKbxpRPDU7XefiiIxbizxOS1MTroDhYN7FjGcFSabuXPiWAQJyedL+GWh/oSf zRCTQgbw8frCxgkg6mj6Ym149FSKOszH5MyOLg1YodkDYMrGx6jcaLPx+xEQmx6MqOhV sSGKPdyKdrJ7WPun0n7dk3vMwRkbPntP3Dne25101ou0akJEXnrro4o0uLeCJFckA7OO S08w== X-Gm-Message-State: AOAM5328OPEQ/2f6mGNiDSH/uxnhTC+ngFuXTrmVqR43MdiMFvEP6BcB lix7HH73bvfdjgTkZ/QgPPOCDkl12VfxMJ1J X-Google-Smtp-Source: ABdhPJxhuGAT2EEPiAlzdvfaheRG9FaKJmvHAHj6X6aFo8gR+zzHtNTR/qPDF3Hq5m6qREA/PAXlvQ== X-Received: by 2002:a05:6602:15cc:: with SMTP id f12mr8455243iow.159.1603048331957; Sun, 18 Oct 2020 12:12:11 -0700 (PDT) Original-Received: from ?IPv6:2601:98a:4200:9210:d02a:1c66:2033:eacb? ([2601:98a:4200:9210:d02a:1c66:2033:eacb]) by smtp.gmail.com with ESMTPSA id u8sm1653903ilm.36.2020.10.18.12.12.11 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Oct 2020 12:12:11 -0700 (PDT) In-Reply-To: <83ft6bqv0q.fsf@gnu.org> X-Mailer: Apple Mail (2.3608.120.23.2.4) Received-SPF: pass client-ip=2607:f8b0:4864:20::d2f; envelope-from=casouri@gmail.com; helo=mail-io1-xd2f.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:124554 Archived-At: > On Oct 18, 2020, at 1:55 PM, Eli Zaretskii wrote: >=20 >> From: Yuan Fu >> Date: Sun, 18 Oct 2020 13:51:14 -0400 >> Cc: help-gnu-emacs@gnu.org >>=20 >>> NOFORCE non-nil means Emacs doesn't have to display the window >>> starting at the position if there are valid reasons, so yes. But my >>> suggestion is not to use set-window-start when you want to vscroll, >>> it's unsafe. You in effect create a conflict for the display = engine, >>> and have no control on how it will resolve that conflict. >>=20 >> Thanks. I see what you mean. What I want to do is to scroll over = images as if it is made of several lines (like sliced images). Which = requires scrolling over logical lines by set-window-start and scrolling = over images by set-window-vscroll. Do you think I would be better off = implementing this in, say, window_scroll_pixel_based rather than in = Lisp? >=20 > It sounds like you want to do what we already have implemented in > next-line and previous-line and their subroutines. Typing C-n on a > tall image scrolls the image the number of pixels that is equal to the > line height. Maybe you can just use that code? >=20 Some questions: 1. Is it true that move_it_by_lines regards an image as one display = line? 2. It seems that when I move focus out of the window, the vscroll = setting is nullified, why is that? Yuan=