Skip to content

Instantly share code, notes, and snippets.

@mgalgs
Last active December 16, 2015 06:38
Show Gist options
  • Save mgalgs/5392566 to your computer and use it in GitHub Desktop.
Save mgalgs/5392566 to your computer and use it in GitHub Desktop.
Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
isearch-search()
isearch-search-and-update()
(let ((string (concat "\\<" (buffer-substring-no-properties (progn (skip-syntax-backward "w_") (point)) (progn (skip-syntax-forward "w_") (point))) "\\>"))) (if (and isearch-case-fold-search (eq (quote not-yanks) search-upper-case)) (setq string (downcase string))) (setq isearch-string string isearch-message (concat isearch-message (mapconcat (quote isearch-text-char-description) string "")) isearch-yank-flag t) (isearch-search-and-update))
(progn (let ((string (concat "\\<" (buffer-substring-no-properties (progn (skip-syntax-backward "w_") (point)) (progn (skip-syntax-forward "w_") (point))) "\\>"))) (if (and isearch-case-fold-search (eq (quote not-yanks) search-upper-case)) (setq string (downcase string))) (setq isearch-string string isearch-message (concat isearch-message (mapconcat (quote isearch-text-char-description) string "")) isearch-yank-flag t) (isearch-search-and-update)))
(if (equal this-command (quote my-isearch-word-at-point)) (progn (let ((string (concat "\\<" (buffer-substring-no-properties (progn ... ...) (progn ... ...)) "\\>"))) (if (and isearch-case-fold-search (eq (quote not-yanks) search-upper-case)) (setq string (downcase string))) (setq isearch-string string isearch-message (concat isearch-message (mapconcat (quote isearch-text-char-description) string "")) isearch-yank-flag t) (isearch-search-and-update))))
(when (equal this-command (quote my-isearch-word-at-point)) (let ((string (concat "\\<" (buffer-substring-no-properties (progn (skip-syntax-backward "w_") (point)) (progn (skip-syntax-forward "w_") (point))) "\\>"))) (if (and isearch-case-fold-search (eq (quote not-yanks) search-upper-case)) (setq string (downcase string))) (setq isearch-string string isearch-message (concat isearch-message (mapconcat (quote isearch-text-char-description) string "")) isearch-yank-flag t) (isearch-search-and-update)))
my-isearch-yank-word-hook()
run-hooks(isearch-mode-hook)
isearch-mode(t t nil nil)
isearch-forward-regexp(nil 1)
call-interactively(isearch-forward-regexp)
my-isearch-word-at-point()
call-interactively(my-isearch-word-at-point record nil)
command-execute(my-isearch-word-at-point record)
execute-extended-command(nil "my-isearch-word-at-point")
call-interactively(execute-extended-command nil nil)

Repro:

  • Place cursor inside first `stuff' in test.txt
  • Run M-x my-isearch-word-at-point. Should see success.
  • Place cursor inside second `stuff' (or inside `things') in test.txt
  • Run M-x my-isearch-word-at-point. Should see failure.
things
stuff
stuff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment