I wrote a wrapper for the existing export function. My wrapper adds an appropriate bibliography:
link, calls the original export function and then removes the bibliography:
link. In summary, the function modifies the buffer, but undoes those modifications (without actually using undo
).
Is it safe to put the body of such a function inside with-silent-modifications
?
buffer-undo-list
is also cloned, then it may be necessary to use something like(let ((buffer-undo-list t)) ...)
to preserve the list. I voted to close this current thread because usingwith-silent-modifications
is a matter of personal preference, and people may like it or not like it for a variety of reasons. – lawlist Jul 11 '17 at 13:21buffer-undo-list
is not the only thing achieved bywith-silent-modifications
. The latter also makes sure that the buffer is considered to be unmodified (if it was such before the modification). – AlwaysLearning Jul 11 '17 at 14:55with-silent-modifications
is not a valid reason to close all threads about it! – AlwaysLearning Jul 11 '17 at 15:10