From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/67442 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.devel,gmane.emacs.gnus.general Subject: Re: informat.el: `Info-split' split size Date: Thu, 25 Sep 2008 08:58:06 +0900 Organization: Emacsen advocacy group Message-ID: References: <87abfkmuko.fsf@jondo.cante.net> <86bpzlt5cq.fsf@lifelogs.com> <87prnut63f.fsf@catnip.gol.com> <86vdxlfdtn.fsf@lifelogs.com> <87zlmwoyvs.fsf@marauder.physik.uni-ulm.de> <86zlmvkg8p.fsf_-_@lifelogs.com> <86vdwxnmzf.fsf_-_@lifelogs.com> <8763ow9ssf.fsf@freemail.hu> <86iqswnr9w.fsf@lifelogs.com> <86bpykjefp.fsf@lifelogs.com> <87d4iuu0vc.fsf@marauder.physik.uni-ulm.de> <87r679qysj.fsf_-_@marauder.physik.uni-ulm.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1222300728 30818 80.91.229.12 (24 Sep 2008 23:58:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 24 Sep 2008 23:58:48 +0000 (UTC) Cc: ding@gnus.org To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 25 01:59:45 2008 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KieGa-0002JQ-Fo for ged-emacs-devel@m.gmane.org; Thu, 25 Sep 2008 01:59:32 +0200 Original-Received: from localhost ([127.0.0.1]:50676 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KieFY-0005K3-EJ for ged-emacs-devel@m.gmane.org; Wed, 24 Sep 2008 19:58:28 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KieFT-0005Jq-4C for emacs-devel@gnu.org; Wed, 24 Sep 2008 19:58:23 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KieFS-0005Je-83 for emacs-devel@gnu.org; Wed, 24 Sep 2008 19:58:22 -0400 Original-Received: from [199.232.76.173] (port=40237 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KieFS-0005Jb-1j for emacs-devel@gnu.org; Wed, 24 Sep 2008 19:58:22 -0400 Original-Received: from orlando.hostforweb.net ([216.246.45.90]:49656) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KieFR-0004Bi-Hj for emacs-devel@gnu.org; Wed, 24 Sep 2008 19:58:21 -0400 Original-Received: from localhost ([127.0.0.1]:46656) by orlando.hostforweb.net with esmtpa (Exim 4.69) (envelope-from ) id 1KieFL-0004F0-Qw; Wed, 24 Sep 2008 18:58:16 -0500 X-Hashcash: 1:20:080924:emacs-devel@gnu.org::/wIMRKln7D8Pn9Bm:0000000000000000000000000000000000000000008/MU X-Hashcash: 1:20:080924:ding@gnus.org::jJIEnQ7mK8a7tyup:00002MEC 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.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:9LxhP9Spb5cMozO2gbbtcuCrhlY= 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 - gnu.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-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:104127 gmane.emacs.gnus.general:67442 Archived-At: --=-=-= >>>>> Reiner Steib wrote: > On Wed, Sep 24 2008, Katsumi Yamaoka wrote: >> BTW, with MAKEINFO=no the Gnus Info files are divided into 24 >> files (gnus, gnus-1, ..., gnus-23). Those are too small, aren't >> they? The threshold is hard-coded in `Info-split' (informat.el). > ,----[ f Info-split RET ] >| Info-split is an interactive autoloaded Lisp function in `informat'. >| (Info-split) >| >| Split an info file into an indirect file plus bounded-size subfiles. >| Each subfile will be up to 50,000 characters plus one node. [...] > `---- > I think the threshold should not be hard-coded and it's default should > be like makeinfo's so that we don't need such workarounds: >> A workaround I added to the Japanese edition of the Gnus Info is: [...] >> (require 'informat) >> (let* ((fn (symbol-function 'Info-split)) >> (fns (prin1-to-string fn))) >> (when (string-match "\\([\t\n ]+\\)50000\\([\t\n ]+\\)" fns) >> (condition-case nil >> (fset 'Info-split (read (replace-match "\\1200000\\2" nil nil fns))) >> (error >> (fset 'Info-split fn))))) Thank you for following it up. How about the attached patch? While the threshold of makeinfo is 30000, I tried it with some texinfo files and reduced it a bit for `Info-split'. Now the command ``./configure; make MAKEINFO=no info'' performed in the Gnus trunk splits the Gnus Info into six files. (Note that loaddefs.el, i.e. ldefs-boot.el, should be updated if this patch is applied because of autoloading `Info-split-threshold'.) --=-=-= Content-Type: text/x-diff Content-Disposition: inline --- informat.el~ 2008-05-06 07:57:40 +0000 +++ informat.el 2008-09-24 23:54:45 +0000 @@ -153,9 +153,16 @@ ;;;###autoload +(defcustom Info-split-threshold 262144 + "The number of characters by which `Info-split' splits an info file." + :type 'integer + :group 'texinfo) + +;;;###autoload (defun Info-split () "Split an info file into an indirect file plus bounded-size subfiles. -Each subfile will be up to 50,000 characters plus one node. +Each subfile will be up to the number of characters that +`Info-split-threshold' specifies, plus one node. To use this command, first visit a large Info file that has a tag table. The buffer is modified into a (small) indirect info file which @@ -167,7 +174,7 @@ contains just the tag table and a directory of subfiles." (interactive) - (if (< (buffer-size) 70000) + (if (< (buffer-size) (+ 20000 Info-split-threshold)) (error "This is too small to be worth splitting")) (goto-char (point-min)) (search-forward "\^_") @@ -192,7 +199,7 @@ (narrow-to-region (point-min) (point)) (goto-char (point-min)) (while (< (1+ (point)) (point-max)) - (goto-char (min (+ (point) 50000) (point-max))) + (goto-char (min (+ (point) Info-split-threshold) (point-max))) (search-forward "\^_" nil 'move) (setq subfiles (cons (list (+ start chars-deleted) --- textmodes/texinfmt.el~ 2008-07-31 21:47:43 +0000 +++ textmodes/texinfmt.el 2008-09-24 23:54:45 +0000 @@ -166,7 +166,7 @@ (Info-tagify) (if nosplit nil - (if (> (buffer-size) 100000) + (if (> (buffer-size) (+ 50000 Info-split-threshold)) (progn (message (setq lastmessage "Splitting Info file...")) (Info-split)))) --=-=-=--