From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: michael.cadilhac@lrde.org (=?iso-8859-1?Q?Micha=EBl?= Cadilhac) Newsgroups: gmane.emacs.devel Subject: Proposal for lpr.el pager options. Date: Tue, 05 Sep 2006 16:59:12 +0200 Organization: Epita/LRDE Message-ID: <87veo2gy0v.fsf@lrde.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0054483061==" X-Trace: sea.gmane.org 1157468400 11433 80.91.229.2 (5 Sep 2006 15:00:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 5 Sep 2006 15:00:00 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 05 16:59:55 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GKcOj-0005fx-Uy for ged-emacs-devel@m.gmane.org; Tue, 05 Sep 2006 16:59:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GKcOj-0002eO-QS for ged-emacs-devel@m.gmane.org; Tue, 05 Sep 2006 10:59:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GKcOW-0002de-93 for emacs-devel@gnu.org; Tue, 05 Sep 2006 10:59:20 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GKcOV-0002cE-3C for emacs-devel@gnu.org; Tue, 05 Sep 2006 10:59:19 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GKcOT-0002bR-UR for emacs-devel@gnu.org; Tue, 05 Sep 2006 10:59:18 -0400 Original-Received: from [62.39.139.2] (helo=kualalumpur.lrde.epita.fr) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GKcZE-0001wu-LT for emacs-devel@gnu.org; Tue, 05 Sep 2006 11:10:24 -0400 Original-Received: from mahaena.lrde.epita.fr ([192.168.101.66] helo=mahaena.lrde) by kualalumpur.lrde.epita.fr with esmtp (Exim 4.50) id 1GKcOQ-0006oX-Q6 for emacs-devel@gnu.org; Tue, 05 Sep 2006 16:59:14 +0200 Original-To: emacs-devel@gnu.org Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAElBMVEVWPh+Tai+5r5YKBAEU CQQzGAtiq7gjAAACR0lEQVQ4jW2UzW7lIAyFzVW8BzTZX5DmCZLuU2H2pMXv/ypzbK7aSh2kRCRf /HNsE0q7Sg+RQ7JFKaqtrRNAl5AIIKe6D5DBqgbmUAe5hBI1wIRFAHjeM0RKtZi7XVVEpb0BSNfA IddChChT5DildSLWOWhY5IEItMnncZgFcUAc/5jjwCMsDosRNdfKPDTFEdVBW8C+RebDb4N5Orio RhM1+11IJyx0ng2+LryFHBMPDQDYHrY6IfGuU3ouiXTQNE8LIJDKOWpNxERTFrggQwRPd7USUsTW fJ0XbR3bdj5KgBYy4SACpxDeUYEUAzLmtJ1iIrD2gczPq8Qomjhsh/RjGIgKIO8p7NITjwlx7WID nsnQe5NeuTvoBpi8LX6vLLOh5icjOHqBypgnuSp7M+RE1agbQKHQr5E2z1WObhYW4gMqeGQL7joM jCf2DxSk5ApADSYHfFF4igNfJZL1z0GKP0FN02s4XiDXr7V5P94W6I9v8MfBOQDmfwAaVYt+x8Da v4DJvX8BAdin3Knm5yMZYAO4ABDkDniZLLfi4P40gP1F0TPGZOu0CGwA1lcowxwlGy6A9705mD0V jHCxwVZT/hYdRJVUGZNlx6l7ScQBTluof6Wj6bsPYlvpwoTvXFD9gHPn2TZPF3ntI2ecxVrW5MrV XiCie5EeNa7BlWu/HNSkprDUva163PHxAv5jyGV7gVzyAghSKOTnat85UIYFICXbD2NV9rRiv0BS tKQsg6OHH4A15F1WW+UHKHHa32h6aPnAm3/pUcWp+WYnTQAAAABJRU5ErkJggg== User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) 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:59373 Archived-At: --===============0054483061== Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Hi! I use `a2ps' as a pager [1], but I had to make some changes in `lpr.el' to use it. $ a2ps -h prints ... the help of a2ps, yes. But in `lpr.el', `-h' is used as the option to pass the page title. I propose the following change, but maybe it is better to add a var `lpr-page-header-title-switch' (set by default to `-h', in my case to `--center-title' [2]). --=-=-= Content-Type: text/x-patch; charset=iso-8859-1 Content-Disposition: inline; filename=lpr.patch Content-Transfer-Encoding: quoted-printable Index: lisp/lpr.el =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /sources/emacs/emacs/lisp/lpr.el,v retrieving revision 1.69 diff -c -r1.69 lpr.el *** lisp/lpr.el 6 Feb 2006 14:33:34 -0000 1.69 =2D-- lisp/lpr.el 5 Sep 2006 14:22:01 -0000 *************** *** 140,147 **** =20=20 ;; Berkeley systems support -F, and GNU pr supports both -f and -F, ;; So it looks like -F is a better default. ! (defcustom lpr-page-header-switches '("-F") ! "*List of strings to use as options for the page-header-generating prog= ram. The variable `lpr-page-header-program' specifies the program to use." :type '(repeat string) :group 'lpr) =2D-- 140,148 ---- =20=20 ;; Berkeley systems support -F, and GNU pr supports both -f and -F, ;; So it looks like -F is a better default. ! (defcustom lpr-page-header-switches '("-h %s" "-F") ! "List of strings to use as options for the page-header-generating progr= am. + If `%s' appears in one of the strings, it is substituted by the page titl= e. The variable `lpr-page-header-program' specifies the program to use." :type '(repeat string) :group 'lpr) *************** *** 243,250 **** (let ((new-coords (print-region-new-buffer start end))) (apply 'call-process-region (car new-coords) (cdr new-coords) lpr-page-header-program t t nil ! (nconc (list "-h" title) ! lpr-page-header-switches))) (setq start (point-min) end (point-max)))) (apply (or print-region-function 'call-process-region) =2D-- 244,251 ---- (let ((new-coords (print-region-new-buffer start end))) (apply 'call-process-region (car new-coords) (cdr new-coords) lpr-page-header-program t t nil ! (mapcar (lambda (e) (format e title)) ! lpr-page-header-switches))) (setq start (point-min) end (point-max)))) (apply (or print-region-function 'call-process-region) Index: lisp/ChangeLog =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /sources/emacs/emacs/lisp/ChangeLog,v retrieving revision 1.9966 diff -c -0 -r1.9966 ChangeLog *** lisp/ChangeLog 27 Aug 2006 07:08:19 -0000 1.9966 =2D-- lisp/ChangeLog 5 Sep 2006 14:22:14 -0000 *************** *** 0 **** =2D-- 1,5 ---- + 2006-09-05 Micha=EBl Cadilhac +=20 + * lpr.el (lpr-page-header-switches): Page title switch is one of them. + (print-region-1): Substitute `%s' in every switches by the page title. +=20 --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Footnotes:=20 [1] (setq lpr-page-header-program "a2ps") [2] Oops, I just tested that. a2ps wants `--center-title=3DTITLE' only, and `--center-title TITLE' is not permitted, so this is not a good fix. =2D-=20 | Micha=EBl `Micha' Cadilhac | Mieux vaut se taire = | | Epita/LRDE Promo 2007 | Que de parler trop fort. = | | http://www.lrde.org/~cadilh_m | -- As de tr=E8fle = | `-- - JID: micha@amessage.be --' - -= -' --=-=-=-- --==-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQFE/ZDCZYNf4qobZ7kRAnr/AKC5ej+TtlbH1gB5lVDxQCZi9vRtNACcDaha 3ZJFbl+7r3lAD32KZ7I6vK0= =R7pz -----END PGP SIGNATURE----- --==-=-=-- --===============0054483061== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --===============0054483061==--