From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.help Subject: Re: Advice on troubleshooting function to "unscroll" Date: Sun, 25 Jan 2015 22:45:03 +0100 Message-ID: <871tmih6w0.fsf@wmi.amu.edu.pl> References: <54C5577D.4030700@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1422222332 21690 80.91.229.3 (25 Jan 2015 21:45:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 25 Jan 2015 21:45:32 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jan 25 22:45:32 2015 Return-path: Envelope-to: geh-help-gnu-emacs@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 1YFUzq-00044U-TW for geh-help-gnu-emacs@m.gmane.org; Sun, 25 Jan 2015 22:45:31 +0100 Original-Received: from localhost ([::1]:39026 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFUzq-0007oX-6k for geh-help-gnu-emacs@m.gmane.org; Sun, 25 Jan 2015 16:45:30 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50173) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFUzc-0007oO-GJ for help-gnu-emacs@gnu.org; Sun, 25 Jan 2015 16:45:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YFUzX-0006Vq-Vw for help-gnu-emacs@gnu.org; Sun, 25 Jan 2015 16:45:16 -0500 Original-Received: from msg.wmi.amu.edu.pl ([2001:808:114:2::50]:34266) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFUzX-0006Vc-Ok for help-gnu-emacs@gnu.org; Sun, 25 Jan 2015 16:45:11 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by msg.wmi.amu.edu.pl (Postfix) with ESMTP id 219E64AC58 for ; Sun, 25 Jan 2015 22:45:11 +0100 (CET) Original-Received: from msg.wmi.amu.edu.pl ([127.0.0.1]) by localhost (msg.wmi.amu.edu.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id objhmln9i1A5 for ; Sun, 25 Jan 2015 22:45:11 +0100 (CET) Original-Received: from localhost (117-116.echostar.pl [213.156.117.116]) by msg.wmi.amu.edu.pl (Postfix) with ESMTPSA id D1D514AC52 for ; Sun, 25 Jan 2015 22:45:10 +0100 (CET) In-reply-to: <54C5577D.4030700@gmail.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:808:114:2::50 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:102254 Archived-At: On 2015-01-25, at 21:52, Will Monroe wrote: > The test was just opening a lengthy file, usually an info page or an > existing org-mode file, pressing C-v a few times, and then using M-x > unscroll. In all cases, I found that M-x unscroll would return to the > position just before the last C-v but not to the original position. In > other words, if I pressed C-v two times and then pressed M-x unscroll, > in would only go back one C-v. My intent, and that of the example in > the book, is to return the point the position before any C-v key > sequences were pressed. One more thing: it might be the case that C-v was bound to scroll-up in Glickstein times, but it is bound to scroll-up-command (which see) now. Try to change (eq last-command 'scroll-up) to (eq last-command 'scroll-up-command). (I did not test it, just an idea.) PS. Another nice way to learn Elisp is to study Emacs sources. I'm about 10% into simple.el, learned quite a bit, and as an additional bonus found two or three bugs (I haven't reported them yet, but I'll do it soon). Beware that not everyone would recommend learning good practices or style from some of those sources, though. Hth, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University