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 14:02:12 -0400 Message-ID: <231BE8C0-C65A-4C87-9EE6-4A3DEA5EA41A@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=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23791"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 18 20:02:56 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 1kUD1E-00067F-Co for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 18 Oct 2020 20:02:56 +0200 Original-Received: from localhost ([::1]:49536 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUD1D-00027X-EW for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 18 Oct 2020 14:02:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44770) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUD0b-00025S-Vy for help-gnu-emacs@gnu.org; Sun, 18 Oct 2020 14:02:18 -0400 Original-Received: from mail-io1-xd32.google.com ([2607:f8b0:4864:20::d32]:33099) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kUD0a-0001Uc-6S; Sun, 18 Oct 2020 14:02:17 -0400 Original-Received: by mail-io1-xd32.google.com with SMTP id r4so10420303ioh.0; Sun, 18 Oct 2020 11:02:15 -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=mVXsfHeF6TzxHfeNn2ckhMynvqMLbEj8o5caxuUTiDk=; b=BBGN+mr0azl9HFmLdSsgEx7SYo5TlEJuHv0dk3e8eEsi/Ofw5utDiFnxxJ1dhy42CM ZvZ7pKz1VBRhLQ/YIUw0qJJFz7IAeYBeGQmaU2biIglhom0Q5vo5PolX9ThmRvAhRu7T eLlmcbcQdxmi/ae1Dll4RSzXDbm0uMIVS429eeMHKPtg5pI7afDwpqH0/a/8NwvyioP2 5ZvcyH+BbmoqghJW/0mn+mIXsRcerZipe1Slr6Xsy6XZbJX3FP0v7LBwtXIKiCW0KRym tvqd+D8IW+Ux95Z78V5cT0Oa7eA6jP/aeMe+KRb5Betb3LJ5lplFyP5CCtnbhE1aV76x iayg== 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=mVXsfHeF6TzxHfeNn2ckhMynvqMLbEj8o5caxuUTiDk=; b=KBm4xJJYh0t1X/iX0QRH5CN12EfDfK5leBS7qxiVAh5fBMqdQ0K70SsvHVLafBHr7w N3tJuB9KzFlMub77bggyxadeTte48121aWGmylcYGWGEETFHt5l/ARPzTrcjaDX6+HZd izCoXE5qkMOWb98eMXaJXmt+6RRU3Vp3sfbUSWJGuAbnkeDan7vTlca6zx44bQjFdfZJ zHQZwDe4SF9oSUz11TJX4AIzpuHSpuuZ95p+LW1eLxyXdfuwlmzqUb9dZ6zUMR19gzKs r3wF+P49GLDVDAyAThZcL2puxY2xU3I8d7ZX/aJSQxHcE+c6klw0+0IOuGFZEpqdpd8A aabw== X-Gm-Message-State: AOAM53214OPI5mTKr5vzk8Oxpv66QzPEgsFjRVkCJeyq/rLl/MFqRDP3 qmzCmag7aA6w7fBmm/RK1CDdzherrmcPo6yp X-Google-Smtp-Source: ABdhPJyEtoduKf8btPpypkSwxjmAEhHLlqIU4YzawIalBouzIyHHRFaVQeju+L3uGXLPR564lhOnqA== X-Received: by 2002:a02:7817:: with SMTP id p23mr8656930jac.57.1603044134430; Sun, 18 Oct 2020 11:02:14 -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 u8sm9368991ilc.59.2020.10.18.11.02.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Oct 2020 11:02:13 -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::d32; envelope-from=casouri@gmail.com; helo=mail-io1-xd32.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:124549 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 You might be right. Currently that (scroll by pixels) only happens if = this tall line is taller than the window, maybe I can modify it so that = it also do that (scroll by pixels) when the first line of the window is = taller than, say 3x normal line height. I=E2=80=99ll dig deeper into = this. Yuan=