> 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 +0000 Tati Chevron <chev...@swabsit.com>
> ^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 +0000 Tati Chevron <chev...@swabsit.com>
> 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.

Reply via email to