[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Interpret #r"..." as a raw string
From: |
Alfred M. Szmidt |
Subject: |
Re: [PATCH] Interpret #r"..." as a raw string |
Date: |
Wed, 03 Mar 2021 02:31:43 -0500 |
...
(shell-command-to-string "perl -i -pE 's/(li><a
href=\"#\\S+?\">)(\\d|\\.)+ /$1/' ~/TODO.html")
...
(shell-command-to-string "notmuch search --limit=1
--sort=newest-first --output=messages 'tag:sent subject:\"work
report\"'")))
...
(shell-command-to-string
(format (concat "cd %s && git show -s '--pretty=format:%%h
(\"%%s\")' %s;"
"echo -e '\n'$?")
The above seem like they could be written in Emacs Lisp instead of
calling to shell-command-to-string.
(defvar moz-useful-functions "
function add_or_reload_url (url) {
var i = find_tab_with_url(url)
var t = \"\"
if (i < 0) {
t = gBrowser.addTab(url)
} else {
gBrowser.browsers[i].reload()
t = gBrowser.tabs[i]
}
select_tab(t)
}
")
For large swats of code, it is generally better to put the snippet
into a seperate file and then read it in.
- Re: [PATCH] Interpret #r"..." as a raw string, (continued)
- Re: [PATCH] Interpret #r"..." as a raw string, Daniel Brooks, 2021/03/02
- Re: [PATCH] Interpret #r"..." as a raw string, Dmitry Gutov, 2021/03/02
- Re: [PATCH] Interpret #r"..." as a raw string, Alan Mackenzie, 2021/03/02
- Re: [PATCH] Interpret #r"..." as a raw string, Dmitry Gutov, 2021/03/02
- Re: [PATCH] Interpret #r"..." as a raw string, Alan Mackenzie, 2021/03/02
Re: [PATCH] Interpret #r"..." as a raw string, Aurélien Aptel, 2021/03/02
Re: [PATCH] Interpret #r"..." as a raw string, Daniel Brooks, 2021/03/02
Re: [PATCH] Interpret #r"..." as a raw string, Stefan Monnier, 2021/03/02
Re: [PATCH] Interpret #r"..." as a raw string, Daniel Brooks, 2021/03/02
Re: [PATCH] Interpret #r"..." as a raw string, Andreas Schwab, 2021/03/03
Re: [PATCH] Interpret #r"..." as a raw string, Daniel Brooks, 2021/03/03
Re: [PATCH] Interpret #r"..." as a raw string, Andreas Schwab, 2021/03/03
Re: [PATCH] Interpret #r"..." as a raw string, Daniel Brooks, 2021/03/03
Re: [PATCH] Interpret #r"..." as a raw string, Daniel Brooks, 2021/03/03
Re: [PATCH] Interpret #r"..." as a raw string, Andreas Schwab, 2021/03/03