From unknown Fri Jun 20 07:24:29 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#12160 <12160@debbugs.gnu.org> To: bug#12160 <12160@debbugs.gnu.org> Subject: Status: New function for cal-tex.el Reply-To: bug#12160 <12160@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:24:29 +0000 retitle 12160 New function for cal-tex.el reassign 12160 emacs submitter 12160 Edward Reingold severity 12160 wishlist tag 12160 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 08 14:44:36 2012 Received: (at submit) by debbugs.gnu.org; 8 Aug 2012 18:44:36 +0000 Received: from localhost ([127.0.0.1]:42807 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SzBFE-0005rB-56 for submit@debbugs.gnu.org; Wed, 08 Aug 2012 14:44:36 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42988) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SzBFB-0005r4-QS for submit@debbugs.gnu.org; Wed, 08 Aug 2012 14:44:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SzB7L-0003oZ-2w for submit@debbugs.gnu.org; Wed, 08 Aug 2012 14:36:28 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:58168) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzB7K-0003oT-W4 for submit@debbugs.gnu.org; Wed, 08 Aug 2012 14:36:27 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57380) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzB7J-0003pF-Ku for bug-gnu-emacs@gnu.org; Wed, 08 Aug 2012 14:36:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SzB7H-0003kO-P4 for bug-gnu-emacs@gnu.org; Wed, 08 Aug 2012 14:36:25 -0400 Received: from mail-lb0-f169.google.com ([209.85.217.169]:62472) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzB7H-0003hT-85; Wed, 08 Aug 2012 14:36:23 -0400 Received: by lbon3 with SMTP id n3so689863lbo.0 for ; Wed, 08 Aug 2012 11:36:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:x-google-sender-auth:message-id :subject:to:cc:content-type; bh=uSdEimzHALlZ1lHtNvzcTAfMmI6xuam5+QrHuL36upU=; b=RfD7Ea9O5Sk9qNQGDXc/t9uo7zvO8VMchliiJCuHztnMxlHLsdI1ZrV/Ahj6MtUfaX 9b4tv3dpqozVDgKwyE4sUbBTs0SgfHeNcUv7QCxyqWvqqujjj7ery26xET0AP/H2GSyV qs0yCoDCBQId1ouEScopywvQO+JyKsp4g0p1kI6Y+thc26ewfo6AwgG/2A4cDtBb3Qkh g4MH9oKPAoZOY+VnIn86QGjrjNwZITWJegtT1bedG1+KEG9Ibts3W03FwMRNUu+5J7sq g+/1UnkQ1F8YUUFcRic6HOVYzk/eb59+BAPwauMoONmHSam4R9rPfCa15+Skf1VkQm+s BhPA== Received: by 10.152.144.234 with SMTP id sp10mr18951117lab.51.1344450981836; Wed, 08 Aug 2012 11:36:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.42.105 with HTTP; Wed, 8 Aug 2012 11:36:01 -0700 (PDT) From: Edward Reingold Date: Wed, 8 Aug 2012 13:36:01 -0500 X-Google-Sender-Auth: sphR4QxyFAVRI5_pQWuyAJIZFQQ Message-ID: Subject: New function for cal-tex.el To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-Debbugs-Envelope-To: submit Cc: Glenn Morris X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) (defun cal-tex-cursor-week-at-a-glance (&optional n event) "Week-per-view full page calendar for week indicated by cursor. Optional prefix argument specifies number of weeks. Weeks start on Monday. The calendar shows holiday and diary entries if `cal-tex-holidays' and `cal-tex-diary', respectively, are non-nil. It does not show hours of the day. Optional EVENT indicates a buffer position to use instead of point." (interactive (list (prefix-numeric-value current-prefix-arg) last-nonmenu-event)) (or n (setq n 1)) (let* ((date (calendar-gregorian-from-absolute (calendar-dayname-on-or-before 1 (calendar-absolute-from-gregorian (calendar-cursor-to-date t event))))) (month (calendar-extract-month date)) (year (calendar-extract-year date)) (day (calendar-extract-day date)) (d1 (calendar-absolute-from-gregorian date)) (d2 (+ (* 7 n) d1)) (holidays (if cal-tex-holidays (cal-tex-list-holidays d1 d2))) (diary-list (if cal-tex-diary (cal-tex-list-diary-entries d1 d2)))) (cal-tex-preamble "twoside,12pt") (cal-tex-cmd "\\usepackage{color}") (cal-tex-cmd "\\textwidth 7in") (cal-tex-cmd "\\textheight 10.5in") (cal-tex-cmd "\\oddsidemargin 0in") (cal-tex-cmd "\\evensidemargin 0in") (cal-tex-cmd "\\topmargin 0pt") (cal-tex-cmd "\\headheight -0.875in") (cal-tex-cmd "\\headsep 0.125in") (cal-tex-cmd "\\footskip .125in") (insert "\\def\\righthead#1{\\hfill {\\normalsize \\bf #1}\\\\[-6pt]} \\long\\def\\rightday#1#2#3#4#5{% \\rule{\\textwidth}{0.3pt}\\\\% \\hbox to \\textwidth{% \\vbox to 2.75in{% \\vspace*{2pt}% \\hbox to \\textwidth{\\small #5 \\hfill #1 {\\normalsize \\bf #2}}% \\hbox to \\textwidth{\\vbox {\\raggedleft \\footnotesize \\em \\textcolor{red}{#4}}}% \\hbox to \\textwidth{\\vbox to 0pt {\\noindent \\footnotesize \\textcolor{blue}{#3}}}}}\\\\} \\long\\def\\weekend#1#2#3#4#5{% \\rule{\\textwidth}{0.3pt}\\\\% \\hbox to \\textwidth{% \\vbox to 1.8in{% \\vspace*{2pt}% \\hbox to \\textwidth{\\small #5 \\hfill #1 {\\normalsize \\bf #2}}% \\hbox to \\textwidth{\\vbox {\\raggedleft \\footnotesize \\em \\textcolor{red}{#4}}}% \\hbox to \\textwidth{\\vbox to 0pt {\\noindent \\footnotesize \\textcolor{blue}{#3}}}}}\\\\} \\def\\lefthead#1{\\noindent {\\normalsize \\bf #1}\\hfill\\\\[-6pt]} \\long\\def\\leftday#1#2#3#4#5{% \\rule{\\textwidth}{0.3pt}\\\\% \\hbox to \\textwidth{% \\vbox to 2.75in{% \\vspace*{2pt}% \\hbox to \\textwidth{\\noindent {\\normalsize \\bf #2} \\small #1 \\hfill #5}% \\hbox to \\textwidth{\\vbox {\\noindent \\footnotesize \\em \\textcolor{red}{#4}}}% \\hbox to \\textwidth{\\vbox to 0pt {\\noindent \\footnotesize \\textcolor{blue}{#3}}}}}\\\\} ") (cal-tex-b-document) (cal-tex-cmd "\\pagestyle{empty}\\ ") (cal-tex-newpage) (dotimes (i n) (insert "\\lefthead") (cal-tex-arg (let ((d (cal-tex-incr-date date 2))) (if (= (calendar-extract-month date) (calendar-extract-month d)) (format "%s %s" (cal-tex-month-name (calendar-extract-month date)) (calendar-extract-year date)) (if (= (calendar-extract-year date) (calendar-extract-year d)) (format "%s---%s %s" (cal-tex-month-name (calendar-extract-month date)) (cal-tex-month-name (calendar-extract-month d)) (calendar-extract-year date)) (format "%s %s---%s %s" (cal-tex-month-name (calendar-extract-month date)) (calendar-extract-year date) (cal-tex-month-name (calendar-extract-month d)) (calendar-extract-year d)))))) (insert "%\n") (dotimes (jdummy 3) (insert "\\leftday") (cal-tex-arg (cal-tex-LaTeXify-string (calendar-day-name date))) (cal-tex-arg (number-to-string (calendar-extract-day date))) (cal-tex-arg (cal-tex-latexify-list diary-list date)) (cal-tex-arg (cal-tex-latexify-list holidays date)) (cal-tex-arg (cal-tex-arg (eval cal-tex-daily-string))) (insert "%\n") (setq date (cal-tex-incr-date date))) (insert "\\noindent\\rule{\\textwidth}{0.3pt}\\\\%\n") (cal-tex-nl) (insert (cal-tex-mini-calendar (calendar-extract-month (cal-tex-previous-month date)) (calendar-extract-year (cal-tex-previous-month date)) "lastmonth" "1.1in" "1in")) (insert (cal-tex-mini-calendar (calendar-extract-month date) (calendar-extract-year date) "thismonth" "1.1in" "1in")) (insert (cal-tex-mini-calendar (calendar-extract-month (cal-tex-next-month date)) (calendar-extract-year (cal-tex-next-month date)) "nextmonth" "1.1in" "1in")) (insert "\\hbox to \\textwidth{") (cal-tex-hfill) (insert "\\lastmonth") (cal-tex-hfill) (insert "\\thismonth") (cal-tex-hfill) (insert "\\nextmonth") (cal-tex-hfill) (insert "}") (cal-tex-newpage) (insert "\\righthead") (cal-tex-arg (let ((d (cal-tex-incr-date date 3))) (if (= (calendar-extract-month date) (calendar-extract-month d)) (format "%s %s" (cal-tex-month-name (calendar-extract-month date)) (calendar-extract-year date)) (if (= (calendar-extract-year date) (calendar-extract-year d)) (format "%s---%s %s" (cal-tex-month-name (calendar-extract-month date)) (cal-tex-month-name (calendar-extract-month d)) (calendar-extract-year date)) (format "%s %s---%s %s" (cal-tex-month-name (calendar-extract-month date)) (calendar-extract-year date) (cal-tex-month-name (calendar-extract-month d)) (calendar-extract-year d)))))) (insert "%\n") (dotimes (jdummy 2) (insert "\\rightday") (cal-tex-arg (cal-tex-LaTeXify-string (calendar-day-name date))) (cal-tex-arg (number-to-string (calendar-extract-day date))) (cal-tex-arg (cal-tex-latexify-list diary-list date)) (cal-tex-arg (cal-tex-latexify-list holidays date)) (cal-tex-arg (eval cal-tex-daily-string)) (insert "%\n") (setq date (cal-tex-incr-date date))) (dotimes (jdummy 2) (insert "\\weekend") (cal-tex-arg (cal-tex-LaTeXify-string (calendar-day-name date))) (cal-tex-arg (number-to-string (calendar-extract-day date))) (cal-tex-arg (cal-tex-latexify-list diary-list date)) (cal-tex-arg (cal-tex-latexify-list holidays date)) (cal-tex-arg (eval cal-tex-daily-string)) (insert "%\n") (setq date (cal-tex-incr-date date))) (unless (= i (1- n)) (run-hooks 'cal-tex-week-hook) (cal-tex-newpage))) (cal-tex-end-document) (run-hooks 'cal-tex-hook))) From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 13 10:45:04 2012 Received: (at 12160) by debbugs.gnu.org; 13 Aug 2012 14:45:05 +0000 Received: from localhost ([127.0.0.1]:53631 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0vtA-0006kW-Iz for submit@debbugs.gnu.org; Mon, 13 Aug 2012 10:45:04 -0400 Received: from mail-wi0-f174.google.com ([209.85.212.174]:51001) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0vt7-0006jr-2K for 12160@debbugs.gnu.org; Mon, 13 Aug 2012 10:45:02 -0400 Received: by wibhr14 with SMTP id hr14so2792249wib.15 for <12160@debbugs.gnu.org>; Mon, 13 Aug 2012 07:36:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=sender:from:to:cc:subject:in-reply-to:organization:references :user-agent:date:message-id:mime-version:content-type; bh=QMbBorsDoMKx206JYSPEKHfPgCoWtoom7YWeIout3dE=; b=o/OcC4oj5oGMm4bfYqs+9meseGw9wReI5SpywiGUejov2+ImXw5PhqOg8FLBsahqLc GxZL+JaH7QFWmI238yAcxxDxwY8w2FxSeoHpgpbs9Oq4r6b4Yk/CEayhUO7D1veVK3Rq P/brF2TzdJMiLeWTfTBFGvjf6tU4ZST0mpEKqm1mkvimI9jQHwsnPpFt5Rygql34hoPP q1rAb7BKkiAnt+EBHhZZyUkRGYJTFQhl/pmVSffS/Gw/xefZLT02wvANyxwlmK4Mqk+H 5pAfUPxOAmMwl9njapMeJIb6ythmPnhELo/JRZv1aO4FMFFxDEowJDc+JKaQxzCrvu5z RB6Q== Received: by 10.180.98.200 with SMTP id ek8mr19060858wib.0.1344868587823; Mon, 13 Aug 2012 07:36:27 -0700 (PDT) Received: from myhost.localdomain (mar75-2-81-56-68-112.fbx.proxad.net. [81.56.68.112]) by mx.google.com with ESMTPS id dc3sm16728682wib.7.2012.08.13.07.36.25 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 13 Aug 2012 07:36:27 -0700 (PDT) Received: by myhost.localdomain (Postfix, from userid 1000) id CDBBD8832; Mon, 13 Aug 2012 16:36:52 +0200 (CEST) From: Bastien To: Edward Reingold Subject: Re: bug#12160: New function for cal-tex.el In-Reply-To: (Edward Reingold's message of "Wed, 8 Aug 2012 13:36:01 -0500") Organization: GNU References: User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1.50 (gnu/linux) Date: Mon, 13 Aug 2012 16:36:52 +0200 Message-ID: <87ehnayi2j.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 12160 Cc: 12160@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Hi Edward, Edward Reingold writes: > (defun cal-tex-cursor-week-at-a-glance (&optional n event) I tried this command and it works fine, except that I have to remove the first occurrence of \newpage to get rid of a leading blank page. Maybe this \newpage is needed for some reason? Are you submitting this here for inclusion in calendar/? Thanks! -- Bastien From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 20 03:24:35 2012 Received: (at 12160-done) by debbugs.gnu.org; 20 Aug 2012 07:24:35 +0000 Received: from localhost ([127.0.0.1]:39317 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T3MLj-00084k-AE for submit@debbugs.gnu.org; Mon, 20 Aug 2012 03:24:35 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:60046) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T3MLi-00084e-Bg for 12160-done@debbugs.gnu.org; Mon, 20 Aug 2012 03:24:34 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1T3MLU-0007ty-DJ; Mon, 20 Aug 2012 03:24:20 -0400 From: Glenn Morris To: 12160-done@debbugs.gnu.org Subject: Re: bug#12160: New function for cal-tex.el References: X-Spook: FSF quarter ammunition Craig Livingstone benelux NASA X-Ran: s7>obx5T%:"zqcAk(hlzJV5GJKWF[N"2=OSZ?\ (Edward Reingold's message of "Wed, 8 Aug 2012 13:36:01 -0500") Message-ID: <2gsjbi10wr.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 12160-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Version: 24.3 Applied to Emacs trunk, currently expected to appear as 24.3. From unknown Fri Jun 20 07:24:29 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 17 Sep 2012 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator