I am keeping notes in a single file about several topics.  I can
   isolate headlines about these topics/products, by an agenda occur
   search: C-a a / <key phrase> .   I have made a template to print a
   memo about these products, but it seems I must copy the headlines
   by hand to a register or file, then massage them into shape.

   I would like to do something like export a PDF of all
   entries/subtrees within the region that have the product's key
   phrase in the heading.   Is it possible to selectively export only
   the subtrees identified by the Occur agenda search, automagically?
   Since my notes start with an inactive time stamp, I would like to
   strip these out as well.  I think I can easily write an elisp
   function to do this, but perhaps org-mode already has such
   capabilities built in, a regexp for an inactive time stamp.

   Perhaps I'll spend some time over Christmas break on this.  It's
   nice to easily make a memo, but it would be a big help to make it
   less laborious.

    In case there is interest, here are the template and the fragments
   for the head and tail of the memo.

   Remember template:
         ("Memo"       ?Z "%[~/org/MEMO/Top.2.memo]  %?    \n %i  %&
%[~/org/MEMO/Bot.memo]"
                       "~/or/MEMO/Memo.tex" top)

   The required files Top.2.memo and Bot.memo are attached.  Top.2.memo can
be edited with any hard wired recipient and from lines.  The class file,
also included, is edited to change the header on the memo.  All three must
be in the directory ~/org/MEMO.      I am using the sloppy approach of
running LaTeX on the long Memo.tex file to which the current memo has been
pre-pended.  Only the topmost memo is printed.

This approach works but it is currently a kluge, unpolished. The
enhancements I have requested would make it possible to instantly fire off a
memo about a specific product.
  *

*

    Alan Davis
%% 
%% This is file `memo.cls',
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
\NeedsTeXFormat{LaTeX2e}[1996/06/01]
\ProvidesClass{memo}
              [1999/02/09 v1.2z
               Standard LaTeX document class]
\typeout{Document Class `memo' by Ray Seyfarth based on letter style, 9/2000. }
\typeout{  }

\newcomma...@ptsize{}
\DeclareOption{a4paper}
   {\setlength\paperheight {297mm}%
    \setlength\paperwidth  {210mm}}
\DeclareOption{a5paper}
   {\setlength\paperheight {210mm}%
    \setlength\paperwidth  {148mm}}
\DeclareOption{b5paper}
   {\setlength\paperheight {250mm}%
    \setlength\paperwidth  {176mm}}
\DeclareOption{letterpaper}
   {\setlength\paperheight {11in}%
    \setlength\paperwidth  {8.5in}}
\DeclareOption{legalpaper}
   {\setlength\paperheight {14in}%
    \setlength\paperwidth  {8.5in}}
\DeclareOption{executivepaper}
   {\setlength\paperheight {10.5in}%
    \setlength\paperwidth  {7.25in}}
\DeclareOption{landscape}
   {\setleng...@tempdima   {\paperheight}%
    \setlength\paperheight {\paperwidth}%
    \setlength\paperwidth  {...@tempdima}}
