Skip to main content
edited body
Source Link
Adam
  • 1.9k
  • 15
  • 33

I figured it out. Here is the correct form:

#+BEGIN_SRC emacs-lisp (defun my-function () (message "bingo!")) (defadvice org-edit-special (before my-big-advice activate) (my-function)) #+END_SRC 

And here is a good tutorial on advising functions for anyone else who runs into this.

Looking at our revised code from left-to-right: defadvice is self-explanatory. org-edit-special is the function we are advising. before means we want our advice to happen first. bymy-big-advice is the name of our advice (we could have called this foo-bar if we wanted). And activate tells Emacs to make this work now.

I figured it out. Here is the correct form:

#+BEGIN_SRC emacs-lisp (defun my-function () (message "bingo!")) (defadvice org-edit-special (before my-big-advice activate) (my-function)) #+END_SRC 

And here is a good tutorial on advising functions for anyone else who runs into this.

Looking at our revised code from left-to-right: defadvice is self-explanatory. org-edit-special is the function we are advising. before means we want our advice to happen first. by-big-advice is the name of our advice (we could have called this foo-bar if we wanted). And activate tells Emacs to make this work now.

I figured it out. Here is the correct form:

#+BEGIN_SRC emacs-lisp (defun my-function () (message "bingo!")) (defadvice org-edit-special (before my-big-advice activate) (my-function)) #+END_SRC 

And here is a good tutorial on advising functions for anyone else who runs into this.

Looking at our revised code from left-to-right: defadvice is self-explanatory. org-edit-special is the function we are advising. before means we want our advice to happen first. my-big-advice is the name of our advice (we could have called this foo-bar if we wanted). And activate tells Emacs to make this work now.

added 327 characters in body
Source Link
Adam
  • 1.9k
  • 15
  • 33

I figured it out. Here is the correct form:

#+BEGIN_SRC emacs-lisp (defun my-function () (message "bingo!")) (defadvice org-edit-special (before setmy-workingbig-diradvice activate) (my-function)) #+END_SRC 

And here is a good tutorial on advising functions for anyone else who runs into this.

Looking at our revised code from left-to-right: defadvice is self-explanatory. org-edit-special is the function we are advising. before means we want our advice to happen first. by-big-advice is the name of our advice (we could have called this foo-bar if we wanted). And activate tells Emacs to make this work now.

I figured it out. Here is the correct form:

#+BEGIN_SRC emacs-lisp (defun my-function () (message "bingo!")) (defadvice org-edit-special (before set-working-dir activate) (my-function)) #+END_SRC 

And here is a good tutorial on advising functions for anyone else who runs into this.

I figured it out. Here is the correct form:

#+BEGIN_SRC emacs-lisp (defun my-function () (message "bingo!")) (defadvice org-edit-special (before my-big-advice activate) (my-function)) #+END_SRC 

And here is a good tutorial on advising functions for anyone else who runs into this.

Looking at our revised code from left-to-right: defadvice is self-explanatory. org-edit-special is the function we are advising. before means we want our advice to happen first. by-big-advice is the name of our advice (we could have called this foo-bar if we wanted). And activate tells Emacs to make this work now.

Source Link
Adam
  • 1.9k
  • 15
  • 33

I figured it out. Here is the correct form:

#+BEGIN_SRC emacs-lisp (defun my-function () (message "bingo!")) (defadvice org-edit-special (before set-working-dir activate) (my-function)) #+END_SRC 

And here is a good tutorial on advising functions for anyone else who runs into this.