librelist archives

« back to archive

Question for selecting a buffers to kill, and search engines

Question for selecting a buffers to kill, and search engines

From:
Hi-Angel
Date:
2014-10-06 @ 16:04
Hello, I just began using Conkeror, and stumbled upon at least two questions:

1) How to kill a buffers not one by one? I.e. I pressed «C-x k », then
how to select ones I don't want anymore?

2) How to use search engine? E.g. some shortcut which opens a
minibuffer to type a question that after I pressed <RET> being thrown
to Google or whatever (though I am already tried «C-h b», and didn't
found anything about a web search)?

Re: [conkeror] Question for selecting a buffers to kill, and search engines

From:
Scott Jaderholm
Date:
2014-10-06 @ 22:11
On Mon, Oct 6, 2014 at 9:04 AM, Hi-Angel <hiangel999@gmail.com> wrote:
> 1) How to kill a buffers not one by one? I.e. I pressed «C-x k », then
> how to select ones I don't want anymore?

I'm not sure if this fills your need, but if you press C-k while in
the menus of either C-x b or C-x k it will kill the currently selected
buffer. You can press C-k repeatedly to kill multiple buffers.
Unfortunately each kill it doesn't appear to focus what I consider the
ideal buffer afaict.

Scott

Re: [conkeror] Question for selecting a buffers to kill, and search engines

From:
Hi-Angel
Date:
2014-10-07 @ 03:41
>I'm not sure if this will be useful to you, but I
>have the following function in my conkerorrc which creates a new tab with
duckduckgo:
>
>interactive("open-new-tab", "Open new tab",
>            function (I) {
>              browser_object_follow(I.buffer, OPEN_NEW_BUFFER, 
"https://duckduckgo.com");
>            });
>define_key(content_buffer_normal_keymap, "C-t","open-new-tab");
>define_key(special_buffer_keymap, "C-t","open-new-tab");

No, open a new tab with a search engine itself to me isn't good, as at
my work I have a relatively slow internet connection, and then I'd
needed to wait until a main Web page will be loaded, next enter a
question, and wait again. (As an offtop: the funniest thing is that
this connection allows even to look a streaming video. But loading a
plain web pages sometimes takes really long. The last time I seen such
a behavior was a 3G internet: it is somehow «accelerating», i.e. when
loading just began the speed is very low. But in a next seconds it is
permanently increasing, so in the end you could comfortably see a
video)

>You might also be looking for
>
>read_url_handler_list =[read_url_make_default_webjump_handler("lucky")];
>
>which sets the default behavior of g and C-u g to do a google I'm
>feeling lucky search. You could just as easily have it do a google
>search instead.

I am not sure what it does: I added it to the «~/.conkerorrc», but
both the «g» and «C-u g» still doing «find URL in a current/new
buffer» ☹

>I'm not sure if this fills your need, but if you press C-k while in
>the menus of either C-x b or C-x k it will kill the currently selected
>buffer. You can press C-k repeatedly to kill multiple buffers.
>Unfortunately each kill it doesn't appear to focus what I consider the
>ideal buffer afaict.

Oh, that's nice! Can I somehow bind it to another button? «Ctrl» and
«k» kinda far since with this configuration my right hand supposed to
be above arrow keys to choose a buffers.

2014-10-07 2:11 GMT+04:00 Scott Jaderholm <jaderholm@gmail.com>:
> On Mon, Oct 6, 2014 at 9:04 AM, Hi-Angel <hiangel999@gmail.com> wrote:
>> 1) How to kill a buffers not one by one? I.e. I pressed «C-x k », then
>> how to select ones I don't want anymore?
>
> I'm not sure if this fills your need, but if you press C-k while in
> the menus of either C-x b or C-x k it will kill the currently selected
> buffer. You can press C-k repeatedly to kill multiple buffers.
> Unfortunately each kill it doesn't appear to focus what I consider the
> ideal buffer afaict.
>
> Scott

Re: Question for selecting a buffers to kill, and search engines

From:
Eric Abrahamsen
Date:
2014-10-07 @ 03:54
Hi-Angel <hiangel999@gmail.com> writes:

>>I'm not sure if this will be useful to you, but I
>>have the following function in my conkerorrc which creates a new tab 
with duckduckgo:
>>
>>interactive("open-new-tab", "Open new tab",
>>            function (I) {
>>              browser_object_follow(I.buffer, OPEN_NEW_BUFFER, 
"https://duckduckgo.com");
>>            });
>>define_key(content_buffer_normal_keymap, "C-t","open-new-tab");
>>define_key(special_buffer_keymap, "C-t","open-new-tab");
>
> No, open a new tab with a search engine itself to me isn't good, as at
> my work I have a relatively slow internet connection, and then I'd
> needed to wait until a main Web page will be loaded, next enter a
> question, and wait again. (As an offtop: the funniest thing is that
> this connection allows even to look a streaming video. But loading a
> plain web pages sometimes takes really long. The last time I seen such
> a behavior was a 3G internet: it is somehow «accelerating», i.e. when
> loading just began the speed is very low. But in a next seconds it is
> permanently increasing, so in the end you could comfortably see a
> video)

Someone mentioned webjumps, that's what you're looking for:

http://conkeror.org/Webjumps
http://conkeror.org/WritingWebjumps

A little OT: has anyone been able to make a webjump for
search.disconnect.me? It's pretty much the only meta search engine
that's still usable from within China, but they've done something clever
with the page source, so I can't tell where to post queries to. 

>>You might also be looking for
>>
>>read_url_handler_list =[read_url_make_default_webjump_handler("lucky")];
>>
>>which sets the default behavior of g and C-u g to do a google I'm
>>feeling lucky search. You could just as easily have it do a google
>>search instead.
>
> I am not sure what it does: I added it to the «~/.conkerorrc», but
> both the «g» and «C-u g» still doing «find URL in a current/new
> buffer» ☹
>
>>I'm not sure if this fills your need, but if you press C-k while in
>>the menus of either C-x b or C-x k it will kill the currently selected
>>buffer. You can press C-k repeatedly to kill multiple buffers.
>>Unfortunately each kill it doesn't appear to focus what I consider the
>>ideal buffer afaict.
>
> Oh, that's nice! Can I somehow bind it to another button? «Ctrl» and
> «k» kinda far since with this configuration my right hand supposed to
> be above arrow keys to choose a buffers.

On the contrary! Your hands are right where they're supposed to be,
since you're using C-n and C-p to choose your buffer :)

/ChurchOfEmacs

Eric

Re: [conkeror] Re: Question for selecting a buffers to kill, and search engines

From:
Hi-Angel
Date:
2014-10-07 @ 05:23
>Someone mentioned webjumps, that's what you're looking for:
>
>http://conkeror.org/Webjumps
>http://conkeror.org/WritingWebjumps

When I tried writing an own web jump, I found another combination, I
have no idea why it didn't mentioned in docs(or, at least, I didn't
found): if type just «g » (g and space), then all the next words
supposed to be an arguments for Google search, and more over: in this
moment Google autocompletition works! That is nice!

>On the contrary! Your hands are right where they're supposed to be,
>since you're using C-n and C-p to choose your buffer :)

Oh, I am an idiot, that was an obvious combination! Thank you very much)

Re: Question for selecting a buffers to kill, and search engines

From:
Eric Abrahamsen
Date:
2014-10-07 @ 05:50
Hi-Angel <hiangel999@gmail.com> writes:

>>Someone mentioned webjumps, that's what you're looking for:
>>
>>http://conkeror.org/Webjumps
>>http://conkeror.org/WritingWebjumps
>
> When I tried writing an own web jump, I found another combination, I
> have no idea why it didn't mentioned in docs(or, at least, I didn't
> found): if type just «g » (g and space), then all the next words
> supposed to be an arguments for Google search, and more over: in this
> moment Google autocompletition works! That is nice!

Yup, that's what makes webjumps useful!

>>On the contrary! Your hands are right where they're supposed to be,
>>since you're using C-n and C-p to choose your buffer :)
>
> Oh, I am an idiot, that was an obvious combination! Thank you very much)

My pleasure

Re: [conkeror] Re: Question for selecting a buffers to kill, and search engines

From:
Dieter Van Eessen
Date:
2014-10-07 @ 08:13
Don't remember where i found it, but I got the following in .conkerorrc
which does what you want it to do. (contains 2 functions and a keybinding).

Only thing to note: this opens the google query search results in the SAME
tab. I find this usefull because it's a key a use ALOT! If I'd create a new
tab for every time I use it, I'd soon lose overview over which pages are
opened.


interactive("find-on-google",
           "One touch googling",
           function(I){
            google_it(
              I,
              (yield I.minibuffer.read($prompt="Google search: ")));
         });

function google_it (I,query) {
  I.buffer.load("http://www.google.com/search?q="+query);
}

define_key(content_buffer_normal_keymap, "s",
"find-on-google");




On Tue, Oct 7, 2014 at 7:50 AM, Eric Abrahamsen <eric@ericabrahamsen.net>
wrote:

> Hi-Angel <hiangel999@gmail.com> writes:
>
> >>Someone mentioned webjumps, that's what you're looking for:
> >>
> >>http://conkeror.org/Webjumps
> >>http://conkeror.org/WritingWebjumps
> >
> > When I tried writing an own web jump, I found another combination, I
> > have no idea why it didn't mentioned in docs(or, at least, I didn't
> > found): if type just «g » (g and space), then all the next words
> > supposed to be an arguments for Google search, and more over: in this
> > moment Google autocompletition works! That is nice!
>
> Yup, that's what makes webjumps useful!
>
> >>On the contrary! Your hands are right where they're supposed to be,
> >>since you're using C-n and C-p to choose your buffer :)
> >
> > Oh, I am an idiot, that was an obvious combination! Thank you very much)
>
> My pleasure
>
>


-- 
gtz,
Dieter VE

Re: [conkeror] Question for selecting a buffers to kill, and search engines

From:
Axel Beckert
Date:
2014-10-06 @ 16:43
Hi,

On Mon, Oct 06, 2014 at 08:04:08PM +0400, Hi-Angel wrote:
> 1) How to kill a buffers not one by one? I.e. I pressed «C-x k », then
> how to select ones I don't want anymore?

There is the idea/plan about a buffer list mode similar to Emacs'
dired or such. But it doesn't yet exist (or isn't fully functional and
not yet merged).

I ocassionally quit conkeror and edit the autosave file manually.
Perl's json_pp (JSON Pretty Printer) helps to make it easier editable.

> 2) How to use search engine? E.g. some shortcut which opens a
> minibuffer to type a question that after I pressed <RET> being thrown
> to Google or whatever (though I am already tried «C-h b», and didn't
> found anything about a web search)?

Use g or C-x C-f to get a minibuffer prompt to open a new webpage and
type e.g. "google foobar" to search for foobar with Google. Or type
"duckduckgo foobar" to search for foobar with duckduckgo.

If you prefer different search engines, have a look at
http://conkeror.org/Webjumps

P.S. to those who know me from IRC or the old mailing list: Didn't
notice that we switched to a different list for quite a while and
subscribed to the new list only a few days ago. So in case you
wondered about me being more silent than before on the list... :-)

		Kind regards, Axel
-- 
/~\  Plain Text Ribbon Campaign                   | Axel Beckert
\ /  Say No to HTML in E-Mail and News            | abe@deuxchevaux.org  (Mail)
 X   See http://www.nonhtmlmail.org/campaign.html | abe@noone.org (Mail+Jabber)
/ \  I love long mails: http://email.is-not-s.ms/ | http://noone.org/abe/ (Web)

Re: [conkeror] Question for selecting a buffers to kill, and search engines

From:
Hi-Angel
Date:
2014-10-06 @ 19:19
Okay, thank you, I'll be hoping for a next release, the feature to
kill a selected buffer indeed is critical to me. Because at my work I
am often open pretty many buffers *(tabs for I am using chrome(ium)
yet)* while looking for a documentation/tutorials/etc… , and after a
time I have no more need in those. And it would be really hurt to type
every buffer to kill.

>Use g or C-x C-f to get a minibuffer prompt to open a new webpage and
>type e.g. "google foobar" to search for foobar with Google. Or type
>"duckduckgo foobar" to search for foobar with duckduckgo.

 I'm wonder, can I somehow bind to a key to the «find-url-new-buffer»
with e.g. a word «google » in the minibuffer that awais for the rest
of a text? I found a command «define_key()», but can't find a
documentation for it. Are here any?

2014-10-06 20:43 GMT+04:00 Axel Beckert <abe@deuxchevaux.org>:
> Hi,
>
> On Mon, Oct 06, 2014 at 08:04:08PM +0400, Hi-Angel wrote:
>> 1) How to kill a buffers not one by one? I.e. I pressed «C-x k », then
>> how to select ones I don't want anymore?
>
> There is the idea/plan about a buffer list mode similar to Emacs'
> dired or such. But it doesn't yet exist (or isn't fully functional and
> not yet merged).
>
> I ocassionally quit conkeror and edit the autosave file manually.
> Perl's json_pp (JSON Pretty Printer) helps to make it easier editable.
>
>> 2) How to use search engine? E.g. some shortcut which opens a
>> minibuffer to type a question that after I pressed <RET> being thrown
>> to Google or whatever (though I am already tried «C-h b», and didn't
>> found anything about a web search)?
>
> Use g or C-x C-f to get a minibuffer prompt to open a new webpage and
> type e.g. "google foobar" to search for foobar with Google. Or type
> "duckduckgo foobar" to search for foobar with duckduckgo.
>
> If you prefer different search engines, have a look at
> http://conkeror.org/Webjumps
>
> P.S. to those who know me from IRC or the old mailing list: Didn't
> notice that we switched to a different list for quite a while and
> subscribed to the new list only a few days ago. So in case you
> wondered about me being more silent than before on the list... :-)
>
>                 Kind regards, Axel
> --
> /~\  Plain Text Ribbon Campaign                   | Axel Beckert
> \ /  Say No to HTML in E-Mail and News            | abe@deuxchevaux.org  (Mail)
>  X   See http://www.nonhtmlmail.org/campaign.html | abe@noone.org (Mail+Jabber)
> / \  I love long mails: http://email.is-not-s.ms/ | http://noone.org/abe/ (Web)

Re: Question for selecting a buffers to kill, and search engines

From:
Seth J. Rothschild
Date:
2014-10-06 @ 20:04
Hi-Angel <hiangel999@gmail.com> writes:

I'm not sure if this will be useful to you, but I
have the following function in my conkerorrc which creates a new tab with 
duckduckgo:

interactive("open-new-tab", "Open new tab",
            function (I) {
              browser_object_follow(I.buffer, OPEN_NEW_BUFFER, 
"https://duckduckgo.com");
            });
define_key(content_buffer_normal_keymap, "C-t","open-new-tab");
define_key(special_buffer_keymap, "C-t","open-new-tab");


You might also be looking for

read_url_handler_list =[read_url_make_default_webjump_handler("lucky")];

which sets the default behavior of g and C-u g to do a google I'm
feeling lucky search. You could just as easily have it do a google
search instead.

-Seth


> Okay, thank you, I'll be hoping for a next release, the feature to
> kill a selected buffer indeed is critical to me. Because at my work I
> am often open pretty many buffers *(tabs for I am using chrome(ium)
> yet)* while looking for a documentation/tutorials/etc… , and after a
> time I have no more need in those. And it would be really hurt to type
> every buffer to kill.
>
>>Use g or C-x C-f to get a minibuffer prompt to open a new webpage and
>>type e.g. "google foobar" to search for foobar with Google. Or type
>>"duckduckgo foobar" to search for foobar with duckduckgo.
>
>  I'm wonder, can I somehow bind to a key to the «find-url-new-buffer»
> with e.g. a word «google » in the minibuffer that awais for the rest
> of a text? I found a command «define_key()», but can't find a
> documentation for it. Are here any?
>
> 2014-10-06 20:43 GMT+04:00 Axel Beckert <abe@deuxchevaux.org>:
>> Hi,
>>
>> On Mon, Oct 06, 2014 at 08:04:08PM +0400, Hi-Angel wrote:
>>> 1) How to kill a buffers not one by one? I.e. I pressed «C-x k », then
>>> how to select ones I don't want anymore?
>>
>> There is the idea/plan about a buffer list mode similar to Emacs'
>> dired or such. But it doesn't yet exist (or isn't fully functional and
>> not yet merged).
>>
>> I ocassionally quit conkeror and edit the autosave file manually.
>> Perl's json_pp (JSON Pretty Printer) helps to make it easier editable.
>>
>>> 2) How to use search engine? E.g. some shortcut which opens a
>>> minibuffer to type a question that after I pressed <RET> being thrown
>>> to Google or whatever (though I am already tried «C-h b», and didn't
>>> found anything about a web search)?
>>
>> Use g or C-x C-f to get a minibuffer prompt to open a new webpage and
>> type e.g. "google foobar" to search for foobar with Google. Or type
>> "duckduckgo foobar" to search for foobar with duckduckgo.
>>
>> If you prefer different search engines, have a look at
>> http://conkeror.org/Webjumps
>>
>> P.S. to those who know me from IRC or the old mailing list: Didn't
>> notice that we switched to a different list for quite a while and
>> subscribed to the new list only a few days ago. So in case you
>> wondered about me being more silent than before on the list... :-)
>>
>>                 Kind regards, Axel
>> --
>> /~\  Plain Text Ribbon Campaign                   | Axel Beckert
>> \ /  Say No to HTML in E-Mail and News            | abe@deuxchevaux.org  (Mail)
>>  X   See http://www.nonhtmlmail.org/campaign.html | abe@noone.org (Mail+Jabber)
>> / \  I love long mails: http://email.is-not-s.ms/ | http://noone.org/abe/ (Web)