1

How can I use occur (M-s o) to search for a string that contains a backslash, e.g. \def?

2

You need to escape the backslash with another backslash. So: M-s o \\def

See the manual node on "Syntax for Strings" for more information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.