I need to extract certain information from buffer names, and I'm doing so by extracting substrings based on the position of unique characters within a buffer name string.
So, I currently am doing something like this:
(substring (buffer-name) (1+ (search "%" (buffer-name))) (search "&" (buffer-name)))
But when I do
flycheck it complains: "function 'search' from cl pacakge called at runtime".
Is there a good method of search for the first occurrence of a character within a string that I can use that doesn't require calling
(require 'cl-lib) [or
(eval-when-compile (require 'cl-lib)), which produces the same complaint]? Or would I have to write the string out to a temporary buffer?