emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* No title in org-export-as-odt
@ 2012-09-23 16:56 Miguel Ruiz
  2012-09-23 18:09 ` Bastien
  2014-03-28  9:11 ` Nicolas Goaziou
  0 siblings, 2 replies; 9+ messages in thread
From: Miguel Ruiz @ 2012-09-23 16:56 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

Any hint to get rid of the title in a org-export-as-odt session?

I've tried 

#+OPTIONS: title:nil author:nil timestamp:nil  toc:nil
#+LANGUAGE: es

* HELLO

and I get the filename as odt file title.

If I try

#+TITLE:
#+OPTIONS: title:nil author:nil timestamp:nil  toc:nil
#+LANGUAGE: es

* HELLO

I get an empty line,  OrgTitle-styled.

Run out of ideas.

TIA


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

* Re: No title in org-export-as-odt
  2012-09-23 16:56 No title in org-export-as-odt Miguel Ruiz
@ 2012-09-23 18:09 ` Bastien
  2014-03-28  9:11 ` Nicolas Goaziou
  1 sibling, 0 replies; 9+ messages in thread
From: Bastien @ 2012-09-23 18:09 UTC (permalink / raw)
  To: Miguel Ruiz; +Cc: emacs-orgmode

Hi Miguel,

Miguel Ruiz <rbenit68@yahoo.es> writes:

> Any hint to get rid of the title in a org-export-as-odt session?

I don't think you can

> #+OPTIONS: title:nil author:nil timestamp:nil  toc:nil
             ^^^^^^^^^

This option is not supported.

-- 
 Bastien

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

* Re: No title in org-export-as-odt
@ 2012-09-24  6:03 Miguel Ruiz
  2012-09-24  6:42 ` Nick Dokos
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Miguel Ruiz @ 2012-09-24  6:03 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

 
> Miguel Ruiz <rbenit68@yahoo.es>
> writes:
> 
> > Any hint to get rid of the title in a org-export-as-odt
> session?
> 
> I don't think you can


org-odt-format-preamble function says:

...
(when title
       (concat
    (org-odt-format-stylized-paragraph
     'title (org-odt-format-tags
         '("<text:title>" . "</text:title>") title))
    ;; separator
    "<text:p text:style-name=\"OrgTitle\"/>"))
...

So I only need to find a way to assign nil to title variable inside the document.

Also I might define a new option with org-export-inbuffer-options-extra, but the elaboration of the function is beyond my knowledge.

I would appreciate any idea.


> 
> > #+OPTIONS: title:nil author:nil timestamp:nil 
> toc:nil
>          
>    ^^^^^^^^^
> 
> This option is not supported.
> 
> -- 
>  Bastien
> 
>

Thanks.


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

* Re: No title in org-export-as-odt
  2012-09-24  6:03 Miguel Ruiz
@ 2012-09-24  6:42 ` Nick Dokos
  2012-09-24 12:10 ` Giovanni Ridolfi
  2014-01-27  6:31 ` Brady Trainor
  2 siblings, 0 replies; 9+ messages in thread
From: Nick Dokos @ 2012-09-24  6:42 UTC (permalink / raw)
  To: Miguel Ruiz; +Cc: emacs-orgmode

Miguel Ruiz <rbenit68@yahoo.es> wrote:

