Luke Crook <l...@balooga.com> wrote: > Nick Dokos <nicholas.dokos <at> hp.com> writes: > > > > > Luke Crook <luke <at> balooga.com> wrote: > > > > > Suvayu Ali <fatkasuvayu+linux <at> gmail.com> writes: > > > > > > > Have you tried ':exports results' as a header argument? > > > > > > > > > > I just tried ':exports results'. But now I get the following error when > > > exporting the file, "Cannot open load file: vc-nil" > > > > > > > That sounds like vc does not know what backend to use: maybe you are not > > in a git-controlled directory? > > > > 'C-c C-c' at the top of the source block does generate the correct output > though. It is just 'C-c C-e <export backend>' that returns this error. >
Right: (current-buffer) is not what you think it is when exporting - it is the temp buffer that the export mechanism sets up. There is a way to get the original buffer during capture, but I don't know of a similar mechanism during export. I hardwired the file name instead, but I got no further than the vc-fileset call: there seem to be all sorts of contextual assumptions that vc makes that are violated in the export context. Nick