* rgrep buglet
@ 2009-08-11 14:26 joakim
2009-08-11 19:40 ` Glenn Morris
0 siblings, 1 reply; 4+ messages in thread
From: joakim @ 2009-08-11 14:26 UTC (permalink / raw)
To: Emacs Development
I have this function:
(defun planner-grep-unfinished-tasks ()
(interactive)
;;oddly, grep must have been run once interactively for this to work
(let ((grep-find-template (concat grep-find-template "|sort -t: -k3")))
(rgrep "#[ABCDEFGH][0-9]* *_" "*.muse" "~/Plans")))
Do the following in a fresh emacs:
m-x planner-grep-unfinished-tasks RET
you get:
-*- mode: grep; default-directory: "~/Plans/" -*-
Grep started at Tue Aug 11 16:25:43
|sort -t: -k3
/bin/bash: -c: line 0: syntax error near unexpected token `|'
/bin/bash: -c: line 0: `|sort -t: -k3'
Grep exited abnormally with code 2 at Tue Aug 11 16:25:43
But if I 1st do:
m-x rgrep RET c-g
it works fine. Why is this?
--
Joakim Verona
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: rgrep buglet
2009-08-11 14:26 rgrep buglet joakim
@ 2009-08-11 19:40 ` Glenn Morris
2009-08-11 19:55 ` Lennart Borgman
0 siblings, 1 reply; 4+ messages in thread
From: Glenn Morris @ 2009-08-11 19:40 UTC (permalink / raw)
To: joakim; +Cc: Emacs Development
joakim@verona.se wrote:
[grep does not work if the first call is non-interactive]
Probably because of `grep-compute-defaults' only being run in the
interactive case. So if you manually call `grep-compute-defaults', it
might work.
As per the comment in bug#3343, this idea may need re-thinking.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: rgrep buglet
2009-08-11 19:40 ` Glenn Morris
@ 2009-08-11 19:55 ` Lennart Borgman
2009-08-11 20:40 ` Andreas Schwab
0 siblings, 1 reply; 4+ messages in thread
From: Lennart Borgman @ 2009-08-11 19:55 UTC (permalink / raw)
To: Glenn Morris; +Cc: joakim, Emacs Development
On Tue, Aug 11, 2009 at 9:40 PM, Glenn Morris<rgm@gnu.org> wrote:
> joakim@verona.se wrote:
>
> [grep does not work if the first call is non-interactive]
>
> Probably because of `grep-compute-defaults' only being run in the
> interactive case. So if you manually call `grep-compute-defaults', it
> might work.
>
> As per the comment in bug#3343, this idea may need re-thinking.
Is there any reason not to recompute them every time if the
defcustom's have been changed? Is not this was users expect? (I have
seen several questions on this.)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-08-11 20:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-11 14:26 rgrep buglet joakim
2009-08-11 19:40 ` Glenn Morris
2009-08-11 19:55 ` Lennart Borgman
2009-08-11 20:40 ` Andreas Schwab
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.