Mark Elston <m_els...@comcast.net> writes:

> OK.  I guess I was wrong.  For some reason this hook doesn't seem
> to work.  I masked the issue a different way and it made me *think*
> this was working.
>
> Any ideas why this hook function would not remove header lines with
> only tags and no header text?
>
> Mark

Hi Mark,

I haven't tried to understand the use case, but here's a modified
version.

Dan

(defun mee-delete-empty-org-headers ()
  (while (re-search-forward "^\\*+[\t ]+:[a-zA-Z0-9]+:$" nil t)
    (beginning-of-line)
    (kill-line)
    (forward-line)))

>
> On 2/3/2010 6:24 PM, Mark Elston wrote:
>> ...
>>
>> ;;; Export Hooks
>> (defun mee-delete-empty-org-headers ()
>>   (while (re-search-forward "^[*]+ [ ]+:[a-zA-Z0-9]+:$" nil t)
>>     (progn
>>       (beginning-of-line)
>>       (kill-line 0))))
>>
>> (add-hook 'org-export-preprocess-hook
>>           'mee-delete-empty-org-headers)
>>
>>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode


_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to