I am using a command which affects the entire buffer, replacing all the ocurrences of a given expression
(goto-char (point-min)) (replace-string "foo" "bar")
Is it possible to apply a command like this only to the ocurrences outside an org-babel source block? That is, only the first foo
on this example text should be replaced by bar
, but not the second one:
* Test
testing foo
#+begin_src lisp
(setq foo 3)
#+end_src