Hi all, This may be of some interest to list members, and possibly for org mode itself.
I find myself wanting to get a nice view of org files, for printing or otherwise, and would like to export to HTML. But I don’t want to have a bunch of HTML files in my org directory. Here is a hack to allow you to export to a temporary HTML file and open in a browser, for when you don’t want to create an HTML file in your org directory. best, Erik (defun org-html-export-to-temp-file (&optional async subtreep visible-only body-only ext-plist) "Export current buffer to a temporary HTML file. If narrowing is active in the current buffer, only export its narrowed part. If a region is active, export that region. A non-nil optional argument ASYNC means the process should happen asynchronously. The resulting file should be accessible through the `org-export-stack' interface. When optional argument SUBTREEP is non-nil, export the sub-tree at point, extracting information from the headline properties first. When optional argument VISIBLE-ONLY is non-nil, don't export contents of hidden elements. When optional argument BODY-ONLY is non-nil, only write code between \"<body>\" and \"</body>\" tags. EXT-PLIST, when provided, is a property list with external parameters overriding Org default settings, but still inferior to file-local settings. Return output file's name." (interactive) (let* ((extension (concat "." org-html-extension)) (file (make-temp-file "org-export" nil extension)) (org-export-coding-system org-html-coding-system)) (org-export-to-file 'html file async subtreep visible-only body-only ext-plist))) (org-export-define-derived-backend 'html-temp 'html :menu-entry '(?h 2 ((?t "As temporary HTML file and open" (lambda (a s v b) (if a (org-html-export-to-temp-file t s v b) (org-open-file (org-html-export-to-temp-file nil s v b)))))))) -- Sent from my free software system <http://fsf.org/>.