emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [ANN] ASCII back-end for new export engine


From: Nicolas Goaziou
Subject: Re: [O] [ANN] ASCII back-end for new export engine
Date: Sun, 29 Jan 2012 00:58:54 +0100

Samuel Wales <address@hidden> writes:

> On 2012-01-28, Nicolas Goaziou <address@hidden> wrote:
>> - This is an item with some text.
>
> Sets off much less.

Well. I'm still not sure why plain lists should have their own
indentation. In that case, tables, latex-environments, etc. should too.

Though, you can still configure what you want with an appropriate
filter:

#+begin_src emacs-lisp
(add-to-list 'org-export-filter-plain-list-functions
             (lambda (plain-list back-end)
               (if (not (eq back-end 'e-ascii)) plain-list
                 (replace-regexp-in-string "^" "  " plain-list))))
#+end_src

>>> No, I mean that this is a useful way to send things to people who use
>>> proportional fonts.
>>
>> But in the simplest cases, tables will look ugly with proportional
>> fonts, no matter if you use tabs or not. It isn't worth the struggle.
>
> Simplest case is perhaps short numbers which always works perfectly with tabs.
>
> Even with ugliness, tabs make it easier to understand the table IMO.
>
> I won't press the issues, but did not want those to be misunderstood.

I understand. 

You may want to test this advice, which will convert a table to tsv
if "#+attr_ascii: tsv" is set above the table.

#+begin_src emacs-lisp
(defadvice org-e-ascii-table (around table-tsv)
  (if (or (not (member "tsv" (org-element-get-property :attr_ascii table)))
          (eq (org-element-get-property :type table) 'table.el))
      ad-do-it
    (setq ad-return-value
          (orgtbl-to-tsv
           (org-table-to-lisp
            (org-element-get-property :raw-table table)) nil))))
#+end_src


Regards,

-- 
Nicolas Goaziou



reply via email to

[Prev in Thread] Current Thread [Next in Thread]