> Hi,
> 
>  
> > Miguel Ruiz <rbenit68@yahoo.es>
> > writes:
> > 
> > > Any hint to get rid of the title in a org-export-as-odt
> > session?
> > 
> > I don't think you can
> 
> 
> org-odt-format-preamble function says:
> 
> ...
> (when title
>        (concat
>     (org-odt-format-stylized-paragraph
>      'title (org-odt-format-tags
>          '("<text:title>" . "</text:title>") title))
>     ;; separator
>     "<text:p text:style-name=\"OrgTitle\"/>"))
> ...
> 
> So I only need to find a way to assign nil to title variable inside the document.
> 

I don't think you can unless you change the code. The title is set in org-lparse.el::org-do-lparse
like this:

,----
|          ...
| 	 (title       (org-xml-encode-org-text-skip-links
| 		       (or (and subtree-p (org-export-get-title-from-subtree))
| 			   (plist-get opt-plist :title)
| 			   (and (not body-only)
| 				(not
| 				 (plist-get opt-plist :skip-before-1st-heading))
| 				(org-export-grab-title-from-buffer))
| 			   (and buffer-file-name
| 				(file-name-sans-extension
| 				 (file-name-nondirectory buffer-file-name)))
| 			   "UNTITLED")))
|         ...
`----

so even if you arrange for the opt-plist to set :title to nil,
the buffer-file-name will override it.

Nick

> Also I might define a new option with org-export-inbuffer-options-extra, but the elaboration of the function is beyond my knowledge.
> 
> I would appreciate any idea.
> 
> 
> > 
> > > #+OPTIONS: title:nil author:nil timestamp:nil 
> > toc:nil
> >          
> >    ^^^^^^^^^
> > 
> > This option is not supported.
> > 
> > -- 
> >  Bastien
> > 
> >
> 
> Thanks.
> 
> 

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

* Re: No title in org-export-as-odt
  2012-09-24  6:03 Miguel Ruiz
  2012-09-24  6:42 ` Nick Dokos
@ 2012-09-24 12:10 ` Giovanni Ridolfi
  2014-01-27  6:31 ` Brady Trainor
  2 siblings, 0 replies; 9+ messages in thread
From: Giovanni Ridolfi @ 2012-09-24 12:10 UTC (permalink / raw)
  To: Miguel Ruiz, emacs-orgmode@gnu.org

Da: Miguel Ruiz <rbenit68@yahoo.es>
Inviato: Lunedì 24 Settembre 2012 8:03

>> Bastien 
>>> Miguel Ruiz <rbenit68@yahoo.es> writes:
> >>
>>> Any hint to get rid of the title in a org-export-as-odt
>>> session?
>> 
>> I don't think you can
>
> org-odt-format-preamble function says:
>
> ...
> (when title
>      (concat
>  (org-odt-format-stylized-paragraph
>  'title (org-odt-format-tags
>    >     '("<text:title>" . "</text:title>") title))
>    ;; separator
>    "<text:p text:style-name=\"OrgTitle\"/>"))

> So I only need to find a way to assign nil to title variable inside the document.
#+TITLE:   <- leave a blank space here?

the new  HTML exporter works.

> I would appreciate any idea.

HTH,
Giovanni /shooting in the dark.

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

* Re: No title in org-export-as-odt
  2012-09-24  6:03 Miguel Ruiz
  2012-09-24  6:42 ` Nick Dokos
  2012-09-24 12:10 ` Giovanni Ridolfi
@ 2014-01-27  6:31 ` Brady Trainor
  2014-01-27 10:35   ` Bastien
  2014-01-27 14:23   ` Jambunathan K
  2 siblings, 2 replies; 9+ messages in thread
From: Brady Trainor @ 2014-01-27  6:31 UTC (permalink / raw)
  To: emacs-orgmode

Miguel Ruiz <rbenit68 <at> yahoo.es> writes:

> > > Any hint to get rid of the title in a org-export-as-odt
> > session?

I had the same problem. I noticed a lot of new lines, `\n', so I tried to
remove more than "just title". For my solution, I changed insert to ignore. 


      ;; Preamble - Title, Author, Date etc.
      (ignore 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
changed insert to ignore
       (let* ((title (org-export-data (plist-get info :title) info))
	      (author (and (plist-get info :with-author)
			   (let ((auth (plist-get info :author)))
			     (and auth (org-export-data auth info)))))
	      (email (plist-get info :email))
	      ;; Switch on or off above vars based on user settings
	      (author (and (plist-get info :with-author) (or author email)))
	      (email (and (plist-get info :with-email) email)))
	 (concat
	  ;; Title.
	  (when title
	    (concat
	     (format "\n<text:p text:style-name=\"%s\">%s</text:p>"
		     "OrgTitle" (format "\n<text:title>%s</text:title>" title))
	     ;; Separator.
	     "\n<text:p text:style-name=\"OrgTitle\"/>"))



This was in .emacs.d/elpa/org-[...]/ox-odt.el, that is, org export to odt.
Also, not sure if it was necessary, but I deleted ox-odt.elc, the compiled
version. 


Brady 


> 
> org-odt-format-preamble function says:
> 
> ...
> (when title
>        (concat
>     (org-odt-format-stylized-paragraph
>      'title (org-odt-format-tags
>          '("<text:title>" . "</text:title>") title))
>     ;; separator
>     "<text:p text:style-name=\"OrgTitle\"/>"))
> ...
> 
> So I only need to find a way to assign nil to title variable inside the
document.
> 
> Also I might define a new option with org-export-inbuffer-options-extra,
but the elaboration of the
> function is beyond my knowledge.
> 
> I would appreciate any idea.
> 

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

* Re: No title in org-export-as-odt
  2014-01-27  6:31 ` Brady Trainor
@ 2014-01-27 10:35   ` Bastien
  2014-01-27 14:23   ` Jambunathan K
  1 sibling, 0 replies; 9+ messages in thread
From: Bastien @ 2014-01-27 10:35 UTC (permalink / raw)
  To: Brady Trainor; +Cc: emacs-orgmode

Hi Brady,

Brady Trainor <algebrat@uw.edu> writes:

> Miguel Ruiz <rbenit68 <at> yahoo.es> writes:
>
>> > > Any hint to get rid of the title in a org-export-as-odt
>> > session?
>
> I had the same problem. I noticed a lot of new lines, `\n', so I tried to
> remove more than "just title". For my solution, I changed insert to
> ignore. 

Can you provide your change in the form of a patch?

1. ~$ git clone git://orgmode.org/org-mode.git
2. cd org-mode/lisp/
3. edit ox-odt.el by adding your change
4. in Emacs, hit `C-x v =' from the file to create the patch
5. save the patch buffer to ox-odt.el.patch
5. send ox-odt.el.patch to the list, using [PATCH] in the subject line

Thanks in advance!

-- 
 Bastien

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

* Re: No title in org-export-as-odt
  2014-01-27  6:31 ` Brady Trainor
  2014-01-27 10:35   ` Bastien
@ 2014-01-27 14:23   ` Jambunathan K
  1 sibling, 0 replies; 9+ messages in thread
From: Jambunathan K @ 2014-01-27 14:23 UTC (permalink / raw)
  Cc: emacs-orgmode

Brady Trainor <algebrat@uw.edu> writes:

> Miguel Ruiz <rbenit68 <at> yahoo.es> writes:
>
>> > > Any hint to get rid of the title in a org-export-as-odt

If you are seeing `org-export-as-odt' then you are using old Org (<
8.0).  Old exporters are no longer maintained.  So you upgrade to the
latest Org (org > 8.0) via M-x list-packages.

Btw, I have a provided a fix as part of my ELPA package[fn:1].  If

   #+TITLE:

is made of just whitespaces, the exported document will no longer have
the corresponding fieldnames.

[fn:1] http://lists.gnu.org/archive/html/emacs-orgmode/2014-01/msg01312.html

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

* Re: No title in org-export-as-odt
  2012-09-23 16:56 No title in org-export-as-odt Miguel Ruiz
  2012-09-23 18:09 ` Bastien
@ 2014-03-28  9:11 ` Nicolas Goaziou
  1 sibling, 0 replies; 9+ messages in thread
From: Nicolas Goaziou @ 2014-03-28  9:11 UTC (permalink / raw)
  To: Miguel Ruiz; +Cc: emacs-orgmode

Hello,

Miguel Ruiz <rbenit68@yahoo.es> writes:

> If I try
>
> #+TITLE:

This should remove the title line. Thank you for reporting it.


Regards,

-- 
Nicolas Goaziou

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

end of thread, other threads:[~2014-03-28  9:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-23 16:56 No title in org-export-as-odt Miguel Ruiz
2012-09-23 18:09 ` Bastien
2014-03-28  9:11 ` Nicolas Goaziou
  -- strict thread matches above, loose matches on Subject: below --
2012-09-24  6:03 Miguel Ruiz
2012-09-24  6:42 ` Nick Dokos
2012-09-24 12:10 ` Giovanni Ridolfi
2014-01-27  6:31 ` Brady Trainor
2014-01-27 10:35   ` Bastien
2014-01-27 14:23   ` Jambunathan K

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).