Ilya Zakharevich on Wed, 01 May 2019 00:06:21 +0200


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

Re: Please test pari-2.11.2 prerelease 1


On Sun, Apr 28, 2019 at 04:08:23PM +0200, Bill Allombert wrote:
> We have made available a prerelease of PARI 2.11.2 (stable).
  ???
> and the following standalone Windows binaries:
  ???
> 64bit
  ???
> <https://pari.math.u-bordeaux.fr/pub/pari/windows/snapshots/gp64-readline-2-11-2-pre1.exe>

Readline on Windows 7 is still (almost) completely unusable.  The reason
is that
  ??? by default, keys are not bound on Windows;
  ??? GP is linked with v6.2 of libreadline;
  ??? Pre-v7.0 of libreadline, INPUTRC defaults to "%HOME%/.inputrc".
    (v7.0 takes into account APPDATA, as it should.)
  ??? On Windows 7, %HOME% is not set (and setting it on non-new system
    would break configuration of already-configured software).
As a result,  INPUTRC defaults to "/.inputrc" on Windows 7?????????so
depends on the current drive.  Unusable.

The solution is to
  ??? build with v7.0 of readline.
  ??? Include the attached .inputrc.
  ??? Inform new users that it should be installed in %HOME% (if
    present) or in %APPDATA%.

Ilya

P.S.  Other (minor) gripes about ReadLine on Windows:

