[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH][RFC] forward/backward a word facility

From: Daniele Bellucci
Subject: Re: [PATCH][RFC] forward/backward a word facility
Date: Mon, 29 Sep 2003 22:38:57 +0200
User-agent: Mutt/1.4.1i

Hi Marco!!
before of all: thanx for your quick review...

On Mon, Sep 29, 2003 at 10:17:14PM +0200, Marco Gerards wrote:
|Daniele Bellucci <address@hidden> writes:
|> Hi All,
|> this is a little patch for grub-0.93 to add te following
|> cmdline features:
|> - C-g: move backward a word 
|> - C-l: move forward  a word
|I really like these features, but why don't you use Emacs like key
|bindings?  Read "info readline" if you want to know the key binding,
|if you don't know this already.
|M-b is move backward a word.
|M-f is move forward a word.

Absolutely agree, but is not easy to add those binding without
"big" changes in grub code... if we really want to add come M-<x> bindings
we need big changes in both real_get_cmdline and getkey sine at the 
moment, there is no way to get some M-<x> binding.

|If you will use C-g and C-l many users will be confused.

not so much if they read grub docs 8)

|Perhaps it isn't possible to use alt in GRUB, is that the problem?  (I
|remember something like that, perhaps I'm just confused)

yes, that's the problem ...
if we want to use alt key in grub shell we need big changes

|> patch looks good to me and works fine too ... but i'm not sure
|> if these features are really needed.
|> I need them with long linux kernel boot parameters (for example:
|> the recent kgdb-overethernet require at least 5 boot parameters)
|I definitely would like more key bindings for GRUB.  Not that my voice
|really counts. :)

i have more emacs like binding like:
C-SPC, C-W (to move in killbuff) but i still haven't found
the way to read both ALT and SPC keys ;(

|> BTW feedbacks are much appreciated, and if the mantainer would 
|> like to apply this patch i'll be very glad to patch "grub info " too.
|Sure, I can read a patch and comment on it.


|> --- grub-0.93.orig/stage2/char_io.c  2002-12-03 00:49:07.000000000 +0100
|> +++ grub-0.93/stage2/char_io.c       2003-09-29 21:01:47.000000000 +0200
|> @@ -649,6 +649,29 @@
|I always use "diff -u -p".  This makes it easier to read patches
|because the name of the function that was changed is shown.  So it
|your case that would be:
|diff -up grub-0.93.orig/stage2/char_io.c grub-0.93/stage2/char_io.c
|>            if (lpos > 0)
|>              cl_backward (1);
|>            break;
|> +        case 12:            /* C-l forward one word */
|> +          {
|> +            int count = 0;
|> +            while (lpos + count < llen && buf[lpos + count ] == ' ') 
|> +              count ++;
|> +            
|> +            while (lpos + count < llen && buf[lpos + count ] != ' ') 
|> +              count ++;
|> +            cl_forward(count);

..ok, i'll remember your suggestion 

|I assume that you have to follow the GCS for GRUB.  In that case you
|will have to add a space, like this:
| +             cl_forward (count);
|Perhaps there is more stuff like this in your patch.  Just read the
|GCS. :).

oops, i'm pretty confused about coding style issues, for example
in linux kernel we use something like that (cl_forward(count))
sorry for the inconvenient ...
i would be very glad to rediff if the mantainer will apply my patch.

|I always send in a changelog entry (again, see the GCS ;)).  Changelog
|entries can be written best by the person who wrote the patch IMO and
|make it easier to read a patch.
|But, like I said, I'm not a GRUB hacker; I just want to help a bit. :)

your helping efforts are very wellcome to me!!!!!
as stated before i'll be very glad to rediff according out to the GCS
if some one would apply this patch.

.i have other questions:

- is there any grub-devel irc channel?
- can anyone tellme if there is a way to parse ATL-<x> in grub shell without
  restructuring grub code too much?
- what about adding the following "emacs *LIKE* bindings":
  C-@/SPC:   set a mark
  C-w:       move text starting from the mark and ending at current position
             (or viceversa) to the killbuff
  [i allready have a patch for this]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]