Gnus development mailing list
 help / color / mirror / Atom feed
From: michael@cadilhac.name (Michaël Cadilhac)
To: ding@gnus.org
Subject: « How many articles from ? » group width.
Date: Sat, 03 Mar 2007 15:00:11 +0100	[thread overview]
Message-ID: <87bqjav34k.fsf@lrde.org> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 420 bytes --]

Hi!

There's  a little thing  that annoys  me from  time to  time :  I have
(quite) long group names, and when  the « How many articles » question
is  asked, the name  is truncated  to 35  chars, and  I don't  see the
entire group  name. It's no big deal  in normal use, it's  only a pain
when getting to the next group with `n n' while being in another group.

Well, what about the following to « fix » this :

[-- Attachment #1.2: gnus-sum.patch --]
[-- Type: text/x-patch, Size: 2796 bytes --]

Index: lisp/gnus-sum.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-sum.el,v
retrieving revision 7.179
diff -c -r7.179 gnus-sum.el
*** lisp/gnus-sum.el	24 Jan 2007 07:15:37 -0000	7.179
--- lisp/gnus-sum.el	3 Mar 2007 12:49:46 -0000
***************
*** 5630,5636 ****
  			    "How many articles from %s (%s %d): "
  			    (gnus-limit-string
  			     (gnus-group-decoded-name gnus-newsgroup-name)
! 			     35)
  			    (if initial "max" "default")
  			    number)
  			   (if initial
--- 5630,5638 ----
  			    "How many articles from %s (%s %d): "
  			    (gnus-limit-string
  			     (gnus-group-decoded-name gnus-newsgroup-name)
! 			     ;; Approximate a good length according to
! 			     ;; minibuffer width.
! 			     (max (- (window-width (minibuffer-window)) 44) 35))
  			    (if initial "max" "default")
  			    number)
  			   (if initial
***************
*** 8144,8150 ****
  	(message "No messages matched")
        (gnus-summary-limit articles))
      (gnus-summary-position-point)))
! 	  
  (defun gnus-summary-limit-to-replied (&optional unreplied)
    "Limit the summary buffer to replied articles.
  If UNREPLIED (the prefix), limit to unreplied articles."
--- 8146,8152 ----
  	(message "No messages matched")
        (gnus-summary-limit articles))
      (gnus-summary-position-point)))
! 
  (defun gnus-summary-limit-to-replied (&optional unreplied)
    "Limit the summary buffer to replied articles.
  If UNREPLIED (the prefix), limit to unreplied articles."
***************
*** 12240,12246 ****
  		       (format
  			"How many articles from %s (%s %d): "
  			(gnus-limit-string
! 			 (gnus-group-decoded-name gnus-newsgroup-name) 35)
  			(if initial "max" "default")
  			len)
  		       (if initial
--- 12242,12251 ----
  		       (format
  			"How many articles from %s (%s %d): "
  			(gnus-limit-string
! 			 (gnus-group-decoded-name gnus-newsgroup-name)
! 			 ;; Approximate a good length according to
! 			 ;; minibuffer width.
! 			 (max (- (window-width (minibuffer-window)) 44) 35))
  			(if initial "max" "default")
  			len)
  		       (if initial
Index: lisp/ChangeLog
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/ChangeLog,v
retrieving revision 7.1501
diff -C0 -r7.1501 ChangeLog
*** lisp/ChangeLog	1 Mar 2007 23:43:33 -0000	7.1501
--- lisp/ChangeLog	3 Mar 2007 12:49:52 -0000
***************
*** 0 ****
--- 1,6 ----
+ 2007-03-03  Michaël Cadilhac  <michael.cadilhac@lrde.org>
+ 
+ 	* gnus-sum.el (gnus-articles-to-read): Limit the group name to a larger
+ 	width if the minibuffer allows it.
+ 	(gnus-summary-insert-old-articles): Ditto.
+ 

[-- Attachment #1.3: Type: text/plain, Size: 462 bytes --]


44 is len ("How many articles from " + " " + " (" + " " + "): ") + len
("default") + 7 (for the number and user input)

TIA!

-- 
 |      Michaël `Micha' Cadilhac     |    This .sig has been generated        |
 |         Epita/LRDE Promo 2007     |         by Outlook Express 98          |
 |  http://michael.cadilhac.name     |    and triple-checked on               |
 `--JID: michael.cadilhac@gmail.com--'         Windows Mail Vista.       -  --'

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

             reply	other threads:[~2007-03-03 14:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-03 14:00 Michaël Cadilhac [this message]
2007-03-03 15:02 ` Miles Bader
2007-05-08 13:27   ` Michaël Cadilhac
2007-05-09 23:41     ` Michaël Cadilhac
2007-05-12 15:11       ` Michaël Cadilhac

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bqjav34k.fsf@lrde.org \
    --to=michael@cadilhac.name \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).