|
| From: | Rasmus |
| Subject: | Re: [O] [patch] better(?) indention for cdlatex-environment |
| Date: | Sun, 15 Feb 2015 01:08:20 +0100 |
| User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Nicolas Goaziou <address@hidden> writes:
> Another idea: insert the environment in a temp buffer. Check for buffer
> emptiness. If there is something, insert it with appropriate
> indentation.
It's a very good idea! On the top of my head there's two issues.
1. cdlatex-environment doesn't work with buffers, only files...¹ I think
it doesn't even work with (with-temp-file · ⋯) without saving the file
first. Try:
(require 'cdlatex)
(require 'reftex)
(with-temp-buffer (cdlatex-environment "equation"))
2. if run from a temporary buffer, the refcounter would always be one.
Perhaps there would be a way to update it afterwards.
—Rasmus
Footnotes:
¹ https://github.com/cdominik/cdlatex/issues/3
--
Sådan en god dansk lagereddike kan man slet ikke bruge mere
| [Prev in Thread] | Current Thread | [Next in Thread] |