From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mohamed HIBTI Subject: Re: Bibtex export Date: Thu, 20 Dec 2012 18:04:42 +0100 Message-ID: References: <87a9t8u75x.fsf@gmail.com> <877gocu0j0.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b3437321e453104d14bba58 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:47002) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TljY8-000450-KN for emacs-orgmode@gnu.org; Thu, 20 Dec 2012 12:04:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TljY3-0005Eu-7O for emacs-orgmode@gnu.org; Thu, 20 Dec 2012 12:04:48 -0500 Received: from mail-ea0-f173.google.com ([209.85.215.173]:48128) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TljY2-0005EV-Tv for emacs-orgmode@gnu.org; Thu, 20 Dec 2012 12:04:43 -0500 Received: by mail-ea0-f173.google.com with SMTP id i13so1441961eaa.18 for ; Thu, 20 Dec 2012 09:04:42 -0800 (PST) In-Reply-To: <877gocu0j0.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Myles English Cc: emacs-orgmode@gnu.org --047d7b3437321e453104d14bba58 Content-Type: text/plain; charset=ISO-8859-1 I got it thank you guys !! 2012/12/20 Myles English > > Mohamed HIBTI writes: > > > Thanks Myles, > > This is realy what I want. I have just to fix something (may be my > > org-version). > > The variable org-export-before-processing-hook seems missing. > > I have org-version 7.8.10 (with emacs 24.2.1) > > Regards, > > Mohame > > Sorry again, I should have said that I am using this with the git > version and the new exporter. > > I don't know if there is anything that will work for you on version > 7.8.10. I can recommend the git version though it is quite stable and > rarely causes problems, once set up it is very easy to update, see the > worg page for details. > > Myles > > > 2012/12/20 Myles English > > > >> > >> mohamed writes: > >> > >> > Myles, > >> > Thank you for this answer. > >> > I tried it with > >> > ------------------------------- > >> > (add-to-list 'org-export-preprocess-hook > >> > 'my-export-delete-headlines-tagged-noheading) > >> > ------------------------------- > >> > >> Sorry, I should have said: add it to org-export-before-processing-hook, > >> so you use it like this: > >> > >> #+begin_src emacs-lisp > >> (defun my-export-delete-headlines-tagged-noheading (backend) > >> (dolist (hl (nreverse (org-element-map (org-element-parse-buffer > >> 'headline) > >> 'headline > >> 'identity))) > >> (when (member "noheading" (org-element-property :tags hl)) > >> (goto-char (org-element-property :begin hl)) > >> (delete-region (point) (progn (forward-line) (point)))))) > >> > >> (add-to-list 'org-export-before-processing-hook > >> 'my-export-delete-headlines-tagged-noheading) > >> #+end_src > >> > >> Myles > >> > >> > > >> > > >> > But I got some errors when exporting > >> > > >> > ----------------------------------------------------------------- > >> > Exporting to LaTeX... run-hooks: Wrong number of > >> > arguments: (lambda (backend) (dolist (hl (nreverse (org-element-map > >> > (org-element-parse-buffer (quote headline)) (quote headline) (quote > >> identity)))) > >> > (when (member "noheading" (org-element-property :tags hl)) (goto-char > >> > (org-element-property :begin hl)) (delete-region (point) (progn > >> (forward-line) > >> > (point)))))), 0 (my-export-delete-headlines-tagged-noheading) > >> > ----------------------------------------------------------------- > >> > > >> > > >> > I guess I have to use it in another way. My knowledge of lisp > >> programming is > >> > very limited. > >> > > >> > Regards, > >> > Mohamed > >> > >> > > --047d7b3437321e453104d14bba58 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I got it thank you guys !!


2012/12/20= Myles English <mylesenglish@gmail.com>

Mohamed HIBTI writes:

> Thanks Myles,
> This is realy what I want. I have just to fix something (may be my
> org-version).
> The variable org-export-before-processing-hook seems missing.
> I have org-version 7.8.10 (with emacs 24.2.1)
> Regards,
> Mohame

Sorry again, I should have said that I am using this with the git
version and the new exporter.

I don't know if there is anything that will work for you on version
7.8.10. =A0I can recommend the git version though it is quite stable and rarely causes problems, once set up it is very easy to update, see the
worg page for details.

Myles

> 2012/12/20 Myles English <mylesenglish@gmail.com>
>
>>
>> mohamed writes:
>>
>> > Myles,
>> > Thank you for this answer.
>> > I tried it with
>> > -------------------------------
>> > (add-to-list 'org-export-preprocess-hook
>> > 'my-export-delete-headlines-tagged-noheading)
>> > -------------------------------
>>
>> Sorry, I should have said: add it to org-export-before-processing-= hook,
>> so you use it like this:
>>
>> #+begin_src emacs-lisp
>> (defun my-export-delete-headlines-tagged-noheading (backend)
>> =A0 (dolist (hl (nreverse (org-element-map (org-element-parse-buff= er
>> 'headline)
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0'headline
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0'identity)))
>> =A0 =A0 (when (member "noheading" (org-element-property = :tags hl))
>> =A0 =A0 =A0 (goto-char (org-element-property :begin hl))
>> =A0 =A0 =A0 (delete-region (point) (progn (forward-line) (point)))= )))
>>
>> (add-to-list 'org-export-before-processing-hook
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0'my-export-delete-headlines-tagged-= noheading)
>> #+end_src
>>
>> Myles
>>
>> >
>> >
>> > But I got some errors when exporting
>> >
>> > -------------------------------------------------------------= ----
>> > Exporting to LaTeX... =A0run-hooks: Wrong number of
>> > arguments: (lambda (backend) (dolist (hl (nreverse (org-eleme= nt-map
>> > (org-element-parse-buffer (quote headline)) (quote headline) = (quote
>> identity))))
>> > (when (member "noheading" (org-element-property :ta= gs hl)) (goto-char
>> > (org-element-property :begin hl)) (delete-region (point) (pro= gn
>> (forward-line)
>> > (point)))))), 0 (my-export-delete-headlines-tagged-noheading)=
>> > -------------------------------------------------------------= ----
>> >
>> >
>> > I guess I have to use it in another way. My knowledge of lisp=
>> programming is
>> > very limited.
>> >
>> > Regards,
>> > Mohamed
>>
>>


--047d7b3437321e453104d14bba58--