From: Edward Reingold <reingold@iit.edu>
To: "Glenn Morris" <rgm@gnu.org>,
"Vincent Belaïche" <vincent.b.1@hotmail.fr>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: cal-tex.el landscape patch
Date: Fri, 25 Aug 2017 18:25:51 +0000 [thread overview]
Message-ID: <CAO_04X6a=zshoZSGyEH8w4fS1EmseV7=R2yKaobUq9yKR3r=eQ@mail.gmail.com> (raw)
In-Reply-To: <AM5PR10MB0676E753153FFD716D334543849B0@AM5PR10MB0676.EURPRD10.PROD.OUTLOOK.COM>
[-- Attachment #1: Type: text/plain, Size: 3208 bytes --]
I would add easy optional use of colors for, say, holidays (red) and/or
diary entries (blue).
Fri, Aug 25, 2017 at 12:59 PM Vincent Belaïche <vincent.b.1@hotmail.fr>
wrote:
> Oops... sorry for my mistake, class-options is not optional in
> cal-tex-insert-preamble. I will make it options as you suggest.
>
>
> Vincent.
> ------------------------------
> *De :* Vincent Belaïche <vincent.b.1@hotmail.fr>
> *Envoyé :* vendredi 25 août 2017 11:07
> *À :* Glenn Morris
> *Cc :* emacs-devel
> *Objet :* RE: cal-tex.el landscape patch
>
>
> Answers below.
>
>
> De : Glenn Morris <rgm@gnu.org>
> Envoyé : vendredi 25 août 2017 03:10
> À : Vincent Belaïche
> Cc : emacs-devel
> Objet : Re: cal-tex.el landscape patch
> >
> >
> >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 "\\<landscape\\>"
> class-options))
> >> + (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)
> >> "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."
>
> 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.
>
> Vincent
>
[-- Attachment #2: Type: text/html, Size: 5934 bytes --]
next prev parent reply other threads:[~2017-08-25 18:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-21 14:19 cal-tex.el landscape patch Vincent Belaïche
2017-08-22 7:04 ` Marcin Borkowski
2017-08-22 22:05 ` Vincent Belaïche
2017-08-25 1:10 ` Glenn Morris
2017-08-25 9:07 ` Vincent Belaïche
2017-08-25 17:58 ` Vincent Belaïche
2017-08-25 18:25 ` Edward Reingold [this message]
2017-08-26 15:06 ` Vincent Belaïche
2017-08-26 15:29 ` Vincent Belaïche
2017-08-28 17:20 ` Paul Eggert
2017-08-28 17:55 ` Glenn Morris
2017-08-30 9:45 ` Vincent Belaïche
2017-09-14 12:46 ` Vincent Belaïche
2017-09-14 20:31 ` Glenn Morris
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='CAO_04X6a=zshoZSGyEH8w4fS1EmseV7=R2yKaobUq9yKR3r=eQ@mail.gmail.com' \
--to=reingold@iit.edu \
--cc=emacs-devel@gnu.org \
--cc=rgm@gnu.org \
--cc=vincent.b.1@hotmail.fr \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.