From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Politz Newsgroups: gmane.emacs.devel Subject: Re: Displaying scrollable images in a grid-layout Date: Mon, 13 Apr 2015 21:35:40 +0200 Message-ID: <87bnirzur7.fsf@hochschule-trier.de> References: <87pp785u5a.fsf@hochschule-trier.de> <83r3rocbzr.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1428957109 17157 80.91.229.3 (13 Apr 2015 20:31:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 13 Apr 2015 20:31:49 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 13 22:31:41 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 1Yhl1A-0007JK-Pe for ged-emacs-devel@m.gmane.org; Mon, 13 Apr 2015 22:31:40 +0200 Original-Received: from localhost ([::1]:53339 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yhl1A-0004gu-99 for ged-emacs-devel@m.gmane.org; Mon, 13 Apr 2015 16:31:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49556) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yhkvl-0002Hc-11 for emacs-devel@gnu.org; Mon, 13 Apr 2015 16:26:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yhkvg-0000uN-VX for emacs-devel@gnu.org; Mon, 13 Apr 2015 16:26:04 -0400 Original-Received: from gateway-a.fh-trier.de ([143.93.54.181]:60258) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yhkvg-0000u7-Jr for emacs-devel@gnu.org; Mon, 13 Apr 2015 16:26:00 -0400 X-Virus-Scanned: by Amavisd-new + McAfee uvscan + ClamAV [Rechenzentrum Hochschule Trier] Original-Received: from luca (dslb-088-067-095-051.088.067.pools.vodafone-ip.de [88.67.95.51]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: politza) by gateway-a.fh-trier.de (Postfix) with ESMTPSA id DB5E3178F6B5 for ; Mon, 13 Apr 2015 22:25:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=hochschule-trier.de; s=default; t=1428956750; bh=X4zs9E8uTxoDnnzSqrfFkcbPC1w=; h=Resent-To:Resent-From:Resent-Date:Resent-Message-ID:From:To: Subject:References:Date:In-Reply-To:Message-ID:MIME-Version: Content-Type; b=dEqKGD2F1mrFPGEZr9r2zOoc3bg+nHzHm211z4TuEcq3U74GmL9i7nY6t/n0opKxe FQyESZgRjIx2fSv4JXPn/zhWBG2YOrdhT4W5Pwcnsb5Rc47CbYhaDr9RO5UwT1sI4f VEqAu8IRBvwu+kj2YrFMxlngPMBleyoxIiVdvGEI= Original-Received: from politza by luca with local (Exim 4.80) (envelope-from ) id 1YhkvV-0007nQ-4Q for emacs-devel@gnu.org; Mon, 13 Apr 2015 22:25:49 +0200 Resent-To: emacs-devel@gnu.org Resent-From: Andreas Politz Resent-Date: Mon, 13 Apr 2015 22:25:49 +0200 Resent-Message-ID: <878udvu65u.fsf@hochschule-trier.de> In-Reply-To: <83r3rocbzr.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 13 Apr 2015 17:57:12 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 143.93.54.181 X-Mailman-Approved-At: Mon, 13 Apr 2015 16:30:23 -0400 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:185383 Archived-At: Eli Zaretskii writes: > I cannot try your recipe [...] Try this: (defun show-data-dir-images (&optional ncolumns) (interactive (list 4)) (let* ((files (directory-files (expand-file-name "images" data-directory) no-dot-files)) (column 0)) (with-current-buffer (get-buffer-create "*images*") (erase-buffer) (save-excursion (dolist (f files) (when (and (file-regular-p f) (file-name-extension f) (image-type-available-p (intern (downcase (file-name-extension f))))) (insert-image (create-image f)) (when (= (cl-incf column) ncolumns) (insert ?\n) (setq column 0))))) (setq-local scroll-conservatively 0) (setq-local scroll-step 0) (setq-local scroll-up-aggressively nil) (display-buffer (current-buffer))))) > That being said, I think you are missing the PIXELWISE-P argument of > both window-vscroll and set-window-vscroll. Aren't you? No both versions do nothing with above scroll settings for any argument I've tried (unless the window is smaller than the first displayed image). > If not, please elaborate on what kind of partial scrolling did you > want to see. > doc-view let's you scroll the page, i.e. the image is only partially visible. I want the same behaviour for more than one image in the buffer. Possible display state with 2 images: ................ . . Image 1 . . +.--------------.+ |. .| |. .| Window |. .| |................| |................| |. .| |. .| +.--------------.+ . . . . Image 2 . . ................ But: (set-window-vscroll nil 10) => Nothing happens. (set-window-vscroll nil 99) => Nothing happens. (set-window-vscroll nil 100 t) => Nothing. (setq-local scroll-step 1) (set-window-vscroll nil 10) => Scrolls, but: Redisplay performance (or something else) greatly suffers, i.e. opening e.g. the M-x prompt after I have executed the above 2 commands takes about one second. (I have tested this with emacs-git -Q .) >> But it slows down redisplay considerably, to a point where it >> becomes unusable. > > And there's one more thing that confuses me in this statement: partial > pixel-wise scrolling will always be slow, Not like that. > so I'm not sure what exactly you expected to happen. Probably again > it goes back to the fact that I'm not sure what you were trying to > accomplish, or why. See above. Thanks for your answer. -ap