[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
using format-alist
From: |
bob . hepple |
Subject: |
using format-alist |
Date: |
Fri, 19 Dec 2014 21:43:43 -0800 (PST) |
User-agent: |
G2/1.0 |
I'm trying to read a structured text format (gjots) into emacs org-mode - I
have converters gjots2org and org2gjots and they do the encoding/decoding as
filters.
I had hoped that format-alist would do what I want but it can't use a file
extension like *.gjots, so I tried this:
(setq format-alist
(cons '(gjots "gjots" nil "gjots2org" "org2gjots" t nil)
format-alist))
(define-derived-mode gjots-mode org-mode "gjots"
"Major mode for editing gjots files."
(call-process-region (point-min) (point-max) "gjots2org" t t) ; convert
to org-mode
(set-buffer-modified-p nil)
(setq buffer-file-format 'gjots)) ; this is supposed to define encoding
on write!!!
.... to some extent it's working ... but when I save, it's in org-mode format,
not gjots format.
Anyone got any idea what I'm missing?
Thanks
Bob
- using format-alist,
bob . hepple <=