A couple of questions from a new xiki user, regarding emacs key-bindings, xiki mode, and more

341 views
Skip to first unread message

Gabriel Dehan

unread,
Feb 19, 2013, 8:51:24 AM2/19/13
to xi...@googlegroups.com
Hello there,

I discovered Xiki a few days ago, and as I am an everyday emacs user thought I would give it a try.
I usually work in a emacs-nw in my Terminal, on my Mac.

I downloaded Emacs for Mac Os X, successfully installed Xiki and tried to play with it for a while.
It raised several issues and questions.

- First of all :
My usual workflow includes an abundant use of the C-a, C-e, C-o, C-d key bindigs. But Xiki overrides them and I can't stand the fact of having to hit C-a C-a instead of C-a when I need to.
Is there a way to easily remap those shortcuts in Xiki ?

- Secondly :
When I open a new buffer, it does not have the xiki colors, it seems to be in half-xiki mode, I mean I can write "~/Work/" and hit C-Enter or execute a "$ ls" command, which is pretty cool.
But the colors ain't there and most of the things don't work. For example if I type in a complex command, like "$ rails server" under the correct path, it will do nothing. I would not be able to do a thing except it C-g to abort, but nothing happens.
This actually work in the @welcome/ buffer.

- Thirdly : 

How do I kill one process/job launched through xiki ? Like the rails server command I launched ? I tried ctrl-a ctrl-k but not sure it is the right command. I can see a lot of "kill xxx" in the Keys menu, but can't figure out the right one.

- Also :

Most of the time (but sometimes it seems to work) when I go into Xiki "IDE" mode (Ctrl-l Ctrl-f), when I type in a directory and expand it like :

~/Work/ruby

  + projfoo/

    + bar.rb

When I try to ctrl-enter (open) my file, I just get an "Invalid bookmark t" error, an error that I get a lot actually for quite a lot of commands. What does this mean ?

- Finally :

Is there a way to autocomplete directory names ? I mean, I'd like to call my commands like `rails server` under the correct directory but it's kind of a pain to have to write  "~/Work/ruby/rails/projfoo/" and execute the command under (as shown in one of the screencasts)


Thanks a lot.

Craig Muth

unread,
Feb 19, 2013, 7:45:21 PM2/19/13
to xi...@googlegroups.com
> My usual workflow includes an abundant use of the C-a, C-e, C-o, C-d key
> bindigs. But Xiki overrides them and I can't stand the fact of having to hit
> C-a C-a instead of C-a when I need to.
> Is there a way to easily remap those shortcuts in Xiki ?

See the email to Avdi in this thread if you want to disabe the
shortcuts. If you want to remap them to something else, you can
comment out this line:

~/.el4r/init.rb
| KeyBindings.keys

And then put customized shortcuts there instead, which you can grab
from $xiki/lib/xiki/key_bindings.rb ($xiki means the dir you have xiki
installed in). Or, are you thinking of reassigning them en masse?
Like, make all the C-a prefixes be something else (like a different
control char that you use more rarely)? If so, which keys? You could
hack what with one or two lines of code in the right place.

> When I open a new buffer, it does not have the xiki colors, it seems to be
> in half-xiki mode [...]
> But the colors ain't there

Make your buffer names end with ".notes"

> I type in a complex command, like "$ rails server" under the correct path,
> it will do nothing.

Use "%" instead of "$". "$" is synchronous, for commands that will
return right away.

> How do I kill one process/job launched through xiki ? Like the rails server

When you use "%" it will run the command in a buffer, so you can go
to that buffer to kill it.

> When I try to ctrl-enter (open) my file, I just get an "Invalid bookmark t"
> error, an error that I get a lot actually for quite a lot of commands. What
> does this mean ?

Xiki used to require you to create a "t" bookmark for a file you use
to keep general (todo) notes. But it should be defaulting to
~/todo.notes if you have the latest Xiki code:

$xiki/lib/xiki/
- bookmarks.rb
| if bm_orig == "t"
| "#{File.expand_path("~")}/todo.notes"
| elsif bm_orig == "f"
| "#{File.expand_path("~")}/files.notes"

Try creating a file and giving it a "t" bookmark and see if the error
goes away (you'll probably want to create "f" also).

> Is there a way to autocomplete directory names ? I mean, I'd like to call my
> commands like `rails server` under the correct directory but it's kind of a
> pain to have to write "~/Work/ruby/rails/projfoo/" and execute the command
> under (as shown in one of the screencasts)

If you type ~/ and Control-return on it, it will expand out
(essentially like auto-complete). Immediately after it expands, you
can type a string to filter down (to "Work") and then typing Control-/
to collapse it onto the same line separated by "/". So then you'll
have "~/Work/", and can type to narrow down and build up the path.

If you're going to use the path a lot, make emacs bookmarks. For
example, if you make a "f" bookmark for that "projfoo" path, you can
put $f/ on a line and just put commands under it. Or you can type
enter+tree (meaning C-e C-t, since Xiki shortcuts are "hold control
and type the acronym") and type the bookmark and it will insert the
path for that bookmark (you can type "$" thereafter as a shortcut to
adding a "$" underneath). Also the search+commands shortcut (C-s C-c)
lets you type a bookmark for a dir, and shows you the commands you've
run in that dir recently, and lets you narrow down and re-run them
(very useful).

Btw, I'm working on improving the in-line Xiki docs for all this
stuff, so you'll be able to type "commands" or "shell" or other
relevant words and double-click on them to be guided through stuff
like the above.

--Craig

Manu

unread,
Feb 20, 2013, 2:55:48 AM2/20/13
to xi...@googlegroups.com
Hi,
an alternative to the solution Craig suggested would be to use hippie-expand to complete your dircectory names.

Thanks a lot.

Reply all
Reply to author
Forward
0 new messages