\declareoption{10pt}{\renewcomma...@ptsize{0}}
\declareoption{11pt}{\renewcomma...@ptsize{1}}
\declareoption{12pt}{\renewcomma...@ptsize{2}}
\...@compatibility
  \declareoption{twoside...@latexerr{no `twoside' layout for memo}%
                                   \...@eha}
\else
  \declareoption{twoside...@twosidetrue  \...@mparswitchtrue}
\fi
\declareoption{oneside...@twosidefalse \...@mparswitchfalse}
\DeclareOption{draft}{\setlength\overfullrule{5pt}}
\DeclareOption{final}{\setlength\overfullrule{0pt}}
\DeclareOption{leqno}{\input{leqno.clo}}
\DeclareOption{fleqn}{\input{fleqn.clo}}
\ExecuteOptions{letterpaper,10pt,oneside,onecolumn,final}
\ProcessOptions
\input{siz...@ptsize.clo}
\setlength\lineskip{...@}
\setlength\normallineskip{...@}
\renewcommand\baselinestretch{}
\setlength\parskip{0.7em}
\setlength\parindent{...@}
\...@lowpenalty   51
\...@medpenalty  151
\...@highpenalty 301
\setlength\headheight{1...@}
\setlength\headsep   {4...@}
\setlength\footskip{2...@}
\...@compatibility
  \setlength\textwidth{36...@}
  \setlength\textheight{50...@}
\fi
\...@compatibility
  \setlength\oddsidemargin{53pt}
  \setlength\evensidemargin{53pt}
  \setlength\marginparwidth{90pt}
\else
  \setleng...@tempdima{\paperwidth}
  \addtoleng...@tempdima{-2in}
  \addtoleng...@tempdima{-\textwidth}
  \setlength\oddsidemargin   {...@tempdima}
  \setlength\evensidemargin  {\oddsidemargin}
  \setlength\marginparwidth  {9...@}
\fi
\setlength\marginparsep {1...@}
\setlength\marginparpush{...@}
\setlength\topmargin{27pt}
\setlength\footnotesep{1...@}
\setlength{\skip\footins}{10\p@ \...@plus 2\p@ \...@minus 4...@}
\...@twoside
  \def...@headings{%
      \l...@oddfoot\@empty\l...@evenfoot\@empty
      \d...@oddhead{\slshape\headtoname{} \ignorespaces\toname
                    \hfil \...@date
                    \hfil \pagename{} \thepage}%
      \l...@evenhead\@oddhead}
\else
  \def...@headings{%
      \l...@oddfoot\@empty
      \d...@oddhead{\slshape\headtoname{} \ignorespaces\toname
                    \hfil \...@date
                    \hfil \pagename{} \thepage}}
\fi
\def...@empty{%
      \l...@oddfoot\@empty\l...@oddhead\@empty
      \l...@evenfoot\@empty\l...@evenhead\@empty}
\def...@firstpage{%
     \l...@oddhead\@empty
     \d...@oddfoot{\raisebox{-45\p@}...@]{%
        \...@xt@\textwidth{\hspace*{10...@}%
          \ifcase \...@ptsize\relax
             \normalsize
          \or
             \small
          \or
             \footnotesize
          \fi
        \fromlocation \hfill \telephonenum}}\hss}}
\def...@plain{%
      \l...@oddhead\@empty
      \d...@oddfoot{\normalfont\hfil\thepage\hfil}%
      \d...@evenfoot{\normalfont\hfil\thepage\hfil}}
\newcommand*{\name}[1]{\def\fromname{#1}}
\newcommand*{\signature}[1]{\def\fromsig{#1}}
\newcommand*{\address}[1]{\def\fromaddress{#1}}
\newcommand*{\location}[1]{\def\fromlocation{#1}}
\newcommand*{\telephone}[1]{\def\telephonenum{#1}}
\name{}
\signature{}
\address{}
\location{}
\telephone{}
\newcommand*{\makelabels}{%
  \AtBeginDocument{%
     \l...@startlabels\startlabels
     \l...@mlabel\mlabel
     \...@filesw
       \immediate\wri...@mainaux{\string\@startlabels}\fi}%
  \AtEndDocument{%
     \...@filesw\immediate\write\@mainaux{\string\clearpage}\fi}}
\...@onlypreamble\makelabels
\newenvironment{memo}
  {%\newpage
  \rule{\textwidth}{.2pt}
    \...@twoside \ifod...@page
                \else\thispagestyle{empty}\null\newpage\fi
    \fi
    \...@page\@ne
    \...@footnote\@ne
    \interlinepenalty=200 % smaller than the TeXbook value
    %...@processto{\leavevmode\ignorespaces #1}
    \vspace{.05in}}
  {\vfill \stopletter\@@par\pagebreak\@@par
    %...@filesw
      %\begingroup
        %\let\\=\relax
        %\let\prote...@unexpandable@protect
        %\immediate\wri...@auxout{%
          %\stri...@mlabel{\returnaddress}{\toname\\\toaddress}}%
      %\endgroup
    %\fi}
    }
\long\d...@processto#1{%
  \...@xproc #1\\@@@%
  \ifx\toaddre...@empty
  \else
    \...@yproc #1@@@%
  \fi}
\long\d...@xproc #1\\#2@@@{\def\toname{#1}\def\toaddress{#2}}
\long\d...@yproc #1\\#2@@@{\def\toaddress{#2}}
\newcommand*{\stopbreaks}{%
  \interlinepenal...@m
  \def\par{\@@par\nobreak}%
  \let...@nobreakcr
  \let\vspa...@nobreakvspace}
\declarerobustcomma...@nobreakvspace
   {...@ifstar\@nobreakvspac...@nobreakvspacex}
\d...@nobreakvspacex#1{%
  \ifvmode
    \nobreak\vskip #1\relax
  \else
    \...@bsphack\vadjust{\nobreak\vskip #...@esphack
  \fi}
\d...@nobreakcr{\@ifsta...@normalcr*}{\@normalcr*}}
\newcommand*{\startbreaks}{%
  \let...@normalcr
  \interlinepenalty 200%
  \def\par{\@@par\penalty 200\relax}}
\newdimen\longindentation
\longindentation=.5\textwidth
\newdimen\indentedwidth
\indentedwidth=\textwidth
\advance\indentedwidth -\longindentation
\newcommand*{\opening}[1]{\i...@empty\fromaddress
  \thispagestyle{firstpage}%
    {\raggedle...@date\par}%
  \else  % home address
    \thispagestyle{empty}%
    {\raggedleft\begin{tabular...@{}}\ignorespaces
      \fromaddress \\*[2\parskip]%
      \...@date \end{tabular}\par}%
  \fi
  \vspace{2\parskip}%
  {\raggedright \toname \\ \toaddress \par}%
  \vspace{2\parskip}%
  #1\par\nobreak}
\newcommand{\closing}[1]{\par\nobreak\vspace{\parskip}%
  \stopbreaks
  \noindent
  \i...@empty\fromaddress\else
  \hspace*{\longindentation}\fi
  \parbox{\indentedwidth}{\raggedright
       \ignorespaces #1\\[6\medskipamount]%
       \i...@empty\fromsig
           \fromname
       \else \fromsig \fi\strut}%
   \par}
\medskipamount=\parskip
\newcommand*{\CC}[1]{%
    \Ccname: 
    \begin{tabular}[t...@{\qquad\qquad}l}
    #1
    \end{tabular}}
\newcommand*{\Cc}[1]{%
  \par\noindent
  \parbox[t]{\textwidth}{%
    \...@hangfrom{\normalfont\ccname: }%
    \ignorespaces #1\strut}\par}
\newcommand*{\Date}[1]{%
  \par\noindent
  \parbox[t]{\textwidth}{%
    \...@hangfrom{\normalfont\datename: }%
    \ignorespaces #1\strut}\par}
\newcommand*{\To}[1]{%
  \par\noindent
  \parbox[t]{\textwidth}{%
    \...@hangfrom{\normalfont\toname: }%
    \ignorespaces #1\strut}\par}
\newcommand*{\From}[1]{%
  \par\noindent
  \parbox[t]{\textwidth}{%
    \...@hangfrom{\normalfont\fromname: }%
    \ignorespaces #1\strut}\par}
\newcommand*{\USM}{
\vspace{-1.2cm}
\begin{center}
\thispagestyle{empty}
{\bf \large
\noindent
{\sf \Large\textsc{Huge Bureaucracy // Products Section}} \vspace{1pt}

\noindent
{\sf \large\textsc{Correspondence}}}\\
\end{center}

%\rule{16.0cm}{1pt}

\vspace{1.0cm}
}
\newcommand*{\Subject}[1]{%
  \par\noindent
  \parbox[t]{\textwidth}{%
    \...@hangfrom{\normalfont\subjectname: }%
    \ignorespaces #1\strut}\par}
\newcommand*{\encl}[1]{%
  \par\noindent
  \parbox[t]{\textwidth}{%
    \...@hangfrom{\normalfont\enclname: }%
    \ignorespaces #1\strut}\par}
\newcommand*{\ps}{\par\startbreaks}
\newcommand*{\stopletter}{}
\newcommand*{\returnaddress}{}
\newcount\labelcount
\newcommand*{\startlabels}{\labelcount\z@
  \pagestyle{empty}%
  \l...@texttop\relax
  \topmargin -50\p@
  \headsep \z@
  \oddsidemargin -35\p@
  \evensidemargin -35\p@
  \textheight 10in
  \...@colht\textheight  \...@colroom\textheight \vsize\textheight
  \textwidth 550\p@
  \columnsep 26\p@
  \ifcase \...@ptsize\relax
    \normalsize
  \or
    \small
  \or
    \footnotesize
  \fi
  \baselineskip \z@
  \lineskip \z@
  \boxmaxdepth \z@
  \parindent \z@
  \twocolumn\relax}
\l...@startlabels=\relax
\newcommand*{\mlabel}[2]{%
  \parbox[b][2in][c]{26...@}{\strut\ignorespaces #2}%
  }
\l...@mlabel=\@gobbletwo
\setlength\leftmargini  {2.5em}
\setlength\leftmarginii  {2.2em}
\setlength\leftmarginiii {1.87em}
\setlength\leftmarginiv  {1.7em}
\setlength\leftmarginv  {1em}
\setlength\leftmarginvi {1em}
\setlength\leftmargin    {\leftmargini}
\setlength  \labelsep  {...@}
\setlength  \labelwidth{\leftmargini}
\addtolength\labelwidth{-\labelsep}
\setlength\partopsep{...@}
\...@beginparpenalty -...@lowpenalty
\...@endparpenalty   -...@lowpenalty
\...@itempenalty     -...@lowpenalty
\d...@listi{\setlength\leftmargin{\leftmargini}%
            \setlength\parsep {...@}%
            \setlength\topsep {.4em}%
            \setlength\itemsep{.4em}}
\l...@listi\@listI
\...@listi
\d...@listii {\setlength  \leftmargin{\leftmarginii}%
              \setlength  \labelwidth{\leftmarginii}%
              \addtolength\labelwidth{-\labelsep}}
\d...@listiii{\setlength  \leftmargin{\leftmarginiii}%
              \setlength  \labelwidth{\leftmarginiii}%
              \addtolength\labelwidth{-\labelsep}%
              \setlength  \topsep    {.2em}%
              \setlength  \itemsep   {\topsep}}
\d...@listiv {\setlength  \leftmargin{\leftmarginiv}%
              \setlength  \labelwidth{\leftmarginiv}%
              \addtolength\labelwidth{-\labelsep}}
\d...@listv  {\setlength  \leftmargin{\leftmarginv}%
              \setlength  \labelwidth{\leftmarginv}%
              \addtolength\labelwidth{-\labelsep}}
\d...@listvi {\setlength  \leftmargin{\leftmarginvi}%
              \setlength  \labelwidth{\leftmarginvi}%
              \addtolength\labelwidth{-\labelsep}}
\renewcommand\theenum...@arabic\c@enumi}
\renewcommand\theenumi...@alph\c@enumii}
\renewcommand\theenumii...@roman\c@enumiii}
\renewcommand\theenumi...@alph\c@enumiv}
\newcommand\labelenumi{\theenumi.}
\newcommand\labelenumii{(\theenumii)}
\newcommand\labelenumiii{\theenumiii.}
\newcommand\labelenumiv{\theenumiv.}
\renewcomman...@enumii{\theenumi}
\renewcomman...@enumiii{\theenumi(\theenumii)}
\renewcomman...@enumiv{\p@enumiii\theenumiii}
\newcommand\labelitemi{\textbullet}
\newcommand\labelitemii{\normalfont\bfseries \textendash}
\newcommand\labelitemiii{\textasteriskcentered}
\newcommand\labelitemiv{\textperiodcentered}
\newenvironment{description}
               {\list{}{\labelwidth\z@ \itemindent-\leftmargin
                        \let\makelabel\descriptionlabel}}
               {\endlist}
\newcommand*{\descriptionlabel}[1]{\hspace\labelsep
                                \normalfont\bfseries #1}
\newenvironment{verse}
               {\let\...@centercr
                \list{}{\setlength\itemsep...@}%
                        \setlength\itemindent{-1...@}%
                        \setlength\listparindent{\itemindent}%
                        \setlength\rightmargin{\leftmargin}%
                        \addtolength\leftmargin{1...@}}%
                \item[]}
               {\endlist}
\newenvironment{quotation}
               {\list{}{\setlength\listparindent{1.5em}%
                        \setlength\itemindent{\listparindent}%
                        \setlength\rightmargin{\leftmargin}}%
                \item[]}
               {\endlist}
\newenvironment{quote}
               {\list{}{\setlength\rightmargin{\leftmargin}}%
                \item[]}
               {\endlist}
\setlength\arraycolsep{...@}
\setlength\tabcolsep{...@}
\setlength\arrayrulewidth{....@}
\setlength\doublerulesep{...@}
\setlength\tabbingsep{\labelsep}
\sk...@mpfootins = \skip\footins
\setlength\fboxsep{...@}
\setlength\fboxrule{....@}
\renewcommand\theequatio...@arabic\c@equation}
\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\relax}
\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\relax}
\declarerobustcommand*{\cal...@fontswitch{\relax}{\mathcal}}
\declarerobustcommand*{\mit...@fontswitch{\relax}{\mathnormal}}
\renewcommand\footnoterule{%
  \kern-\p@
  \hrule \...@width .4\columnwidth
  \kern ....@}
\long\d...@makefntext#1{%
    \noindent
    \hangindent 5\p@
    \...@xt@5...@{\hss\@makefnmark}#1}
\newcommand*{\Toname}{To}
\newcommand*{\Fromname}{From}
\newcommand*{\Datename}{Date}
\newcommand*{\Subjectname}{Subject}
\newcommand*{\Ccname}{cc}
\newcommand*{\enclname}{encl}
\newcommand*{\pagename}{Page}
\newcommand*{\headtoname}{To}
\newcommand*{\today}{\ifcase\month\or
  January\or February\or March\or April\or May\or June\or
  July\or August\or September\or October\or November\or December\fi
  \space\number\day, \number\year}
\setlength\columnsep{1...@}
\setlength\columnseprule{...@}
\pagestyle{plain}
\pagenumbering{arabic}
\raggedbottom
\d...@texttop{\ifnum\c@page=1\vskip \z@ plus.00006fil\relax\fi}
\onecolumn
\endinput
%%
%% End of file `memo.cls'.

Attachment: Bot.memo
Description: Binary data

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to