In the documentation, two ways are suggested for accessing arguments in an advice: by the name of the argument in the original function and by using special functions. I cannot get the second way to work. Here is my attempt:
(defun my-insert-for-yank(orig-fun &rest args) (insert (ad-get-arg 1))) (advice-add 'insert-for-yank :around #'my-insert-for-yank)
When I run
(insert-for-yank "aa bb"), I get a message about
ad-get-arg being a
What am I missing?