Re: Mg scroll-up issue in xterm
On 2016-01-10, Christian Weisgerberwrote: >>> I noticed issue with mg scroll-up keybinding when "xterm*locale: true" is >>> set in >>> ~/.Xresources. >>> When the above option is set, mg requires that you type C-v C-v to scroll-up >>> instead of single C-v. I'm not sure if this is bug or feature. >> > I haven't had time to look into this further, but it happens when > luit(1) is run. I just committed a fix to luit. -- Christian "naddy" Weisgerber na...@mips.inka.de
Re: Mg scroll-up issue in xterm
On 2015-12-27, Christian Weisgerberwrote: >> I noticed issue with mg scroll-up keybinding when "xterm*locale: true" is >> set in >> ~/.Xresources. >> When the above option is set, mg requires that you type C-v C-v to scroll-up >> instead of single C-v. I'm not sure if this is bug or feature. > > That would be a bug, but I can't reproduce this. I haven't had time to look into this further, but it happens when luit(1) is run. -- Christian "naddy" Weisgerber na...@mips.inka.de
Re: Mg scroll-up issue in xterm
Christian Weisgerberwrites: > On 2015-12-27, Timo Myyrä wrote: > >> I noticed issue with mg scroll-up keybinding when "xterm*locale: true" is set in >> ~/.Xresources. >> When the above option is set, mg requires that you type C-v C-v to scroll-up >> instead of single C-v. I'm not sure if this is bug or feature. > > That would be a bug, but I can't reproduce this. Just did a bit more testing. After stripping my ~/.Xresources to following: xterm*loginShell: true xterm*locale: utf-8 And using 'xrdb ~/.Xresources', opening new xterm I get the expected behaviour. If I change the config 's/utf-8/true/', use xrdb to update settings and open new Xterm I get the odd behaviour. It doesn't seem to be mg specific. The Xterm itself shows this. With first config the key combination "^v^m" inserts literal ^M to shell. With latter config shell does new line as though ^v never happened. By looking at Xterm man page seems that locale:true assumes all input is utf-8 encoded already, with locale:utf-8 xterm uses luit to convert input to utf-8 with it. So input given to xterm isn't utf-8 on OpenBSD and needs luit to convert it? Timo
Re: Mg scroll-up issue in xterm
We are seeing too much of your emails Your rudeness is crass and inappropriate. You are not obliged to read any of my posts to this or any other mailing list. Other people have read them, and that is why, besides other things, certain ports now build correctly with systrace enabled that didn't build before, and the terminfo file actually contains correctly working entries for the framebuffer console. -- Tati Chevron Perl and FORTRAN specialist. SWABSIT development and migration department. http://www.swabsit.com
Re: Mg scroll-up issue in xterm
> On Sun, Dec 27, 2015 at 06:21:41PM +0200, Timo Myyrä wrote: > I noticed issue with mg scroll-up keybinding when "xterm*locale: > true" is set in ~/.Xresources. > When the above option is set, mg requires that you type C-v C-v to > scroll-up I have this in .Xdefaults and don't have to press any of the scroll keys twice: XTerm*locale: utf8 I also have the locale(1) for character set to this: LC_CTYPE=en_US.UTF-8 > On Sun, Dec 27, 2015 at 06:21:41PM +0200, Timo Myyrä wrote: > instead of single C-v. I'm not sure if this is bug or feature. What date is the snapshot you're running? Here C-v goes down in mg and M-v goes up (as intended), are you using default key bindings for mg? Any window manager / terminal emulator key bindings that might interfere? ---8<--- skip below ---8<--- Accompanying info about scrolling direction. According to the mg(1) man page [1] they should be: C-v scroll-up M-v scroll-down scroll-up Scroll forward one page. A two-line overlap between pages is assumed. If given a repeat argument, scrolls back lines, not pages. scroll-down Scroll backwards n pages. A two-line overlap between pages is assumed. If given a repeat argument, scrolls back lines, not pages. [1]http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man1/mg.1 If your intuition told you scroll-up would go up, it's the other way in reality, and it goes down. The mg(1) tutorial [2] says this: >> Try using M-v and C-v to move up and down, one page at a time. [2]http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/usr.bin/mg/tutoria l Again more intuitive would be to have it phrased (as the order you would need them, and the order in which they come on the man page): >> Try using C-v and M-v to move down and up, one page at a time. The man page got them in the right order definition, but the meaning scroll-up going forward (is down) and scroll-down going backward (is up) similar to the Emacs manual [3] quote: You can also scroll explicitly with these commands: C-v next PageDown Scroll forward by nearly a full window (scroll-up-command). M-v prior PageUp Scroll backward (scroll-down-command). C-v (scroll-up-command) scrolls forward by nearly the whole window height. The effect is to take the two lines at the bottom of the window and put them at the top, followed by lines that were not previously visible. If point was in the text that scrolled off the top, it ends up on the window’s new topmost line. The next (or PageDown) key is equivalent to C-v. M-v (scroll-down-command) scrolls backward in a similar way. The prior (or PageUp) key is equivalent to M-v. [3]http://www.gnu.org/software/emacs/manual/html_node/emacs/Scrolling.html Think about rolling a long paper sheet between two drum rolls, so that the scroll-up-command means activate the upper drum of the paper scroll, text goes up, you move forward down the file. One can find this in the CVS tree for mg and probably fix the tutorial page to be more common sense like the man page, and optionally make clearer the man page wording for the directions of movement, though it's not "that" necessary. Sun, 27 Dec 2015 17:37:21 + Tati Chevron> ^V is traditionally used on UNIX like systems to 'insert the next > character literally', for example if you type Control-V, Enter at the > shell, you will produce ^M, or Control-V, Backspace will produce ^? > which is a backspace character. General knowledge, probably not relevant in this case though increases chance you make a mistake suggesting something. Concentrate on the man pages, included docs, FAQs, sources, mailing list threads etc before giving quick common suggestions just to say something, even if this is correct. Sun, 27 Dec 2015 17:37:21 + Tati Chevron > This is what you are seeing, the first Control-v is swallowed before > reaching mg. How are you sure this is what's happening, have you debugged this in reality, can you point code sections responsible for this? Please try it first before advising. Try to replicate it. We are seeing too much of your emails in every other thread, Mr. Tati Chevron, looks more like an advertisement for your employment company in the email signature all over the place, on the OpenBSD mailing lists like a know it all but did not participate in it person. Please don't respond to this challenge, act accordingly.
Mg scroll-up issue in xterm
Hi, I noticed issue with mg scroll-up keybinding when "xterm*locale: true" is set in ~/.Xresources. When the above option is set, mg requires that you type C-v C-v to scroll-up instead of single C-v. I'm not sure if this is bug or feature. I just found it bit odd as other bindings such as C-f, C-s etc. seem to work fine, its just the C-v that needs to be given twice. Timo
Re: Mg scroll-up issue in xterm
On Sun, Dec 27, 2015 at 06:21:41PM +0200, Timo Myyrä wrote: I noticed issue with mg scroll-up keybinding when "xterm*locale: true" is set in ~/.Xresources. When the above option is set, mg requires that you type C-v C-v to scroll-up instead of single C-v. I'm not sure if this is bug or feature. ^V is traditionally used on UNIX like systems to 'insert the next character literally', for example if you type Control-V, Enter at the shell, you will produce ^M, or Control-V, Backspace will produce ^? which is a backspace character. This is what you are seeing, the first Control-v is swallowed before reaching mg. -- Tati Chevron Perl and FORTRAN specialist. SWABSIT development and migration department. http://www.swabsit.com
Re: Mg scroll-up issue in xterm
Tati Chevronwrites: > On Sun, Dec 27, 2015 at 06:21:41PM +0200, Timo Myyrä wrote: >>I noticed issue with mg scroll-up keybinding when "xterm*locale: true" is set in >>~/.Xresources. >>When the above option is set, mg requires that you type C-v C-v to scroll-up >>instead of single C-v. I'm not sure if this is bug or feature. > > ^V is traditionally used on UNIX like systems to 'insert the next character > literally', for example if you type Control-V, Enter at the shell, you will > produce ^M, or Control-V, Backspace will produce ^? which is a backspace > character. > > This is what you are seeing, the first Control-v is swallowed before reaching > mg. If that would be the case, shouldn't the mg insert ^M for when pressed C-v C-m? Currently it inserts newline. Noticed following when trying this outside of mg in xterm running ksh. With my full Xresources file, when pressing C-v C-m it inserts literal ^M to shell prompt. In this xterm window the mg works normally. In xterm running the stripped down Xresources, in shell prompt C-v C-m inserts newline as though C-v never happened. And there the mg requires the two C-v calls to scroll up. Seems that I need to type C-v C-v C-m to get literal ^M inserted to shell prompt. I'm not seeing how Xterm*locale:true should affect the C-v use in shell. Timo
Re: Mg scroll-up issue in xterm
On 2015-12-27, Timo Myyräwrote: > I noticed issue with mg scroll-up keybinding when "xterm*locale: true" is set > in > ~/.Xresources. > When the above option is set, mg requires that you type C-v C-v to scroll-up > instead of single C-v. I'm not sure if this is bug or feature. That would be a bug, but I can't reproduce this. -- Christian "naddy" Weisgerber na...@mips.inka.de
Re: Mg scroll-up issue in xterm
On 2015-12-27, Tati Chevronwrote: > ^V is traditionally used on UNIX like systems to 'insert the next character > literally', Only if the IEXTEN flag is set on the tty. Which should obviously not be the case (and in fact isn't) when mg is running. -- Christian "naddy" Weisgerber na...@mips.inka.de