emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Do Groff letter modes work in latest git?
@ 2012-08-19 13:36 Myles English
  2012-08-19 16:51 ` Luis Anaya
  0 siblings, 1 reply; 13+ messages in thread
From: Myles English @ 2012-08-19 13:36 UTC (permalink / raw)
  To: Emacs-orgmode


Hi,

Following the announcement that writing letters was possible using the
Groff exporter in this thread:

http://lists.gnu.org/archive/html/emacs-orgmode/2012-08/msg00416.html

I decided to have a go but the resulting pdf does not look much like a
letter, more like a memo, and the tags :FROM: :TO: etc are still visible
in the text.  I was expecting a nicely formatted letter.

Steps to reproduce:

1. starting emacs with emacs -Q and loading org-mode via the latest git
   head at ~/.emacs.d/plugins/org-mode

(add-to-list 'load-path
             "~/.emacs.d/plugins/org-mode/lisp")
(require 'org-install)

(add-to-list 'load-path
 	     "/home/myles/.emacs.d/plugins/org-mode/contrib/lisp")
(require 'org-e-groff)

2. open an org document containing:

#+AUTHOR: Mickey Mouse
#+TITLE: Example from Worg
#+GROFF_CLASS: letter

* FROM								       :FROM:
Joe Smith
00 Street
City, ST, 00000
* TO									 :TO:
Maria Rivera
Urbanizacion Palma Lejos
Calle 22, Bloque A, Numero 10
Ciudad, ES, 00000
* BODY								       :BODY:
letter content
* Copy to								 :NS:
Jill Brown

3. M-x org-e-groff-export-to-pdf

4. open the resulting pdf

Can anyone see where I may be going wrong?

Thanks,

Myles

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Do Groff letter modes work in latest git?
  2012-08-19 13:36 Do Groff letter modes work in latest git? Myles English
@ 2012-08-19 16:51 ` Luis Anaya
  2012-08-19 19:16   ` Myles English
  0 siblings, 1 reply; 13+ messages in thread
From: Luis Anaya @ 2012-08-19 16:51 UTC (permalink / raw)
  To: Myles English; +Cc: Emacs-orgmode

Myles English <mylesenglish@gmail.com> writes:

> Following the announcement that writing letters was possible using the
> Groff exporter in this thread:

Yes, that's right... 

>
> I decided to have a go but the resulting pdf does not look much like a
> letter, more like a memo, and the tags :FROM: :TO: etc are still visible
> in the text.  I was expecting a nicely formatted letter.

Which class were you using? Internal will look like a memo. Try the
#+GROFF_CLASS: block or #+GROFF_CLASS: semiblock

> 2. open an org document containing:
>
> #+AUTHOR: Mickey Mouse
> #+TITLE: Example from Worg
> #+GROFF_CLASS: letter

No, you want to use fullblock, block or semi block.  
What happens with "letter" is that is a throwback from the Bell Labs in 
which the Memo Type 5 was used for letters. It had to be made available
for sake of completeness. 

But, the Groff MM folks created a separate set of macros for letter
writing in which within Org uses a separate class name.
These are simplified, semiblock, fullblock or block. Hopefully these
will give you are looking for.

Let me know if you have any questions. 



-- 
Luis Anaya
papo anaya aroba hot mail punto com
"Do not use 100 words if you can say it in 10" - Yamamoto Tsunetomo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Do Groff letter modes work in latest git?
  2012-08-19 16:51 ` Luis Anaya
