I used to have the below function from https://www.emacswiki.org/emacs/SearchAtPoint#h5o-6 that allows to search for symbol under the cursor by typing C-s C-w, and by typing C-w, I would append the following symbol to the search and so on. This was so convenient. Somehow, after updating emacs, things stopped working. Also, thingatpt is not available from MELPA but required here.
Any idea how to fix that or if there is an alternative?
;; Move to beginning of word before yanking word in isearch-mode.
;; Make C-s C-w and C-r C-w act like Vim's g* and g#, keeping Emacs'
;; C-s C-w [C-w] [C-w]... behaviour.
(require 'thingatpt)
(defun my-isearch-yank-word-or-char-from-beginning ()
"Move to beginning of word before yanking word in isearch-mode."
(interactive)
;; Making this work after a search string is entered by user
;; is too hard to do, so work only when search string is empty.
(if (= 0 (length isearch-string))
(beginning-of-thing 'word))
(isearch-yank-word-or-char)
;; Revert to 'isearch-yank-word-or-char for subsequent calls
(substitute-key-definition 'my-isearch-yank-word-or-char-from-beginning
'isearch-yank-word-or-char
isearch-mode-map))
(add-hook 'isearch-mode-hook
(lambda ()
"Activate my customized Isearch word yank command."
(substitute-key-definition 'isearch-yank-word-or-char
'my-isearch-yank-word-or-char-from-beginning
isearch-mode-map)))