emacs-orgmode
[Top][All Lists]
Advanced

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

[Orgmode] Re: FR: source code


From: Bastien
Subject: [Orgmode] Re: FR: source code
Date: Wed, 16 Jan 2008 00:36:41 +0000
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.0 (gnu/linux)

Ed Hirgelt <address@hidden> writes:

>> On Jan 8, 2008 8:03 AM, Bastien <address@hidden> wrote:
>>> #+IF_HTML / #+ENDIF_HTML
>>> #+IF_LaTeX / #+ENDIF_LaTeX
>>> #+IF_TXT / #+ENDIF_TXT
>>>
>>> and
>>>
>>> #+BEGIN_EXAMPLE / #+END_EXAMPLE
>>> #+BEGIN myblock
>>>
>>> What people think?
>>
>> Being someone who uses org-mode primarily for the appearance in the
>> org-buffer while I'm editing and using org, I really do not like this.
>> It may format nicely after export, but it looks ugly in the buffer.
>
> I definite agree with that.  I, too, primarily use org-mode for the
> way things look in Emacs.  I occasionally export but my main use is
> within emacs.

I do agree with both reactions - I feel the same.  But this was not
really the point I was trying to make.

We already have these directives:

,----
| #+BEGIN_HTML
| #+BEGIN_LaTeX
| #+BEGIN_TXT
| #+BEGIN_EXAMPLE
| #+BEGIN myblock
`----

Would that be clearer to have:

,----
| #+IF_HTML
| #+IF_LaTeX
| #+IF_TXT
| #+BEGIN_EXAMPLE
| #+BEGIN myblock
`----

...so that the #+IF* directives tell what text to include in the target
format, while #+BEGIN* directives tell what to do with the environment:
make it an example, or insert the output of a function, etc.

But thinking about this twice, I finally think it might be better to
generalize the use of the dynamic blocks.

  #+BEGIN my_dynamic_block
  #+BEGIN 

    => inserts the output of (my_dynamic_block)

  #+BEGIN org-export :format "html"
  This will exported in HTML only.
  #+END

  #+BEGIN org-export :format "html" :fontify "emacs-lisp"
  ;; This will be exported in any format
  ;; and properly fontified thru htmlize.el
  (defgroup org nil
    "Outline-based notes management and organizer."
    :tag "Org"
    :group 'outlines
    :group 'hypermedia
    :group 'calendar)
  #+END

This way we just have one directive (#+BEGIN) and we can have several
special dynamic blocks (just as we already have one for inserting clock
reports) taking care of what we want to do with this part of the buffer.

My 2 cents,

-- 
Bastien




reply via email to

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