[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Occur stack
From: |
Tom |
Subject: |
Re: Occur stack |
Date: |
Sat, 18 Jan 2014 17:01:25 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Tom <adatgyujto <at> gmail.com> writes:
>
> Here's an other experimental code which does it the other way:
> it does not store buffer contents, it reruns the command
> instead.
>
> This way memory is not an issue, because it only stores
> a short description and a restore function, but in this case
> it requires explicit support from the involved commands,
> they need to supply the function for restoring the results.
I added grep-find support too as a test and it was pretty
straightforward. The same method should work for grep too,
only the called function name has to be changed:
(defun buffer-history-save-grep-find ()
(when (eq this-command 'grep-find)
(buffer-history-save
(format "in directory '%s': %s"
default-directory command-args)
(eval `(let ((dir default-directory)
(args command-args))
(lambda ()
(let ((default-directory dir))
(grep-find args))))
t))))
(add-hook 'grep-mode-hook 'buffer-history-save-grep-find)
- Re: Occur stack, (continued)
- Re: Occur stack, Andreas Röhler, 2014/01/15
- Re: Occur stack, Tom, 2014/01/15
- Re: Occur stack, Tom, 2014/01/16
- Re: Occur stack, Andreas Röhler, 2014/01/17
- Re: Occur stack, Tom, 2014/01/17
- Re: Occur stack, Andreas Röhler, 2014/01/19
- Re: Occur stack, Tom, 2014/01/19
- Re: Occur stack, Tom, 2014/01/17
- Re: Occur stack,
Tom <=
- Re: Occur stack, Stefan Monnier, 2014/01/18
- Re: Occur stack, Tom, 2014/01/19
- Re: Occur stack, Daniel Colascione, 2014/01/19
- Re: Occur stack, Stefan Monnier, 2014/01/19
- Re: Occur stack, Tom, 2014/01/19
- Re: Occur stack, Lars Ingebrigtsen, 2014/01/18
- Re: Occur stack, Stefan Monnier, 2014/01/18
- Re: Occur stack, Juri Linkov, 2014/01/21
- Re: Occur stack, joakim, 2014/01/21
- Re: Occur stack, Juri Linkov, 2014/01/22