From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.devel Subject: Re: cal-tex.el landscape patch Date: Thu, 24 Aug 2017 21:10:22 -0400 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1503623434 31153 195.159.176.226 (25 Aug 2017 01:10:34 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 25 Aug 2017 01:10:34 +0000 (UTC) User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) Cc: emacs-devel To: Vincent =?utf-8?Q?Bela=C3=AFche?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 25 03:10:28 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 1dl38l-0007ew-T3 for ged-emacs-devel@m.gmane.org; Fri, 25 Aug 2017 03:10:28 +0200 Original-Received: from localhost ([::1]:51035 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dl38q-0006Zj-V7 for ged-emacs-devel@m.gmane.org; Thu, 24 Aug 2017 21:10:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50348) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dl38k-0006ZS-Kg for emacs-devel@gnu.org; Thu, 24 Aug 2017 21:10:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dl38j-0001a6-No for emacs-devel@gnu.org; Thu, 24 Aug 2017 21:10:26 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49617) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dl38h-0001Vx-78; Thu, 24 Aug 2017 21:10:23 -0400 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1dl38g-0003Mw-QU; Thu, 24 Aug 2017 21:10:22 -0400 X-Spook: Cops Black out Eco terrorism Methamphetamine Domestic X-Ran: [uYL^a}h;L5y ("Vincent \=\?utf-8\?Q\?Bela\=C3\=AFche\=22's\?\= message of "Mon, 21 Aug 2017 14:19:28 +0000") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:217796 Archived-At: Fine by me, thanks. Trivial comments below. > -(defun cal-tex-preamble (&optional args) > +(defun cal-tex-preamble (&optional class-options) > "Insert the LaTeX calendar preamble into `cal-tex-buffer'. > Preamble includes initial definitions for various LaTeX commands. > -Optional string ARGS are included as options for the article document class." > +Optional string CLASS-OPTIONS are included as options for the article document class." > (set-buffer (generate-new-buffer cal-tex-buffer)) > (insert (format "\\documentclass%s{article}\n" > - (if (stringp args) > - (format "[%s]" args) > + (if (stringp class-options) > + (format "[%s]" class-options) > ""))) > + (if (and (stringp class-options) (string-match "\\" class-options)) > + (insert "\\usepackage{geometry}\n")) I'd prefer if the argument did not get renamed. > -(defun cal-tex-insert-preamble (weeks landscape size &optional append) > +(defun cal-tex-insert-preamble (weeks class-options &optional append) > "Initialize the output LaTeX calendar buffer, `cal-tex-buffer'. > Select the output buffer, and insert the preamble for a calendar > -of WEEKS weeks. Insert code for landscape mode if LANDSCAPE is > -non-nil. Use point-size SIZE. Optional argument APPEND, if > -non-nil, means add to end of buffer without erasing current contents." > - (let ((width "18cm") > +of WEEKS weeks. Insert code for landscape mode if CLASS-OPTIONS > +contains landscape option. > +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." Maybe class-options could be optional, and default to "12pt"?