From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.devel Subject: Re: Is there any particular reason `scroll-other-window' is written in C and not in ELisp? Date: Tue, 29 Dec 2015 20:41:00 +0100 Message-ID: <87poxp82lv.fsf@mbork.pl> References: <87y4cd8usv.fsf@mbork.pl> <83oad9dyzj.fsf@gnu.org> <87twn188bf.fsf@mbork.pl> <83wprxcdwm.fsf@gnu.org> <87si2l858a.fsf@mbork.pl> <83twn1cc5k.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1451418096 5728 80.91.229.3 (29 Dec 2015 19:41:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Dec 2015 19:41:36 +0000 (UTC) Cc: Emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 29 20:41:30 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aE09A-00018B-6G for ged-emacs-devel@m.gmane.org; Tue, 29 Dec 2015 20:41:28 +0100 Original-Received: from localhost ([::1]:49872 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aE099-0002zE-Na for ged-emacs-devel@m.gmane.org; Tue, 29 Dec 2015 14:41:27 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59086) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aE095-0002yz-SD for Emacs-devel@gnu.org; Tue, 29 Dec 2015 14:41:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aE092-0000aA-Km for Emacs-devel@gnu.org; Tue, 29 Dec 2015 14:41:23 -0500 Original-Received: from mail.mojserwer.eu ([2a01:5e00:2:52::8]:51463) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aE092-0000Zy-DY; Tue, 29 Dec 2015 14:41:20 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id A89768F2017; Tue, 29 Dec 2015 20:41:05 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Original-Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 598mNdlToiWY; Tue, 29 Dec 2015 20:41:01 +0100 (CET) Original-Received: from localhost (unknown [109.232.24.28]) by mail.mojserwer.eu (Postfix) with ESMTPSA id 09AC08F200B; Tue, 29 Dec 2015 20:41:01 +0100 (CET) User-agent: mu4e 0.9.13; emacs 25.0.50.1 In-reply-to: <83twn1cc5k.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2a01:5e00:2:52::8 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:197137 Archived-At: On 2015-12-29, at 20:01, Eli Zaretskii wrote: >> From: Marcin Borkowski >> Cc: Emacs-devel@gnu.org >> Date: Tue, 29 Dec 2015 19:44:21 +0100 >> >> Now that I think of it, I guess rewriting scroll-other-window in Elisp >> wouldn't help a lot - I'd probably still have to advise them, or else >> C-M-v should check what is bound to and in the buffer to >> be scrolled. Does anyone have a better idea how to be able to scroll >> a pdf in other window using C-M-v and C-M-S-v? > > It sounds like there has to be some entirely different command bound > to C-M-v for what you want to happen. The stock scrolling commands > know nothing about the significance of the "next PDF page", so they > cannot possibly do that for you. They just bring more stuff from the > buffer into view. This made me think that it /might/ be a good idea to introduce a (buffer-local) variable (or a pair of variables) which would point to function(s) taking the role of scroll-up/scroll-down in "unusual" buffers. This might make sense with pdfs, but also (possibly) images (and maybe something else, too - I imagine EMMS's buffer /might/ point those to emms-next/emms-previous, for instance). WDYT? -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University