From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Will Monroe Newsgroups: gmane.emacs.help Subject: Re: Advice on troubleshooting function to "unscroll" Date: Sun, 25 Jan 2015 19:17:27 -0600 Message-ID: <54C595A7.9020204@gmail.com> References: <54C5577D.4030700@gmail.com> <871tmih6w0.fsf@wmi.amu.edu.pl> <54C56827.6030802@gmail.com> <54C5748E.4060605@gmail.com> <87ppa2flao.fsf@wmi.amu.edu.pl> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1422235071 11170 80.91.229.3 (26 Jan 2015 01:17:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 26 Jan 2015 01:17:51 +0000 (UTC) To: Marcin Borkowski , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jan 26 02:17:50 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 1YFYJJ-0001TA-Rq for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Jan 2015 02:17:49 +0100 Original-Received: from localhost ([::1]:39533 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFYJJ-0005CG-2F for geh-help-gnu-emacs@m.gmane.org; Sun, 25 Jan 2015 20:17:49 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54566) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFYJ4-0005Ba-20 for help-gnu-emacs@gnu.org; Sun, 25 Jan 2015 20:17:35 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YFYIz-0006Lw-2D for help-gnu-emacs@gnu.org; Sun, 25 Jan 2015 20:17:34 -0500 Original-Received: from mail-ob0-x233.google.com ([2607:f8b0:4003:c01::233]:50634) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFYIy-0006Lq-P8 for help-gnu-emacs@gnu.org; Sun, 25 Jan 2015 20:17:28 -0500 Original-Received: by mail-ob0-f179.google.com with SMTP id vb8so5518030obc.10 for ; Sun, 25 Jan 2015 17:17:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=Fnyckdht25RAgXC/rC/bo97a0i6n7CL7knIq71o5tp0=; b=muRwF0ZcWI9a8K1RHcdZPXJZ65A8Zklty/rZSlCw0SEF4PHMeksqfb/6Xq5bps6BM0 4OOFXBwnmS2tc8y7vMStpcOkGJWOwJwMv8PNagApDlBjA70sUdcw0qZxoqGlVmXO/lmz ZYQs5qwzv2nRKYq4uMLabRlra9qdc49Zd6+fZU+s8Ojwf6IEveYC/K3D1x94KErPmhzn sW0nuFPNF4wRF4ygFq2AAS2VyrgfJhLCoAIIGO64BZjmsJhxtuZAtXKulvwJAm+zpxeT QzBZmsPOta36tdkn6c6Voex9DJyUvSCMfRC9dsjUYhlA1OwME5BTbQENYofhxEMvKJ0U VxYg== X-Received: by 10.60.123.14 with SMTP id lw14mr1358393oeb.31.1422235048292; Sun, 25 Jan 2015 17:17:28 -0800 (PST) Original-Received: from MacBook-Pro.local (ip174-64-8-195.br.br.cox.net. [174.64.8.195]) by mx.google.com with ESMTPSA id u15sm4547532obg.28.2015.01.25.17.17.27 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Jan 2015 17:17:27 -0800 (PST) User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 In-Reply-To: <87ppa2flao.fsf@wmi.amu.edu.pl> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c01::233 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:102272 Archived-At: >>> why did scroll-up-command work where the still useful but not >>> appropriate scroll-up did not? >> >> That was already answered, and I thought that you understood >> the answer. The problem was that the code checked whether the >> current command was `scroll-up', and it of course never would >> be. `scroll-up' is called by `scroll-up-command', but only the >> latter, never the former, is invoked by you interactively, i.e., >> as a command. Variables `this-command' and `last-command' are >> only set to functions when they are invoked as commands. > > I think the OP did understand this, but meant to ask (more or less) "why > weren't the Emacs Devs satisfied with scroll-up, which did work after > all". Actually, you're both correct! Drew, I'll have to go back and look at what "interactive" actually means. 'scroll-up' is advised (and invoked?) in the code below. Not sure if that means that I am also invoking it interactively. I thought being invoked, "as a command", meant that I was invoking it using `M-x scroll-up`. (defadvice scroll-up (before remember-for-unscroll activate compile) "Remember where we started from, for 'unscroll'." (if (not (eq last-command 'scroll-up)) (setq unscroll-point (point) unscroll-window-start (window-start) unscroll-hscroll (window-hscroll)))) Marcin, I also wondering what prompted the addition of scroll-up-command. I think Drew addresses this but I probably need to look at the docstrings for both to grasp it more clearly. >>> And if I'm being honest about why I did not go to Edebug it's because I >>> was anticipating great difficulty reading the backtrace statements. I >>> thought my problem might be compounded by a more general illiteracy in >>> that regard... >> >> The Emacs manual sends you to the Elisp manual, node `Edebug', >> for information about using that debugger. That section of the >> Elisp manual is like a mini-manual about Edebug. >> >> Why it does not send you instead to the Elisp manual node >> `Debugger' (which has title "The Lisp Debugger"), I don't know. >> That node covers the regular debugger (i.e., `debug'). >> >> `debug' is older than `edebug'. Perhaps the person who wrote >> `edebug' decided to send readers of the Emacs manual to learn >> about Edebug. ;-) >> >> (In older versions of Emacs, e.g. Emacs 20, there was no link >> from the Emacs manual to the Elisp manual for either the regular >> Lisp debugger or Edebug, but there were multiple mentions of >> using the former - and only no mention of Edebug, except to say >> that edebug.el was contributed by Daniel LaLiberte.) > > Drew, your answer is (as usual) very helpful and informative. Thank you > for your insights and the bits about Emacs history. > > I think we really need Sacha Chua to do an Emacs Chat with you. I, > personally, would love to learn a bit about your workflow and Emacs > config. (Not that I would necessarily like to copy it: I strongly > disagree with you on the window/frame issue, for instance!) So much helpful detail that, as a solo student of Emacs and elisp, is helpful to me. And as a regular viewer of Sacha Chua's Emacs Chats, I have to agree! Best regards, Will