Hello,

It sure looks interesting.

Here are a few comment about org-e-man.el.

1. Please do not leave trailing parenthesis (i.e at line 228).

2. You can remove every `declare-function'. You only need to

    (require 'org-export)

   in the file header, actually.

3. You can remove `org-e-man-babel-language-alist' variable and
   `org-e-man--guess-babel-language' function since they are specific to
   the "babel" LaTeX package.

4. For the same reason, you can remove `org-e-man--guess-inputenc'
   ("inputenc" LaTeX package).

5. Do you really need something as complicated as `org-e-man-classes'?

   It is a chore to use in `e-latex' but is tolerated since it allows
   for much configurability, but in a man exporter, I doubt it is worth
   introducing it. Indeed, I don't think there are much packages and
   section configurations to play with.

6. You shouldn't ignore drawers. Simply return their contents with no
   additional syntax. I.e.

   (defun org-e-man-drawer (drawer contents info)
     "Blah..."
     contents)

   In that case, you can safely remove unused
   `org-e-man-format-drawer-function' variable.

7. Something is wrong in `org-e-man-entity'. There is no `:man' format
   for entities. You can choose among `:latex', `ascii', `:html',
   `:latin1' or `:utf-8'.

8. Since there is no image support in man, you can remove unused
   variables `org-e-man-image-default-option',
   `org-e-man-default-figure-position', `org-e-man-inline-image-rules'.

9. `org-e-man--make-option-string' looks unused too. You may remove it.

10. Line 1743: (if (not (null attr-item))...) => (if attr-item ...)

11. I think that you can hard-code text markup macros and remove
    `org-e-man-text-markup-alist'. It will simplify code in
    `org-e-man--text-markup'.

12. Optionally, `org-e-man-headline' can probably be simplified a lot
    too. I imagine that someone using the man exporter doesn't expect
    much configuration for headlines.

13. In `org-e-man-plain-list', it looks like you can simply return
    contents (as for drawers) and remove everything else. Same for
    special blocks. Just return contents.

    By the way (format "%s" contents) is exactly `contents' since this
    argument is always a string.

14. In general, try to remove as much unused stuff as possible.


Thank you for your work,


Regards,

-- 
Nicolas Goaziou

Reply via email to