2

I'm trying to add a search engine in emacs-w3m and use duckduckgo to search emacswiki

(eval-after-load "w3m-search"
  '(progn
     (setq w3m-search-engine-alist
           (append '(
                     ("emacswiki" "https://duckduckgo.com/?q=%s++site%3Aemacswiki.org&ia=web" nil)
                     ))
                     )))

It does not work as intended because of the second "%". How can we escape the % character in emacs?

Drew
  • 75,699
  • 9
  • 109
  • 225
DJJ
  • 732
  • 5
  • 19
  • 1
    Please note that `progn` and `append` are both useless in this specific snippet. I guess it was trimmed down from some real code. Also note that a recent emacs will allow the use of `with-eval-after-load`, which looks nicer (no need for a `progn` and no need to quote the form). – YoungFrog Sep 06 '16 at 08:25

1 Answers1

3

I guess internally this uses the function 'format' so you can use %% to produce one %

YoungFrog
  • 3,496
  • 15
  • 27