Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pre-input escapes special characters #144

Open
NightMachinery opened this issue Jul 15, 2019 · 5 comments
Open

pre-input escapes special characters #144

NightMachinery opened this issue Jul 15, 2019 · 5 comments

Comments

@NightMachinery
Copy link

(add-hook 'Man-mode-hook
            (lambda () (progn
                    (setq helm-swoop-pre-input-function
                          (lambda () (eval "^[0-9]*\\s-*"))))))

image

@NightMachinery
Copy link
Author

NightMachinery commented Jul 15, 2019

This might be the offending code, line 225:

(defun helm-swoop-pre-input-optimize ($query)
  (when $query
    (let (($regexp (list '("\+" . "\\\\+")
                         '("\*" . "\\\\*")
                         '("\#" . "\\\\#"))))
      (mapc (lambda ($r)
              (setq $query (replace-regexp-in-string (car $r) (cdr $r) $query)))
            $regexp)
      $query)))

@NightMachinery
Copy link
Author

I have nuked this offending function, and everything works for ^[0-9]+\\s-+, but ^[0-9]*\\s-* somehow causes a bug and helm-swoop's buffer doesn't show up at all.

(defun helm-swoop-pre-input-optimize ($query)
    $query) ;; disable swoop escaping

@cireu
Copy link
Collaborator

cireu commented Aug 13, 2019

Please elaborate your intention.

Is it a issue or a feature request?

@NightMachinery
Copy link
Author

@cireu It's an issue. (The * should not be quoted.) But I'm giving up on it. Feel free to close the issue.

@cireu
Copy link
Collaborator

cireu commented Aug 13, 2019

Thanks for your reply, I'll check it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants