|
|
Up |
|
|
  |
|
|
  |
Author: rubikitchrubikitch Date: Aug 20, 2008 08:15
From: "spamfilteraccount@ gmail.com" gmail.com>
Subject: contentswitch.el --- switch to buffer/file by content
Date: Sat, 16 Aug 2008 09:22:57 -0700 (PDT)
Hi,
Interesting!
Contentswitch is humane interface to switch buffer.
I thought contentswitch might be implemented as an anything source.
And I blogged it, then someone really implemented contentswitch replica!
----
BTW, anything.el has evolved to the next generation.
* anything-get-sources is now pluggable, so it is easy
to define new attributes and to write plug-ins.
* Unit test at the end of file makes anything.el more robust.
* Some new attributes to make our life easy.
etc.
I'll release it soon!
|
| Show full article (0.92Kb) |
|
| | no comments |
|
  |
Author: spamfilteraccountspamfilteraccount Date: Aug 20, 2008 09:30
>
>
> Interesting!
> Contentswitch is humane interface to switch buffer.
The switch buffer thing is only an afterthought. The main purpose was
to open recent files by content, instead of name, but it turned out it
could be useful for buffer switching too.
> I thought contentswitch might be implemented as an anything source.
Yep. I wondered if anyone notices it. :) It is very well suited for an
anything,el source.
> And I blogged it, then someone really implemented contentswitch replica!
Cool! Any links to it?
|
| Show full article (1.10Kb) |
| no comments |
|
  |
Author: weberweber Date: Aug 20, 2008 11:51
On Aug 20, 1:30 pm, "spamfilteracco...@ gmail.com"
gmail.com> wrote:
>>> A little proof-of-concept package. Let me know what you think.
>
>
>> Interesting!
>> Contentswitch is humane interface to switch buffer.
>
> The switch buffer thing is only an afterthought. The main purpose was
> to open recent files by content, instead of name, but it turned out it
> could be useful for buffer switching too.
>
>> I thought contentswitch might be implemented as an anything source.
>
> Yep. I wondered if anyone notices it. :) It is very well suited for an
> anything,el source.
> ...
|
| Show full article (1.42Kb) |
| no comments |
|
  |
Author: spamfilteraccountspamfilteraccount Date: Aug 20, 2008 13:27
On Aug 20, 8:51 pm, weber gmail.com> wrote:
>
> I had problems with encrypted files (.gpg), because emacs asks for my
> passphrase when i open those. Perhaps we could use a contextswitch-
> ignore-buffers variable?
Done.
Added variable contentswitch-ignore
|
| |
| no comments |
|
  |
Author: Ted ZlatanovTed Zlatanov Date: Aug 20, 2008 14:28
On Thu, 21 Aug 2008 00:15:35 +0900 (JST) rubikitch@ ruby-lang.org wrote:
r> I thought contentswitch might be implemented as an anything source.
r> And I blogged it, then someone really implemented contentswitch replica!
r> ----
r> BTW, anything.el has evolved to the next generation.
r> * anything-get-sources is now pluggable, so it is easy
r> to define new attributes and to write plug-ins.
r> * Unit test at the end of file makes anything.el more robust.
r> * Some new attributes to make our life easy.
r> etc.
r> I'll release it soon!
I'd like to use contentswitch.el as part of my anything.el sources. Are
you saying that someone wrote that integration, or that someone wrote a
clone of contentswitch.el as a source for anything.el? Either way, I
think it's a great idea (but I hope "replica" doesn't mean unnecessary
duplication of code).
Ted
|
| |
| no comments |
|
  |
Author: Ted ZlatanovTed Zlatanov Date: Aug 21, 2008 06:50
On Wed, 20 Aug 2008 13:27:46 -0700 (PDT) "spamfilteraccount@ gmail.com" gmail.com> wrote:
sc> On Aug 20, 8:51 pm, weber gmail.com> wrote:
>>
>> I had problems with encrypted files (.gpg), because emacs asks for my
>> passphrase when i open those. Perhaps we could use a contextswitch-
>> ignore-buffers variable?
sc> Added variable contentswitch-ignore
You need to check if a file is going to be opened by Tramp; if so, it
usually requires a network trip and often is inconvenient for the user.
So you should have contentswitch-ignore be a set of options (you can set
multiples):
- regexp
- 'hidden-buffer (I know a regexp can do this, but it's convenient separately)
- 'tramp (checks if Tramp would open it)
- 'encrypted (checks if EPA would open it)
The default should be '(tramp) I think.
For me at least, it's a very cool idea that is unusable without the
change above because my recent file history is spread over 20 servers
and 5 encrypted files. I can send you a patch for the options above.
|
| Show full article (1.05Kb) |
| no comments |
|
  |
Author: spamfilteraccountspamfilteraccount Date: Aug 21, 2008 06:55
On Aug 21, 3:50 pm, Ted Zlatanov lifelogs.com> wrote:
> On Wed, 20 Aug 2008 13:27:46 -0700 (PDT) "spamfilteracco...@ gmail.com" gmail.com> wrote:
>
> You need to check if a file is going to be opened by Tramp; if so, it
> usually requires a network trip and often is inconvenient for the user.
Good point. I didn't occur to me slow network drives could be a
problem.
> For me at least, it's a very cool idea that is unusable without the
> change above because my recent file history is spread over 20 servers
> and 5 encrypted files. I can send you a patch for the options above.
Please do.
|
| |
| no comments |
|
  |
Author: Ted ZlatanovTed Zlatanov Date: Aug 21, 2008 10:31
On Thu, 21 Aug 2008 06:55:08 -0700 (PDT) "spamfilteraccount@ gmail.com" gmail.com> wrote:
sc> On Aug 21, 3:50 pm, Ted Zlatanov lifelogs.com> wrote:
>> On Wed, 20 Aug 2008 13:27:46 -0700 (PDT) "spamfilteracco...@ gmail.com" gmail.com> wrote:
>>
>> You need to check if a file is going to be opened by Tramp; if so, it
>> usually requires a network trip and often is inconvenient for the user.
sc> Good point. I didn't occur to me slow network drives could be a
sc> problem.
>> For me at least, it's a very cool idea that is unusable without the
>> change above because my recent file history is spread over 20 servers
>> and 5 encrypted files. I can send you a patch for the options above.
sc> Please do.
This was not heavily tested, so check it out for yourself. I added
defcustoms to all your user-visible variables (except for the keymap), I
hope that's OK. Users can now say
(setq contentswitch-ignore '(hidden-buffer encrypted remote))
and it will skip remote or encrypted files and hidden buffers. The
hidden-buffer option will not drop files with names starting with " "
because the function knows if you pass a buffer or not.
|
| Show full article (6.48Kb) |
| no comments |
|
  |
|
|
  |
Author: spamfilteraccountspamfilteraccount Date: Aug 22, 2008 11:08
On Aug 21, 7:31 pm, Ted Zlatanov lifelogs.com> wrote:
>
> This was not heavily tested, so check it out for yourself. I added
> defcustoms to all your user-visible variables (except for the keymap), I
> hope that's OK. Users can now say
>
> (setq contentswitch-ignore '(hidden-buffer encrypted remote))
I added your modifications with some changes.
I did not make filtering out hidden buffers an option. I doubt anyone
needs to search hidden buffers, so they are always ignored. If someone
needs them please speak up.
I added buffers with names beginning with * to contextswitch-ignore,
because searching in *Messages* and such is not very useful.
For encrypted and remote files I added separate variables. These are
global options, so there is no need to stuff them into contextswitch-
ignore. Also they are only applied to filtering unopened files. I
don't think already opened remote and encrypted files which have their
live buffers are a problem. Let me know if I'm wrong and they should
also be filtered.
|
| Show full article (1.11Kb) |
| no comments |
|
|
|
|