(A) The ???enabled??? row should include the name of term (not possible to
    find otherwise on Windows) and App (to be self-documenting), as in:
       (readline v6.2 enabled [term=msys appName=Pari-GP], extended help enabled)

    It looks like       term=dumb
      (https://fossies.org/dox/readline-7.0/terminal_8c_source.html#l00450)
    (but not in 6.2: empty or NULL?!)

(B) Sound from TAB (e.g., in the beginning of line):	see https://superuser.com/a/1108121
      But on my Win7 "Console Window Host" is not showing.
      What is shown is "System Sounds" (which is set to ???No Sounds???
      scheme ??? but it still emits the beep!).  What helps is setting
             its volume level to 1 (the sound is present ??? which is
	     helpful ??? but its loudness is not annoying at all).

(C) Control-Shift-@ works out of the box ??? but beeps.
       (Except on keyboards built with Microsoft-Keyboard_Layout_Creator.)
       

# 	This converts from .lesskey syntax (except for \177)
# perl -wlpe "s(^(\\340)([\x7f-\xff]))($1.q(\x).sprintf qq(\x2502x), ord $2)e; s(^(\\340)\^)($1\\C-); s(^(\\340(?:\\C-|\\x\w)?\S)\s+(\S.*?\S)\s*#\s*(.*))(# $3\n\x22$1\x22:\t$2)" ! >!-rl
#

set meta-flag on
set input-meta on
set output-meta on
set convert-meta off

"\C-xu":        undo
# "":             history-search-backward
C-w:            kill-region
M-w:            copy-region-as-kill
"\e/":          dynamic-complete-history
# "\340\340":	"\C-v\340"

"\C-x@":      set-mark

# v7.0 assigns to windows term  "dumb" (not in v6.2!)
# $if term=dumb

#   This is for debugging:
# perl -wle "for my $c (0x80..0xff) {print qq(\x22\\x), sprintf(qq(\x2502x), $c), qq(\x22: self-insert)}" >oo
#

$if term=nonesuch

"\x80": self-insert
"\x81": self-insert
"\x82": self-insert
"\x83": self-insert
"\x84": self-insert
"\x85": self-insert
"\x86": self-insert
"\x87": self-insert
"\x88": self-insert
"\x89": self-insert
"\x8a": self-insert
"\x8b": self-insert
"\x8c": self-insert
"\x8d": self-insert
"\x8e": self-insert
"\x8f": self-insert
"\x90": self-insert
"\x91": self-insert
"\x92": self-insert
"\x93": self-insert
"\x94": self-insert
"\x95": self-insert
"\x96": self-insert
"\x97": self-insert
"\x98": self-insert
"\x99": self-insert
"\x9a": self-insert
"\x9b": self-insert
"\x9c": self-insert
"\x9d": self-insert
"\x9e": self-insert
"\x9f": self-insert
"\xa0": self-insert
"\xa1": self-insert
"\xa2": self-insert
"\xa3": self-insert
"\xa4": self-insert
"\xa5": self-insert
"\xa6": self-insert
"\xa7": self-insert
"\xa8": self-insert
"\xa9": self-insert
"\xaa": self-insert
"\xab": self-insert
"\xac": self-insert
"\xad": self-insert
"\xae": self-insert
"\xaf": self-insert
"\xb0": self-insert
"\xb1": self-insert
"\xb2": self-insert
"\xb3": self-insert
"\xb4": self-insert
"\xb5": self-insert
"\xb6": self-insert
"\xb7": self-insert
"\xb8": self-insert
"\xb9": self-insert
"\xba": self-insert
"\xbb": self-insert
"\xbc": self-insert
"\xbd": self-insert
"\xbe": self-insert
"\xbf": self-insert
"\xc0": self-insert
"\xc1": self-insert
"\xc2": self-insert
"\xc3": self-insert
"\xc4": self-insert
"\xc5": self-insert
"\xc6": self-insert
"\xc7": self-insert
"\xc8": self-insert
"\xc9": self-insert
"\xca": self-insert
"\xcb": self-insert
"\xcc": self-insert
"\xcd": self-insert
"\xce": self-insert
"\xcf": self-insert
"\xd0": self-insert
"\xd1": self-insert
"\xd2": self-insert
"\xd3": self-insert
"\xd4": self-insert
"\xd5": self-insert
"\xd6": self-insert
"\xd7": self-insert
"\xd8": self-insert
"\xd9": self-insert
"\xda": self-insert
"\xdb": self-insert
"\xdc": self-insert
"\xdd": self-insert
"\xde": self-insert
"\xdf": self-insert
"\xe0": self-insert
"\xe1": self-insert
"\xe2": self-insert
"\xe3": self-insert
"\xe4": self-insert
"\xe5": self-insert
"\xe6": self-insert
"\xe7": self-insert
"\xe8": self-insert
"\xe9": self-insert
"\xea": self-insert
"\xeb": self-insert
"\xec": self-insert
"\xed": self-insert
"\xee": self-insert
"\xef": self-insert
"\xf0": self-insert
"\xf1": self-insert
"\xf2": self-insert
"\xf3": self-insert
"\xf4": self-insert
"\xf5": self-insert
"\xf6": self-insert
"\xf7": self-insert
"\xf8": self-insert
"\xf9": self-insert
"\xfa": self-insert
"\xfb": self-insert
"\xfc": self-insert
"\xfd": self-insert
"\xfe": self-insert
"\xff": self-insert

$endif

# These are bound by default; rebind just in case

# DOSISH down arrow
"\340P":	next-history
# DOSISH up arrow
"\340H":	previous-history
# DOSISH right arrow
"\340M":	forward-char
# DOSISH left arrow
"\340K":	backward-char

# Same, from DOS or numeric keypad

# DOSISH down arrow
"\000P":	next-history
# DOSISH up arrow
"\000H":	previous-history
# DOSISH right arrow
"\000M":	forward-char
# DOSISH left arrow
"\000K":	backward-char

#  These are expected to work on a Windows command line (versions with \000 are for numeric keypad)
# DOSISH control left arrow
"\340s":	backward-word
"\000s":	backward-word
# DOSISH control right arrow
"\340t":	forward-word
"\000t":	forward-word
# DOSISH Insert key
"\340R":	overwrite-mode
"\000R":	overwrite-mode
# DOSISH Delete key
"\340S":	delete-char
"\000S":	delete-char
# Problem: \177 may be backspace; on DOSISH it is control-backspace...
# DOSISH control backspace
"\177"    	backward-kill-word
# DOSISH control delete
"\340\x93":	kill-word
"\000\x93":	kill-word
# DOSISH Home
"\340G":	beginning-of-line
"\000G":	beginning-of-line
# DOSISH End
"\340O":	end-of-line
"\000O":	end-of-line

	# Nice to have (versions with \000 are for numeric keypad)
# DOSISH ctrl home
"\340w":	beginning-of-history
"\000w":	beginning-of-history
# DOSISH ctrl end
"\340u":	end-of-history
"\000u":	end-of-history
# DOSISH page down (less)
"\340Q":	history-search-forward
"\000Q":	history-search-forward
# DOSISH page up
"\340I":	history-search-backward 
"\000I":	history-search-backward 
# DOSISH ctrl page up
"\340\x86":	history-substr-search-backward		# Same as F12 !!! ???
### "\000\x86":	"history-substr-search-backward"	# does not work on C-NumPad_PgUp
"\000\x84":	history-substr-search-backward		# this one does
# DOSISH ctrl page down
"\340v":	history-substr-search-forward
"\000v":	history-substr-search-forward

# DOSISH control up arrow
"\340\x8d":	menu-complete-backward
"\000\x8d":	menu-complete-backward
# DOSISH control down arrow
"\340\x91":	menu-complete
"\000\x91":	menu-complete
# DOSISH Control Tab
"\000\x94":	menu-complete

	# Those with \340 (on F1-F10) and \000 (on F11-F12) do not work in readline:
# DOSISH F1 key
"\340;":	"F1"
"\000;":	"F1"
# DOSISH F2 key
"\340<":	"F2"
"\000<":	"F2"
# DOSISH F3 key
"\340=":	"F3"
"\000=":	"F3"
# DOSISH F4 key
"\340>":	"F4"
"\000>":	"F4"		# Waits until another char is pressed to emit "4"???
# DOSISH F5 key
"\340?":	"F5"
"\000?":	"F5"
# DOSISH F6 key
"\340@":	"F6"
"\000@":	"F6"
# DOSISH F7 key
"\340A":	"F7"
"\000A":	"F7"
# DOSISH F8 key
"\340B":	"F8"
"\000B":	"F8"
# DOSISH F9 key
"\340C":	"F9"
"\000C":	"F9"
# DOSISH F10 key
"\340D":	"F10"
"\000D":	"F10"
# DOSISH F11 key
"\340\x85":	"F11"
"\000\x85":	"F11"
# DOSISH F12 key
"\340\x86":	"F12"			# Same as C-PgUp !!! ???
"\000\x86":	"F12"
# DOSISH S-F1 key
"\340T":	"Shift-F1"
"\000T":	"Shift-F1"
# DOSISH S-F2 key
"\340U":	"Shift-F2"
"\000U":	"Shift-F2"
# DOSISH S-F3 key
"\340V":	"Shift-F3"
"\000V":	"Shift-F3"
# DOSISH S-F4 key
"\340W":	"Shift-F4"
"\000W":	"Shift-F4"		# Waits until another char is pressed to emit "4"???
# DOSISH S-F5 key
"\340X":	"Shift-F5"
"\000X":	"Shift-F5"
# DOSISH S-F6 key
"\340Y":	"Shift-F6"
"\000Y":	"Shift-F6"
# DOSISH S-F7 key
"\340Z":	"Shift-F7"
"\000Z":	"Shift-F7"
# DOSISH S-F8 key
"\340[":	"Shift-F8"
"\000[":	"Shift-F8"
# DOSISH S-F9 key
"\340\\":	"Shift-F9"
"\000\\":	"Shift-F9"
# DOSISH S-F10 key
"\340]":	"Shift-F10"
"\000]":	"Shift-F10"
# DOSISH S-F11 key
"\340\x87":	"Shift-F11"
"\000\x87":	"Shift-F11"
# DOSISH S-F12 key
"\340\x88":	"Shift-F12"
"\000\x88":	"Shift-F12"
# DOSISH A-F1 key
"\340h":	"Alt-F1"
"\000h":	"Alt-F1"
# DOSISH A-F2 key
"\340i":	"Alt-F2"
"\000i":	"Alt-F2"
# DOSISH A-F3 key
"\340j":	"Alt-F3"
"\000j":	"Alt-F3"
# DOSISH A-F4 key
"\340k":	"Alt-F4"
"\000k":	"Alt-F4"
# DOSISH A-F5 key
"\340l":	"Alt-F5"
"\000l":	"Alt-F5"
# DOSISH A-F6 key
"\340m":	"Alt-F6"
"\000m":	"Alt-F6"
# DOSISH A-F7 key
"\340n":	"Alt-F7"
"\000n":	"Alt-F7"
# DOSISH A-F8 key
"\340o":	"Alt-F8"
"\000o":	"Alt-F8"
# DOSISH A-F9 key
"\340p":	"Alt-F9"
"\000p":	"Alt-F9"
# DOSISH A-F10 key
"\340q":	"Alt-F10"
"\000q":	"Alt-F10"
# DOSISH A-F11 key
"\340\x8b":	"Alt-F11"
"\000\x8b":	"Alt-F11"
# DOSISH A-F12 key
"\340\x8c":	"Alt-F12"
"\000\x8c":	"Alt-F12"
# DOSISH C-F1 key
"\340^":	"Ctrl-F1"
"\000^":	"Ctrl-F1"
# DOSISH C-F2 key
"\340_":	"Ctrl-F2"
"\000_":	"Ctrl-F2"
# DOSISH C-F3 key
"\340`":	"Ctrl-F3"
"\000`":	"Ctrl-F3"
# DOSISH C-F4 key
"\340a":	"Ctrl-F4"
"\000a":	"Ctrl-F4"
# DOSISH C-F5 key
"\340b":	"Ctrl-F5"
"\000b":	"Ctrl-F5"
# DOSISH C-F6 key
"\340c":	"Ctrl-F6"
"\000c":	"Ctrl-F6"
# DOSISH C-F7 key
"\340d":	"Ctrl-F7"
"\000d":	"Ctrl-F7"
# DOSISH C-F8 key
"\340e":	"Ctrl-F8"
"\000e":	"Ctrl-F8"
# DOSISH C-F9 key
"\340f":	"Ctrl-F9"
"\000f":	"Ctrl-F9"
# DOSISH C-F10 key
"\340g":	"Ctrl-F10"
"\000g":	"Ctrl-F10"
# DOSISH C-F11 key
"\340\x89":	"Ctrl-F11"
"\000\x89":	"Ctrl-F11"
# DOSISH C-F12 key
"\340\x8a":	"Ctrl-F12"
"\000\x8a":	"Ctrl-F12"

#  Dosish Alt- special keys (\340 does not work; Alt-numpad insert chars via numeric code)
# DOSISH Alt-down arrow (\340 does not work)
"\340\xa0":	"Alt-Down"
"\000\xa0":	"Alt-down"
# DOSISH Alt-up arrow
"\340\x98":	"Alt-Up"
"\000\x98":	"Alt-up"
# 9 7f9 a 123
# DOSISH Alt-Home
"\340\x97":	"Alt-Home"
"\000\x97":	"Alt-home"
# DOSISH Alt-End
"\340\x9f":	"Alt-End"
"\000\x9f":	"Alt-end"
# DOSISH Alt-PgUp
"\340\x99":	"Alt-PgUp"
"\000\x99":	"Alt-pgup"
# DOSISH Alt-PgDn
"\340\xa1":	"Alt-PgDn"
"\000\xa1":	"Alt-pgdn"
# DOSISH Alt-Insert
"\340\xa2":	"Alt-Insert"
"\000\xa2":	"Alt-insert"
# DOSISH Alt-Delete
"\340\xa3":	"Alt-Delete"
"\000\xa3":	"Alt-delete"
# DOSISH C-Insert
"\340\x92":	"Ctrl-Insert"
"\000\x92":	"Ctrl-insert"
# C-NumPad_Slash (the only one which looks like doing something)
"\340\x95":	"Ctrl-Gray-Slash"
"\000\x95":	"Ctrl-gray-slash"


	# Do not work in readline:
# DOSISH Shift Tab
"\340\C-O":	menu-complete
"\000\C-O":	"menu-complete"
# DOSISH emacs like search all from start    Alt s
"\340\C-_":	"Alt-s"
# DOSISH emacs like search all     Alt r
"\340\C-s":	"Alt-r"
# DOSISH alt u
"\340\C-V":	"Alt-u"

# See above how F-keys behave (cannot use Shift-F11 ??); now reset
"\340\x85":     dump-functions                  # F11
"\340\x89":     dump-variables                  # C-F11
"\340\x8a":     dump-macros                     # C-F12

$if Pari-GP
"\000\x9b":		pari-backward-sexp	# Alt-left
"\000\x9d":		pari-forward-sexp	# Alt-right
# DOSISH F1 key
"\340;":		short-help		# "F1"
"\000;":		short-help		# "F1"
# DOSISH S-F1 key
"\340T":		long-help		# "Shift-F1"
"\000T":		long-help		# "Shift-F1"
# DOSISH A-F12 
"\340\x8c":		"\e-2("			# "(" with argument `-2'=TOGGLE (matching insert)
#"\000\x8c":		pari-matched-insert	# "Alt-F12"
#endif

# $endif

# "\e==":