emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Achim Gratz <Stromeko@nexgo.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: new exporter
Date: Thu, 07 Jun 2012 22:24:50 +0200	[thread overview]
Message-ID: <87sje6eup9.fsf@gmail.com> (raw)
In-Reply-To: <873966yjt6.fsf@Rainer.invalid> (Achim Gratz's message of "Thu, 07 Jun 2012 21:59:49 +0200")

Achim Gratz <Stromeko@nexgo.de> writes:

> Nicolas Goaziou writes:
>> declarations (instead of requires) are here to avoid circular
>> dependencies. Why do you want to revert that in the first place?
>
> ...because so many of them were missing that it seemed easier to simply
> pull in the definitions by requirement.

But it isn't easier in the end, as you can see.

By the way, I have a (ugly and mostly working) function to add those
declarations.

#+begin_src emacs-lisp
(defun ngz-declare-function (package)
  "Insert necessary declare-function calls at point.
PACKAGE is the package from which functions should be declared."
  (interactive "sPackage name: ")
  (dolist (obj (save-excursion
                 (goto-char (point-min))
                 (let (acc (re (format "\\(^\\|[^`]\\)\\(%s-[-a-z]+\\)"
                                       package)))
                   (while (re-search-forward re nil t)
                     (let ((func (org-match-string-no-properties 2)))
                       (unless (member func acc) (push func acc))))
                   (sort acc 'string<))))
    (cond
     ((fboundp (intern obj))
      (let ((args
             (let* ((desc (save-window-excursion
                            (describe-function (intern obj))))
                    (args
                     (and (string-match (format "(%s \\([^)]+\\)?)" obj) desc)
                          (downcase
                           (replace-regexp-in-string
                            "[ \t]*\n[ \t]*" " "
                            (org-match-string-no-properties 1 desc))))))
               (insert
                (format "(declare-function %s \"%s\" (%s))\n"
                        obj package (or args ""))))))))
     ((boundp (intern obj)) (insert (format "(defvar %s)\n" obj))))))
#+end_src

> Yes, that was what I was thinking as well.  But that is not actually the
> problem with the compilation, but rather your use of cl macros in some
> places.  Somehow this messes up the compilation in a non-obvious way,
> see my other post.  If you want to try it yourself, delete one of the
> org-e-*.elc files after the first compilation and try to compile that
> again and watch it explode...

I do not notice anything like this.  There are many compilation errors
on some files, but they are the same before and after removing an
org-e-*.el file.


Regards,

  reply	other threads:[~2012-06-07 20:28 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-02 10:46 Bug: Images in Latex [7.8.11 (release_7.8.11-33-g2d71a5 @ /Users/petr/Dropbox/emacs/elisp/org-mode/lisp/)] Petr Samarin
2012-06-02 13:23 ` Jambunathan K
2012-06-02 17:16   ` new exporter (was: Bug: Images in Latex..) Achim Gratz
2012-06-03 13:21     ` new exporter Jambunathan K
2012-06-04 20:23     ` Achim Gratz
2012-06-07 19:44     ` Nicolas Goaziou
2012-06-07 19:59       ` Achim Gratz
2012-06-07 20:24         ` Nicolas Goaziou [this message]
2012-06-09 18:48           ` Achim Gratz
2012-06-09 18:56             ` Nicolas Goaziou
2012-06-09 19:06               ` Achim Gratz
2012-06-09 19:45                 ` Nicolas Goaziou
2012-06-09 21:19                   ` Achim Gratz
2012-06-07 20:14       ` Achim Gratz
2012-06-26  5:39         ` Achim Gratz
2012-06-26  6:18           ` Achim Gratz
2012-06-26 14:53             ` Nicolas Goaziou
2012-06-26 16:14               ` Achim Gratz
2012-06-26 18:43               ` Achim Gratz
2012-06-27 20:05                 ` Achim Gratz
2012-06-28  7:03                   ` Nicolas Goaziou
2012-06-29 18:17                     ` Achim Gratz
2012-06-30  6:48                       ` Nicolas Goaziou
2012-06-30  7:12                         ` Achim Gratz
2012-07-01 16:33                         ` Achim Gratz
2012-07-02 10:19                           ` Nicolas Goaziou
2012-07-02 19:06                             ` Achim Gratz
2012-07-12 18:37                         ` Achim Gratz
2012-07-13 14:46                           ` Nicolas Goaziou
2012-07-13 18:32                             ` Achim Gratz
2012-07-14 16:20                               ` Nicolas Goaziou
2012-07-14 16:31                                 ` Achim Gratz
2012-07-14 16:48                                 ` Jambunathan K
2012-07-14 17:47                                   ` Jambunathan K
2012-07-15 12:02                                 ` Achim Gratz
2012-07-15 19:50                                   ` Nicolas Goaziou
2012-07-15 20:08                                     ` Bastien
2012-07-15 20:18                                     ` Achim Gratz
2012-07-16  8:46                                       ` Nicolas Goaziou
2012-07-16 18:11                                         ` Achim Gratz
2012-07-16 21:11                                           ` Nicolas Goaziou
2012-07-17 17:35                                             ` Achim Gratz
2012-07-17 20:59                                               ` Nicolas Goaziou
2012-07-18  9:38                                                 ` Nicolas Goaziou
2012-07-18 18:57                                                   ` Achim Gratz
2012-07-18 18:09                                                 ` Achim Gratz
2012-07-16 18:35                                         ` local.mk vs. default.mk (was: new exporter) Achim Gratz
  -- strict thread matches above, loose matches on Subject: below --
2012-09-30 11:41 new exporter itmejl
2012-09-30 12:36 ` Nicolas Goaziou
2012-10-11 12:34 New exporter Sebastien Vauban
2012-10-11 14:07 ` Yagnesh Raghava Yakkala
2012-10-12  7:33   ` Sebastien Vauban
2012-10-11 19:37 ` Nicolas Goaziou
2012-10-12  7:34   ` Sebastien Vauban
2012-10-12 11:09     ` Sebastien Vauban
2012-10-12 11:27       ` Sebastien Vauban

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=87sje6eup9.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=Stromeko@nexgo.de \
    --cc=emacs-orgmode@gnu.org \
    /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).