emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Myles English <mylesenglish@gmail.com>
To: Mohamed HIBTI <mohamed.hibti@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Bibtex export
Date: Thu, 20 Dec 2012 16:54:43 +0000	[thread overview]
Message-ID: <877gocu0j0.fsf@gmail.com> (raw)
In-Reply-To: <CAGDAWkxgsQ3EtKhG4dB=sHrFKsNLvQEEdnrRN+tPDhx=pj5s=g@mail.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.  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 <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)
>>   (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
>>
>>

  parent reply	other threads:[~2012-12-20 16:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-17 15:41 Bibtex export mohamed
2012-12-18 11:52 ` Bastien
2012-12-18 20:47   ` mohamed
2012-12-19 12:40     ` Myles English
2012-12-20 10:08       ` mohamed
2012-12-20 14:31         ` Myles English
2012-12-20 15:13           ` Mohamed HIBTI
2012-12-20 16:41             ` Bastien
2012-12-20 16:54             ` Myles English [this message]
2012-12-20 17:04               ` Mohamed HIBTI

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877gocu0j0.fsf@gmail.com \
    --to=mylesenglish@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mohamed.hibti@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).