@ 2012-08-19 19:16   ` Myles English
  2012-08-19 19:30     ` Luis Anaya
  2012-08-19 19:35     ` Luis Anaya
  0 siblings, 2 replies; 13+ messages in thread
From: Myles English @ 2012-08-19 19:16 UTC (permalink / raw)
  To: Luis Anaya; +Cc: Emacs-orgmode


Luis Anaya writes:

> Which class were you using? Internal will look like a memo. Try the
> #+GROFF_CLASS: block or #+GROFF_CLASS: semiblock
>
>> 2. open an org document containing:
>>
>> #+AUTHOR: Mickey Mouse
>> #+TITLE: Example from Worg
>> #+GROFF_CLASS: letter
>
> No, you want to use fullblock, block or semi block.  

Thanks for the help, however none of these classes yields a letter for
me.  Do you get the same result with my ECM?

Myles

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Do Groff letter modes work in latest git?
  2012-08-19 19:16   ` Myles English
@ 2012-08-19 19:30     ` Luis Anaya
  2012-08-19 19:35     ` Luis Anaya
  1 sibling, 0 replies; 13+ messages in thread
From: Luis Anaya @ 2012-08-19 19:30 UTC (permalink / raw)
  To: Myles English; +Cc: Emacs-orgmode

Myles English <mylesenglish@gmail.com> writes:

> Luis Anaya writes:
>>>
>>> #+AUTHOR: Mickey Mouse
>>> #+TITLE: Example from Worg
>>> #+GROFF_CLASS: letter
>>
>> No, you want to use fullblock, block or semi block.  
>
> Thanks for the help, however none of these classes yields a letter for
> me.  Do you get the same result with my ECM?

I did not ran it because I suspected on the GROFF_CLASS. I thought 
that you were asking about it because you only got a subject and a date.
 Let's do some parallel threads here. 

Please refer to the samples at
https://www.box.com/s/578d9a22c890ddcea8bd and see if there's something
fishy. I'll take a look at the ECM and run it at home and see how it
goes. 


Luis

-- 
Luis Anaya
papo anaya aroba hot mail punto com
"Do not use 100 words if you can say it in 10" - Yamamoto Tsunetomo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Do Groff letter modes work in latest git?
  2012-08-19 19:16   ` Myles English
  2012-08-19 19:30     ` Luis Anaya
@ 2012-08-19 19:35     ` Luis Anaya
  2012-08-19 21:46       ` Myles English
  1 sibling, 1 reply; 13+ messages in thread
From: Luis Anaya @ 2012-08-19 19:35 UTC (permalink / raw)
  To: Myles English; +Cc: Emacs-orgmode


Hi:

The following does look like a letter, or at least it is formatted
according to what Groff provides. Note on the class type.

Luis


#+begin_example

#+AUTHOR: Mickey Mouse
#+TITLE: Example from Worg
#+GROFF_CLASS: semiblock
* FROM                                                                 :FROM:
Joe Smith
00 Street
City, ST, 00000
* TO                                                                     :TO:
Maria Rivera
Urbanizacion Palma Lejos
Calle 22, Bloque A, Numero 10
Ciudad, ES, 00000
* BODY                                                                 :BODY:
letter content
* Copy to                                                                :NS:
Jill Brown

#+end_example


-- 
Luis Anaya
papo anaya aroba hot mail punto com
"Do not use 100 words if you can say it in 10" - Yamamoto Tsunetomo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Do Groff letter modes work in latest git?
  2012-08-19 19:35     ` Luis Anaya
@ 2012-08-19 21:46       ` Myles English
  2012-08-19 22:22         ` Luis Anaya
  0 siblings, 1 reply; 13+ messages in thread
From: Myles English @ 2012-08-19 21:46 UTC (permalink / raw)
  To: Luis Anaya; +Cc: Emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 318 bytes --]


Luis Anaya writes:

> Hi:
>
> The following does look like a letter, or at least it is formatted
> according to what Groff provides. Note on the class type.

Thanks for checking but did you start with emacs -Q ?

I tried it and I don't get a letter.  I get the attached screenshot.  Is
that what you get too?

Myles


[-- Attachment #2: screenshot --]
[-- Type: image/png, Size: 22419 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Do Groff letter modes work in latest git?
  2012-08-19 21:46       ` Myles English
