Browsing the history of commands. Inconsistency between Bash and Emacs

2014-02-13 Thread Dani Moncayo
Hello, Bash developers, (I know little about Bash, so I apologize beforehand if I say something inaccurate or nonsensical) Bug #16740 was filed today against the Emacs package, asking to remove an inconsistency between the keys employed by Emacs and Bash to browse the history of commands. See:

Re: Please accept M-p as well as C-p

2014-02-13 Thread Pierre Gaston
On Thu, Feb 13, 2014 at 1:35 PM, Ed Avis wrote: > Bash accepts the Emacs keybinding C-p to go back in the history, and C-n > to go forward. > But most of the time in Emacs (when using its minibuffer) the keys you use > are Meta-p > and Meta-n, or on a modern PC keyboard Alt-p and Alt-n. > > Curre

Please accept M-p as well as C-p

2014-02-13 Thread Ed Avis
Bash accepts the Emacs keybinding C-p to go back in the history, and C-n to go forward. But most of the time in Emacs (when using its minibuffer) the keys you use are Meta-p and Meta-n, or on a modern PC keyboard Alt-p and Alt-n. Currently entering M-p at the bash prompt gives some control chara

Re: Please accept M-p as well as C-p

2014-02-13 Thread Chet Ramey
On 2/13/14 6:35 AM, Ed Avis wrote: > Bash accepts the Emacs keybinding C-p to go back in the history, and C-n to > go forward. > But most of the time in Emacs (when using its minibuffer) the keys you use > are Meta-p > and Meta-n, or on a modern PC keyboard Alt-p and Alt-n. I am not convinced th

RE: Please accept M-p as well as C-p

2014-02-13 Thread Ed Avis
Thanks for your reply. I don't mean people running bash inside Emacs. I just mean that when running bash standalone, you use C-p to go backwards in the history, but when running Emacs standalone, you use Alt-p. Since currently Alt-p doesn't do anything in bash, it could usefully be bound to previ

Re: Please accept M-p as well as C-p

2014-02-13 Thread Chet Ramey
On 2/13/14 10:20 AM, Ed Avis wrote: > Thanks for your reply. I don't mean people running bash inside Emacs. > I just mean that when running bash standalone, you use C-p to go backwards > in the history, but when running Emacs standalone, you use Alt-p. Sure, I understand. I also argue that the t

Re: Please accept M-p as well as C-p

2014-02-13 Thread Andreas Schwab
Chet Ramey writes: > My point is that before making it the default, which ends up being > difficult to change, we try to get some data on whether or not that > would be the right default binding. Maybe people who want that binding > could do it using the existing mechanisms and see how it works.

Invalid byte sequence under UTF-8 locale generates a segmentation fault when using printf %q (ansic_quote)

2014-02-13 Thread Eduardo A . Bustamante López
Using an invalid byte sequence with printf %q segfaults bash, for a UTF-8 locale. Here are the steps to reproduce the fault: gdb local/bin/bash GNU gdb (GDB) 7.4.1-debian Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later

Re: Invalid byte sequence under UTF-8 locale generates a segmentation fault when using printf %q (ansic_quote)

2014-02-13 Thread Chet Ramey
On 2/13/14 11:33 AM, Eduardo A. Bustamante López wrote: > Using an invalid byte sequence with printf %q segfaults bash, for a > UTF-8 locale. http://lists.gnu.org/archive/html/bug-bash/2014-02/msg00033.html -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars lo

Re: Please accept M-p as well as C-p

2014-02-13 Thread Chet Ramey
On 2/13/14 11:29 AM, Andreas Schwab wrote: > AIUI there is no readline command the moves > vertically within the commandline (in readline a line always includes > any embedded newlines). That's true. How should such a command work? Move point forward and backward by a multiple of the screenwidt

Re: Please accept M-p as well as C-p

2014-02-13 Thread Andreas Schwab
Chet Ramey writes: > On 2/13/14 11:29 AM, Andreas Schwab wrote: > >> AIUI there is no readline command the moves >> vertically within the commandline (in readline a line always includes >> any embedded newlines). > > That's true. How should such a command work? Move point forward and > backward

Re: Invalid byte sequence under UTF-8 locale generates a segmentation fault when using printf %q (ansic_quote)

2014-02-13 Thread Eduardo A . Bustamante López
On Thu, Feb 13, 2014 at 11:37:27AM -0500, Chet Ramey wrote: > On 2/13/14 11:33 AM, Eduardo A. Bustamante López wrote: > > Using an invalid byte sequence with printf %q segfaults bash, for a > > UTF-8 locale. > > http://lists.gnu.org/archive/html/bug-bash/2014-02/msg00033.html Thanks! I remember th

Re: Invalid byte sequence under UTF-8 locale generates a segmentation fault when using printf %q (ansic_quote)

2014-02-13 Thread Eduardo A . Bustamante López
On Thu, Feb 13, 2014 at 11:37:27AM -0500, Chet Ramey wrote: > On 2/13/14 11:33 AM, Eduardo A. Bustamante López wrote: > > Using an invalid byte sequence with printf %q segfaults bash, for a > > UTF-8 locale. > > http://lists.gnu.org/archive/html/bug-bash/2014-02/msg00033.html > Uhm, apparently th

Re: Invalid byte sequence under UTF-8 locale generates a segmentation fault when using printf %q (ansic_quote)

2014-02-13 Thread Chet Ramey
On 2/13/14 2:32 PM, Eduardo A. Bustamante López wrote: > On Thu, Feb 13, 2014 at 11:37:27AM -0500, Chet Ramey wrote: >> On 2/13/14 11:33 AM, Eduardo A. Bustamante López wrote: >>> Using an invalid byte sequence with printf %q segfaults bash, for a >>> UTF-8 locale. I think it depends on your syste

Re: Browsing the history of commands. Inconsistency between Bash and Emacs

2014-02-13 Thread Bob Proulx
Dani Moncayo wrote: > Emacs uses M-p/M-n to browse the minibuffer history (and C-p/C-n to > move to the previous/next line in a multi-line buffer), whereas Bash > uses C-n/C-p for browsing the command history (and doesn't use M-p/M-n > for anything, AFAIK). > > It would be nice to remove this inco

Re: Please accept M-p as well as C-p

2014-02-13 Thread Bob Proulx
Andreas Schwab wrote: > Chet Ramey writes: > > Andreas Schwab wrote: > >> AIUI there is no readline command the moves > >> vertically within the commandline (in readline a line always includes > >> any embedded newlines). > > > > That's true. How should such a command work? Move point forward and

Re: Invalid byte sequence under UTF-8 locale generates a segmentation fault when using printf %q (ansic_quote)

2014-02-13 Thread Eduardo A . Bustamante López
On Thu, Feb 13, 2014 at 04:01:21PM -0500, Chet Ramey wrote: > On 2/13/14 2:32 PM, Eduardo A. Bustamante López wrote: > > On Thu, Feb 13, 2014 at 11:37:27AM -0500, Chet Ramey wrote: > >> On 2/13/14 11:33 AM, Eduardo A. Bustamante López wrote: > >>> Using an invalid byte sequence with printf %q segfa

Re: Browsing the history of commands. Inconsistency between Bash and Emacs

2014-02-13 Thread Chet Ramey
On 2/13/14, 9:40 AM, Dani Moncayo wrote: > Hello, Bash developers, > > (I know little about Bash, so I apologize beforehand if I say > something inaccurate or nonsensical) > > Bug #16740 was filed today against the Emacs package, asking to remove > an inconsistency between the keys employed by Em