From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?iso-8859-1?Q?Vincent_Bela=EFche?= Newsgroups: gmane.emacs.devel Subject: RE: cal-tex.el landscape patch Date: Fri, 25 Aug 2017 09:07:44 +0000 Message-ID: References: , NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1503652119 17719 195.159.176.226 (25 Aug 2017 09:08:39 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 25 Aug 2017 09:08:39 +0000 (UTC) Cc: emacs-devel To: Glenn Morris Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 25 11:08:33 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dlAbI-0003xE-5y for ged-emacs-devel@m.gmane.org; Fri, 25 Aug 2017 11:08:24 +0200 Original-Received: from localhost ([::1]:52185 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dlAbO-0007CR-Sf for ged-emacs-devel@m.gmane.org; Fri, 25 Aug 2017 05:08:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36837) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dlAal-0007At-Je for emacs-devel@gnu.org; Fri, 25 Aug 2017 05:07:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dlAai-0003iT-Ek for emacs-devel@gnu.org; Fri, 25 Aug 2017 05:07:51 -0400 Original-Received: from mail-oln040092071038.outbound.protection.outlook.com ([40.92.71.38]:21903 helo=EUR03-DB5-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dlAah-0003h1-1T; Fri, 25 Aug 2017 05:07:48 -0400 Original-Received: from VE1EUR03FT011.eop-EUR03.prod.protection.outlook.com (10.152.18.56) by VE1EUR03HT215.eop-EUR03.prod.protection.outlook.com (10.152.19.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1341.15; Fri, 25 Aug 2017 09:07:44 +0000 Original-Received: from AM5PR10MB0676.EURPRD10.PROD.OUTLOOK.COM (10.152.18.53) by VE1EUR03FT011.mail.protection.outlook.com (10.152.18.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1341.15 via Frontend Transport; Fri, 25 Aug 2017 09:07:44 +0000 Original-Received: from AM5PR10MB0676.EURPRD10.PROD.OUTLOOK.COM ([fe80::7809:87f5:3097:fd25]) by AM5PR10MB0676.EURPRD10.PROD.OUTLOOK.COM ([fe80::7809:87f5:3097:fd25%13]) with mapi id 15.01.1385.010; Fri, 25 Aug 2017 09:07:44 +0000 Thread-Topic: cal-tex.el landscape patch Thread-Index: AQHTGod4AUzM6bbSVkywIfPXHbKr+KKUSM/QgACExcU= In-Reply-To: Accept-Language: fr-FR, en-US Content-Language: fr-FR X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:38EDE9060EE153EA56F0617CEBC12CB13329383EE4F14307C125C20FE55B5BE9; UpperCasedChecksum:377D0DE4ACCFDA83B7960A15E5C59790D36BF452F91857E378A86681A066A07A; SizeAsReceived:7080; Count:47 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [Y9q/QtG+GAnjCrLO29VuBjMO2PKNUPZ2] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VE1EUR03HT215; 6:cxbbqozQ8Sah18eUOyJgyYZACjh4tlXoJZDDgMhdkcVhYICb5HxdMVaYyQZ0qYbxtGtEQmujxsMbpGcanHWzVFMa0h+omFDfRyYO/QA4N3I9RMqbrA+gEzyU1syf8WtyJyK/W1MhPqngXQoTIFE/OqAXRP4FiRVnsdkOkWJqsbyHDhFcP95K/PHAskclpT2bdtHdU+hcjftiZ4+xQf20hsO0tB87AGPzQJI7XTasVMnMgbjnyu0ZmI2y6xxNvKWpIarY5AcF7lZDFO3JvVNK/fptRqzC9orwmBLUxglokGYNC4N8grBOK4GGpHC6iZgB++uupwqAkt0LV96QcmFUvg==; 5:k9P/9+e1nMEiGLuEvc0Sw6zekm5PcntIo1OwRze/UbhR2KD6uJX+wR+qboYfVnp52RJ07vWQnVEo3X7w7t6GbXi1z95LtBDVKUdsqe/KxpsFYuJDFFUXbnUmAlv1BOBNyuLl5uIQknLxN3aVjb8TBA==; 24:Ux9ho5RsS1oCx7xtBUfzMT7HJ2QHefEyVO1AMgmVzLxD399jgcyrwmHGlu9oez8gKTzh+iX1D8VdisxFOlbzxMXbuvkoQ28mBP5UjzhXXKM=; 7:IhMzjQmaTjjp6Fkh4VrsWFtVtqM0jeibwiEiTBzFtVywMMkTe8YOTjYd8aphTt/pYhDJYlFwL1kT0uL2c7wciejKLHs5f0qCHSob9yTX8/7eK7NYu/xDV7vI5gXKUOBNw2EQfxDXFcTAyXeBr2oPSwAlKpbSlv7/AMhS+Ckz2SHf5hobhwMk18Pek6/Gh1hRHQLOpkVfhuUo9ewaqBVBb7TS7++L4akIx x-incomingheadercount: 47 x-eopattributedmessage: 0 x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(7070007)(98901004); DIR:OUT; SFP:1901; SCL:1; SRVR:VE1EUR03HT215; H:AM5PR10MB0676.EURPRD10.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; x-ms-office365-filtering-correlation-id: 0a54cfec-2886-48d4-9ab1-08d4eb98bf8f x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(201702061074)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322404)(1603101448)(1601125374)(1701031045)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:VE1EUR03HT215; x-ms-traffictypediagnostic: VE1EUR03HT215: x-exchange-antispam-report-test: UriScan:(22074186197030); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(444000031); SRVR:VE1EUR03HT215; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:VE1EUR03HT215; x-forefront-prvs: 041032FF37 spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Aug 2017 09:07:44.6560 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1EUR03HT215 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.92.71.38 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:217808 Archived-At: Answers below. De : Glenn Morris Envoy=E9 : vendredi 25 ao=FBt 2017 03:10 =C0 : Vincent Bela=EFche Cc : emacs-devel Objet : Re: cal-tex.el landscape patch >=20 > >Fine by me, thanks. Trivial comments below. > >> -(defun cal-tex-preamble (&optional args) >> +(defun cal-tex-preamble (&optional class-options) >>=A0=A0=A0 "Insert the LaTeX calendar preamble into `cal-tex-buffer'. >>=A0 Preamble includes initial definitions for various LaTeX commands. >> -Optional string ARGS are included as options for the article document c= lass." >> +Optional string CLASS-OPTIONS are included as options for the article d= ocument class." >>=A0=A0=A0 (set-buffer (generate-new-buffer cal-tex-buffer)) >>=A0=A0=A0 (insert (format "\\documentclass%s{article}\n" >> -=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (if (stringp args) >> -=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (format= "[%s]" args) >> +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (if (stringp class-= options) >> +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (format= "[%s]" class-options) >>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ""))) >> +=A0 (if (and (stringp class-options) (string-match "\\" cl= ass-options)) >> +=A0=A0=A0=A0=A0 (insert "\\usepackage{geometry}\n")) > > >I'd prefer if the argument did not get renamed. No problem, I will revert the prior name. > > >> -(defun cal-tex-insert-preamble (weeks landscape size &optional append) >> +(defun cal-tex-insert-preamble (weeks class-options &optional append) >>=A0=A0=A0 "Initialize the output LaTeX calendar buffer, `cal-tex-buffer'. >>=A0 Select the output buffer, and insert the preamble for a calendar >> -of WEEKS weeks.=A0 Insert code for landscape mode if LANDSCAPE is >> -non-nil.=A0 Use point-size SIZE.=A0 Optional argument APPEND, if >> -non-nil, means add to end of buffer without erasing current contents." >> -=A0 (let ((width "18cm") >> +of WEEKS weeks.=A0 Insert code for landscape mode if CLASS-OPTIONS >> +contains landscape option.=20 >> +Optional argument APPEND, if non-nil, means add to end of buffer >> +without erasing current contents." > >"Insert code for landscape mode if CLASS-OPTIONS contains landscape >option." seems a bit vague to me. Maybe something like > >"Pass string CLASS-OPTIONS as options for the article document class. >If it contains \"landscape\", use the geometry package to produce >landscape format." You are fully right, your proposed docstring is quite more clear. I will take it. > >Maybe class-options could be optional, and default to "12pt"? > It is already optional, I will make it default to "12pt", that is a good idea. =A0 Vincent=