engrave-faces icon indicating copy to clipboard operation
engrave-faces copied to clipboard

engrave region

Open AlexD97 opened this issue 1 year ago • 8 comments

Is it somehow possible to export only a region of the current buffer like in htmlize? And is it possible to prevent engrave-faces from creating a new temporary buffer/using a new mode (I would like to use engrave-faces in agda2-mode, not in org-mode).

AlexD97 avatar Dec 05 '22 17:12 AlexD97

Not currently, but I think narrowing may work, which would make doing so fairly trivial.

With regard to running it using a temporary buffer, sure, you're just going to need to take care of that yourself. I'm not sure that complexity belongs in this package (but I'm open to further discussion).

tecosaur avatar Dec 05 '22 17:12 tecosaur

The problem with org-mode-only is that agda does not play very well with org mode: there is no syntax highlighting in src blocks. Since htmlize works well with any buffer I thought this might be the case here as well.

AlexD97 avatar Dec 05 '22 21:12 AlexD97

Taking a look at this again, ti think it could be helpful to explain your use case a bit more.

tecosaur avatar Jan 15 '23 08:01 tecosaur

I wanted to have the possibility to export regions of an Agda buffer to a latex file. The problem was/is that engrave-faces creates a new buffer where the syntax highlighting from Agda is lost. Moreover, I wanted to have the possibility to just export a snippet and not the whole file.

AlexD97 avatar Jan 19 '23 10:01 AlexD97

Does narrow-to-region + engrave-faces-latex-buffer not work for you?

tecosaur avatar Jan 19 '23 11:01 tecosaur

Unfortunately not, since the syntax highlighting is somehow lost when invoking engrave-faces-latex-buffer.

AlexD97 avatar Jan 19 '23 11:01 AlexD97

Ok, so that sounds like a separate problem to engraving a region. I'm going to need more details to work with though.

tecosaur avatar Jan 19 '23 13:01 tecosaur

What details do you need?

AlexD97 avatar Jan 20 '23 20:01 AlexD97