I want to evaluate certain conditions before allowing a user to copy a text. As far as I know, I need an advice for "kill-ring-save"
. I need to ignore the user request to Copy that text if conditions are not met and allow it if are satisfied. How can I do this?
(UPDATE) -- MORE ABOUT CONSTRAINTS: only in specific mode of Emacs (e.g. NXML mode) this advice should be applied and only when one/more specific conditions are met.