@ 2012-08-19 22:22         ` Luis Anaya
  2012-08-19 23:17           ` Myles English
  0 siblings, 1 reply; 13+ messages in thread
From: Luis Anaya @ 2012-08-19 22:22 UTC (permalink / raw)
  To: Myles English; +Cc: Emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 551 bytes --]

Myles English <mylesenglish@gmail.com> writes:

> Thanks for checking but did you start with emacs -Q ?

I tried with emacs -Q. I loaded the following from *scratch*

#+begin_src emacs-lisp

(add-to-list 'load-path "/sdcard-ext/org-mode/lisp")
(add-to-list 'load-path "/sdcard-ext/org-mode/contrib/lisp")
(require 'org-install)
(require 'org)
(require 'org-e-groff)

#+end_src


> I tried it and I don't get a letter.  I get the attached screenshot.  Is
> that what you get too?

No, certainly not. This is the resultant PDF and Groff files.


Luis



[-- Attachment #2: mm.pdf --]
[-- Type: application/pdf, Size: 3001 bytes --]

[-- Attachment #3: mm.groff --]
[-- Type: application/octet-stream, Size: 231 bytes --]

.WA "Mickey Mouse" "" 
Joe Smith
00 Street
City, ST, 00000

.WE
.IA 
Maria Rivera
Urbanizacion Palma Lejos
Calle 22, Bloque A, Numero 10
Ciudad, ES, 00000

.IE
.LO SA
.LT SB

.P
letter content
.FC
.SG


.NS "Copy to" 1 
Jill Brown

[-- Attachment #4: Type: text/plain, Size: 123 bytes --]





-- 
Luis Anaya
papo anaya aroba hot mail punto com
"Do not use 100 words if you can say it in 10" - Yamamoto Tsunetomo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Do Groff letter modes work in latest git?
  2012-08-19 22:22         ` Luis Anaya
@ 2012-08-19 23:17           ` Myles English
  2012-08-19 23:20             ` Luis Anaya
  0 siblings, 1 reply; 13+ messages in thread
From: Myles English @ 2012-08-19 23:17 UTC (permalink / raw)
  To: Luis Anaya; +Cc: Emacs-orgmode


Luis Anaya writes:

> Myles English <mylesenglish@gmail.com> writes:
>
>> Thanks for checking but did you start with emacs -Q ?
>
> I tried with emacs -Q. I loaded the following from *scratch*
>
> #+begin_src emacs-lisp
>
> (add-to-list 'load-path "/sdcard-ext/org-mode/lisp")
> (add-to-list 'load-path "/sdcard-ext/org-mode/contrib/lisp")
> (require 'org-install)
> (require 'org)
> (require 'org-e-groff)
>
> #+end_src
>
>
>> I tried it and I don't get a letter.  I get the attached screenshot.  Is
>> that what you get too?
>
> No, certainly not. This is the resultant PDF and Groff files.
>

Did you mean to attach your Groff file?  Here's mine anyway:

.AF "Org User" 
.TL
Example from Worg
.AU "Mickey Mouse"
.ND "2012-08-19"
.H 1 "FROM \fC:FROM:\fP "
.P
Joe Smith
00 Street
City, ST, 00000

.H 1 "TO \fC:TO:\fP "
.P
Maria Rivera
Urbanizacion Palma Lejos
Calle 22, Bloque A, Numero 10
Ciudad, ES, 00000

.H 1 "BODY \fC:BODY:\fP "
.P
letter content

.H 1 "Copy to \fC:NS:\fP "
.P
Jill Brown


I am wondering if semiblock should be in org-e-groff-classes?  Says on
Worg that "The [#+GROFF_CLASS:] must be listed in org-e-groff-classes"
but here is the org-e-groff-classes from org-e-groff.el:

(("file" ".MT 1"
  (:heading 'default :type "memo" :last-section "toc"))
 ("internal" ".MT 0"
  (:heading 'default :type "memo" :last-section "toc"))
 ("programmer" ".MT 2"
  (:heading 'default :type "memo" :last-section "toc"))
 ("engineer" ".MT 3"
  (:heading 'default :type "memo" :last-section "toc"))
 ("external" ".MT 4"
  (:heading 'default :type "memo" :last-section "toc"))
 ("letter" ".MT 5"
  (:heading 'default :type "memo" :last-section "sign"))
 ("custom" ".so file"
  (:heading custom-function :type "custom" :last-section "toc"))
 ("dummy" ""
  (:heading 'default :type "memo"))
 ("ms" "ms"
  (:heading 'default :type "cover" :last-section "toc"))
 ("se_ms" "se_ms"
  (:heading 'default :type "cover" :last-section "toc"))
 ("none" ""
  '(:heading 'default :type "custom")))

I don't know what else to try after this, any suggestions?

Myles

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Do Groff letter modes work in latest git?
  2012-08-19 23:17           ` Myles English
@ 2012-08-19 23:20             ` Luis Anaya
  2012-08-19 23:42               ` Myles English
  0 siblings, 1 reply; 13+ messages in thread
From: Luis Anaya @ 2012-08-19 23:20 UTC (permalink / raw)
  To: Myles English; +Cc: Emacs-orgmode

Myles English <mylesenglish@gmail.com> writes:

> Did you mean to attach your Groff file?  Here's mine anyway:
>
> .AF "Org User" 
> .TL
> Example from Worg
> .AU "Mickey Mouse"
> .ND "2012-08-19"


Note that you do not have a .MT command, this is suspicious. 

>
> I am wondering if semiblock should be in org-e-groff-classes?  Says on

Yes. It should be listed there, otherwise goes through the wayside and
you get the "generic" one. This is useful if you have a specialized
cover letter or custom cover. But it should default to internal. 

> Worg that "The [#+GROFF_CLASS:] must be listed in org-e-groff-classes"
> but here is the org-e-groff-classes from org-e-groff.el:
[chop]

This code tells me that that you have a very old version. These are
defined in the org-e-groff.el, at the end  If you are picking it up from Git, make sure 
that you get the latest and greatest. 

This is how that variable is supposed to look like, but if you have an
old version, adding those will not help:

#+begin_src emacs-lisp

(defcustom org-e-groff-classes
  '(("file" ".MT 1"
     (:heading 'default :type "memo" :last-section "toc"))
    ("internal" ".MT 0"
     (:heading 'default :type "memo" :last-section "toc"))
    ("programmer" ".MT 2"
     (:heading 'default :type "memo" :last-section "toc"))
    ("engineer" ".MT 3"
     (:heading 'default :type "memo" :last-section "toc"))
    ("external" ".MT 4"
     (:heading 'default :type "memo" :last-section "toc"))
    ("letter" ".MT 5"
     (:heading 'default :type "memo" :last-section "sign"))
    ("custom" ".so file"
     (:heading custom-function :type "custom" :last-section "toc"))
    ("dummy" ""
     (:heading 'default :type "memo"))
    ("ms" "ms"
     (:heading 'default :type "cover" :last-section "toc"))
    ("se_ms" "se_ms"
     (:heading 'default :type "cover" :last-section "toc"))
    ("block" "BL"
     (:heading 'default :type "letter" :last-section "sign"))
    ("semiblock" "SB"
     (:heading 'default :type "letter" :last-section "sign"))
    ("fullblock" "FB"
     (:heading 'default :type "letter" :last-section "sign"))
    ("simplified" "SP"
     (:heading 'default :type "letter" :last-section "sign"))
    ("none" "" (:heading 'default :type "custom")))


#+end_src



-- 
Luis Anaya
papo anaya aroba hot mail punto com
"Do not use 100 words if you can say it in 10" - Yamamoto Tsunetomo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Do Groff letter modes work in latest git?
  2012-08-19 23:20             ` Luis Anaya
@ 2012-08-19 23:42               ` Myles English
  2012-08-19 23:50                 ` Luis Anaya
  0 siblings, 1 reply; 13+ messages in thread
From: Myles English @ 2012-08-19 23:42 UTC (permalink / raw)
  To: Luis Anaya; +Cc: Emacs-orgmode


Luis Anaya writes:
> This code tells me that that you have a very old version. These are
> defined in the org-e-groff.el, at the end  If you are picking it up from Git, make sure 
> that you get the latest and greatest. 

I have been using the latest git, so git needs updating I think.

Myles

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Do Groff letter modes work in latest git?
  2012-08-19 23:42               ` Myles English
@ 2012-08-19 23:50                 ` Luis Anaya
  2012-08-20  0:31                   ` Do Groff letter modes work in latest git? (Yes, they do) Myles English
  0 siblings, 1 reply; 13+ messages in thread
From: Luis Anaya @ 2012-08-19 23:50 UTC (permalink / raw)
  To: Myles English; +Cc: Emacs-orgmode

Myles English <mylesenglish@gmail.com> writes:

> Luis Anaya writes:
> I have been using the latest git, so git needs updating I think.
>

Try now... I might have forgotten to push it up :-|. I checked it now. Let
me know.

Luis

-- 
Luis Anaya
papo anaya aroba hot mail punto com
"Do not use 100 words if you can say it in 10" - Yamamoto Tsunetomo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Do Groff letter modes work in latest git? (Yes, they do)
  2012-08-19 23:50                 ` Luis Anaya
@ 2012-08-20  0:31                   ` Myles English
  2012-08-20  0:43                     ` Luis Anaya
  0 siblings, 1 reply; 13+ messages in thread
From: Myles English @ 2012-08-20  0:31 UTC (permalink / raw)
  To: Luis Anaya; +Cc: Emacs-orgmode


Luis Anaya writes:

> Myles English <mylesenglish@gmail.com> writes:
>
>> Luis Anaya writes:
>> I have been using the latest git, so git needs updating I think.
>>
>
> Try now... I might have forgotten to push it up :-|. I checked it now. Let
> me know.
>
> Luis


Thank very much it works well now.

Myles

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Do Groff letter modes work in latest git? (Yes, they do)
  2012-08-20  0:31                   ` Do Groff letter modes work in latest git? (Yes, they do) Myles English
@ 2012-08-20  0:43                     ` Luis Anaya
  0 siblings, 0 replies; 13+ messages in thread
From: Luis Anaya @ 2012-08-20  0:43 UTC (permalink / raw)
  To: Myles English; +Cc: Emacs-orgmode

Myles English <mylesenglish@gmail.com> writes:


>> Try now... I might have forgotten to push it up :-|. I checked it now. Let
>> me know.
>>
>> Luis
>
>
> Thank very much it works well now.

Well, thank you for trying it out. Otherwise, I would not have realized
that it was missing. 

Luis



-- 
Luis Anaya
papo anaya aroba hot mail punto com
"Do not use 100 words if you can say it in 10" - Yamamoto Tsunetomo

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2012-08-20  0:43 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-19 13:36 Do Groff letter modes work in latest git? Myles English
2012-08-19 16:51 ` Luis Anaya
2012-08-19 19:16   ` Myles English
2012-08-19 19:30     ` Luis Anaya
2012-08-19 19:35     ` Luis Anaya
2012-08-19 21:46       ` Myles English
2012-08-19 22:22         ` Luis Anaya
2012-08-19 23:17           ` Myles English
2012-08-19 23:20             ` Luis Anaya
2012-08-19 23:42               ` Myles English
2012-08-19 23:50                 ` Luis Anaya
2012-08-20  0:31                   ` Do Groff letter modes work in latest git? (Yes, they do) Myles English
2012-08-20  0:43                     ` Luis Anaya

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).