Gnus development mailing list
 help / color / mirror / Atom feed
From: michael@cadilhac.name (Michaël Cadilhac)
To: Miles Bader <miles@gnu.org>
Cc: ding@gnus.org
Subject: Re: « How many articles from ? » group width.
Date: Tue, 08 May 2007 15:27:45 +0200	[thread overview]
Message-ID: <87ps5b78dq.fsf@lrde.org> (raw)
In-Reply-To: <87zm6uid3w.fsf@catnip.gol.com> (Miles Bader's message of "Sun\, 04 Mar 2007 00\:02\:59 +0900")


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

Miles Bader <miles@gnu.org> writes:

> michael@cadilhac.name (Michaël Cadilhac) writes:
>> 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.
>
> Why is it necessary to truncate it at all?  Emacs from version 21 on
> will grow the minibuffer as necessary to show the whole prompt.

Right! And why not delete `gnus-limit-string' after that?
`truncate-s-t-width' seems to be in (X)Emacs for quite a long time.


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

Index: lisp/gnus-sum.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-sum.el,v
retrieving revision 7.182
diff -c -r7.182 gnus-sum.el
*** lisp/gnus-sum.el	27 Apr 2007 08:39:17 -0000	7.182
--- lisp/gnus-sum.el	8 May 2007 13:17:41 -0000
***************
*** 5634,5642 ****
  			  (read-string
  			   (format
  			    "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
--- 5634,5640 ----
  			  (read-string
  			   (format
  			    "How many articles from %s (%s %d): "
! 			    (gnus-group-decoded-name gnus-newsgroup-name)
  			    (if initial "max" "default")
  			    number)
  			   (if initial
***************
*** 12245,12252 ****
  		      (read-string
  		       (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
--- 12243,12249 ----
  		      (read-string
  		       (format
  			"How many articles from %s (%s %d): "
! 			(gnus-group-decoded-name gnus-newsgroup-name)
  			(if initial "max" "default")
  			len)
  		       (if initial
Index: lisp/ChangeLog
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/ChangeLog,v
retrieving revision 7.1543
diff -C0 -r7.1543 ChangeLog
*** lisp/ChangeLog	3 May 2007 18:34:28 -0000	7.1543
--- lisp/ChangeLog	8 May 2007 13:17:47 -0000
***************
*** 0 ****
--- 1,6 ----
+ 2007-05-08  Michaël Cadilhac  <michael@cadilhac.name>
+ 
+ 	* gnus-sum.el (gnus-articles-to-read)
+ 	(gnus-summary-insert-old-articles): Don't truncate group name for
+ 	read-string.
+ 

[-- Attachment #1.3: gnus-sum-ts.patch --]
[-- Type: text/x-patch, Size: 2382 bytes --]

Index: lisp/gnus-util.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-util.el,v
retrieving revision 7.62
diff -c -r7.62 gnus-util.el
*** lisp/gnus-util.el	27 Apr 2007 08:39:17 -0000	7.62
--- lisp/gnus-util.el	8 May 2007 13:23:23 -0000
***************
*** 109,123 ****
  	 (set symbol nil))
       symbol))
  
- ;; Added by Geoffrey T. Dairiki <dairiki@u.washington.edu>.  A safe way
- ;; to limit the length of a string.  This function is necessary since
- ;; `(substr "abc" 0 30)' pukes with "Args out of range".
- ;; Fixme: Why not `truncate-string-to-width'?
- (defsubst gnus-limit-string (str width)
-   (if (> (length str) width)
-       (substring str 0 width)
-     str))
- 
  (defsubst gnus-goto-char (point)
    (and point (goto-char point)))
  
--- 109,114 ----
Index: lisp/gnus-sum.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-sum.el,v
retrieving revision 7.182
diff -c -r7.182 gnus-sum.el
*** lisp/gnus-sum.el	27 Apr 2007 08:39:17 -0000	7.182
--- lisp/gnus-sum.el	8 May 2007 13:21:58 -0000
***************
*** 1678,1685 ****
     ((eq gnus-summary-gather-subject-limit 'fuzzy)
      (gnus-simplify-subject-fuzzy subject))
     ((numberp gnus-summary-gather-subject-limit)
!     (gnus-limit-string (gnus-simplify-subject-re subject)
! 		       gnus-summary-gather-subject-limit))
     (t
      subject)))
  
--- 1678,1685 ----
     ((eq gnus-summary-gather-subject-limit 'fuzzy)
      (gnus-simplify-subject-fuzzy subject))
     ((numberp gnus-summary-gather-subject-limit)
!     (truncate-string-to-width (gnus-simplify-subject-re subject)
! 			      gnus-summary-gather-subject-limit))
     (t
      subject)))
  
Index: lisp/ChangeLog
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/ChangeLog,v
retrieving revision 7.1543
diff -C0 -r7.1543 ChangeLog
*** lisp/ChangeLog	3 May 2007 18:34:28 -0000	7.1543
--- lisp/ChangeLog	8 May 2007 13:22:03 -0000
***************
*** 0 ****
--- 1,7 ----
+ 2007-05-08  Michaël Cadilhac  <michael@cadilhac.name>
+ 
+ 	* gnus-util.el (gnus-limit-string): Delete this function.
+ 
+ 	* gnus-sum.el (gnus-simplify-subject-fully): Use
+ 	`truncate-string-to-width' instead.
+ 

[-- Attachment #1.4: Type: text/plain, Size: 327 bytes --]


-- 
 |   Michaël `Micha' Cadilhac       |  (\(\  This is the cute bunny virus,   |
 |   http://michael.cadilhac.name   |  (^.^)  please copy this into your     |
 |   JID/MSN:                       |  (")")  sig so it can spread.          |
 `----  michael.cadilhac@gmail.com  |                                   -  --'

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

  reply	other threads:[~2007-05-08 13:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-03 14:00 Michaël Cadilhac
2007-03-03 15:02 ` Miles Bader
2007-05-08 13:27   ` Michaël Cadilhac [this message]
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=87ps5b78dq.fsf@lrde.org \
    --to=michael@cadilhac.name \
    --cc=ding@gnus.org \
    --cc=miles@gnu.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).