From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/81832 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: gnus-buffer-configuration and wide screens Date: Tue, 08 May 2012 09:22:35 +0900 Organization: Emacsen advocacy group Message-ID: References: <871umwvauy.fsf@ucl.ac.uk> <87y5p4dxn9.fsf@ucl.ac.uk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1336436591 15362 80.91.229.3 (8 May 2012 00:23:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 8 May 2012 00:23:11 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M30102=ding+2Daccount=gmane.org@lists.math.uh.edu Tue May 08 02:23:09 2012 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SRYCq-0000T9-RX for ding-account@gmane.org; Tue, 08 May 2012 02:23:09 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1SRYCp-0003bT-1n for ding-account@gmane.org; Mon, 07 May 2012 19:23:07 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1SRYCn-0003bM-Do for ding@lists.math.uh.edu; Mon, 07 May 2012 19:23:05 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1SRYCl-0001Qy-SV for ding@lists.math.uh.edu; Mon, 07 May 2012 19:23:05 -0500 Original-Received: from orlando.hostforweb.net ([216.246.45.90]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1SRYCj-0003UH-Ju for ding@gnus.org; Tue, 08 May 2012 02:23:01 +0200 Original-Received: from localhost ([127.0.0.1]:59091) by orlando.hostforweb.net with smtp (Exim 4.77) (envelope-from ) id 1SRYCQ-0000eD-SE for ding@gnus.org; Mon, 07 May 2012 19:22:45 -0500 X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.130006 (=?iso-2022-jp?B?GyRCPz8bKEI=?= Gnus v0.6) Emacs/24.1.50 (i686-pc-cygwin) Cancel-Lock: sha1:bLSRA74QuP6Umg0wgN7e+PD3WbU= X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - orlando.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:81832 Archived-At: Eric Fraga wrote: > Katsumi Yamaoka writes: [...] >>>| Debugger entered--Lisp error: (args-out-of-range 0) >>>| get-char-property(0 invisible) >>>| gnus-summary-show-thread() >>>| gnus-summary-scroll-up(1) >>>| call-interactively(gnus-summary-scroll-up nil nil) >> Many summary commands assume the point to be in a summary buffer. (It is necessary for such commands to work in the summary buffer, for looking up buffer-local variables, text properties, etc.) > Sure but point is allowed to be in the article window and gnus works > just fine with point there although obviously some commands are not > available and/or work differently. Some summary commands, that work even when launched from the article buffer, make sure that themselves are in the summary buffer. `gnus-summary-next-article' is the very case: (defun gnus-summary-next-article (&optional unread subject backward push) [...] ;; Make sure we are in the summary buffer. (unless (eq major-mode 'gnus-summary-mode) (set-buffer gnus-summary-buffer)) Gnus also offers the other way to make summary commands work in the summary buffer certainly. Though such commands are currently `AS' and `C-d' only (cf. `gnus-article-read-summary-keys'). Moreover, this way is not effective to a summary command that runs (gnus-configure-windows 'article), that will overturn the focus to the article buffer if the article window configuration has `point' in the `article' element. For other summary commands causing an error when being invoked from the article buffer, I guess there were no developers customizing the window configuration so as to focus to the article buffer by default. >> So, some of the ones, that run (gnus-configure-windows 'article), >> need to be modified like the following, I think. >> >> (defun gnus-summary-* () >> ... >> (gnus-configure-windows 'article) >> + (gnus-eval-in-buffer-window gnus-summary-buffer >> ...) >> + ) > I didn't understand this at all. Sorry. I meant: --8<---------------cut here---------------start------------->8--- diff -au6 gnus-sum.el~ gnus-sum.el --- gnus-sum.el~ 2012-05-01 22:53:58.705382400 +0000 +++ gnus-sum.el 2012-05-08 00:18:22.105907100 +0000 @@ -7997,22 +7997,24 @@ (defun gnus-summary-scroll-up (lines) "Scroll up (or down) one line current article. Argument LINES specifies lines to be scrolled up (or down if negative). If no article is selected, then the current article will be selected first." (interactive "p") (gnus-configure-windows 'article) + (gnus-eval-in-buffer-window gnus-summary-buffer (gnus-summary-show-thread) (when (eq (gnus-summary-select-article nil nil 'pseudo) 'old) (gnus-eval-in-buffer-window gnus-article-buffer (cond ((> lines 0) (when (gnus-article-next-page lines) (gnus-message 3 "End of message"))) ((< lines 0) (gnus-article-prev-page (- lines)))))) (gnus-summary-recenter) (gnus-summary-position-point)) + ) (defun gnus-summary-scroll-down (lines) "Scroll down (or up) one line current article. Argument LINES specifies lines to be scrolled down (or up if negative). If no article is selected, then the current article will be selected first." (interactive "p") --8<---------------cut here---------------end--------------->8--- This should fix a bug that you first posted. But it's easy to imagine summary commands that should be fixed are not only this. > My question is why cannot point be placed in the article window > automatically using the gnus configuration settings? I can obviously > display the article and then immediately hit "h" to put point in the > article window and gnus works fine when I do so.