unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#27056: 25.2; goto-line doesn't default to current line when used interactively when the cursor isn't over a number
@ 2017-05-24 11:19 kwc3iywb
  2017-05-24 18:03 ` Glenn Morris
  2017-05-27 13:13 ` Eli Zaretskii
  0 siblings, 2 replies; 11+ messages in thread
From: kwc3iywb @ 2017-05-24 11:19 UTC (permalink / raw)
  To: 27056


[-- Attachment #1.1: Type: text/plain, Size: 3770 bytes --]

In GNU Emacs 25.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.22.10)
 of 2017-04-22 built on juergen
Windowing system distributor 'The X.Org Foundation', version 11.0.11903000
Configured using:
 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
 --localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-modules
 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe
 -fstack-protector-strong' CPPFLAGS=-D_FORTIFY_SOURCE=2
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 MODULES

Important settings:
  value of $LANG: C
  locale-coding-system: nil

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message dired format-spec rfc822 mml
mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util help-fns help-mode easymenu
cl-loaddefs pcase cl-lib mail-prsvr mail-utils time-date mule-util
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote dbusbind inotify dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)

Memory information:
((conses 16 86260 8956)
 (symbols 48 19773 0)
 (miscs 40 46 172)
 (strings 32 14306 4139)
 (string-bytes 1 409031)
 (vectors 16 11746)
 (vector-slots 8 430626 3614)
 (floats 8 166 79)
 (intervals 56 222 112)
 (buffers 976 18))

When I press M-x goto-line, it asks me for a line number.  There used to
be a default line number, which is the current line number before
a5dcc929862f6727c71db5e45d8750f8c322c53b.  It looks like he forgot to
remove the empty elements when calling `read-from-minibuffer' from
`read-number'.  I've included the patch I used to fix this problem.
It's not obvious that `read-number' should be responsible for removing
nil in DEFAULT, it's not documented, and I didn't find any code besides
`goto-line' that relies on this behavior after grepping all the lisp
files in emacs' source, so I rewrote `read-number', and made `goto-line'
responsible for removing nils.

By the way, when looking for uses of `read-number', I found in
lisp/tar-mode.el, in lines 1023 and 1051, conversion from integer to
string, which seemed unnecessary to me.

>(read-number
> "New UID number: "
> (format "%s" (tar-header-uid descriptor)))

>(read-number
> "New GID number: "
> (format "%s" (tar-header-gid descriptor)))

[-- Attachment #1.2: 0001-index-on-master-bf4f69ab6d-vc-hg.el-Silence-byte-com.patch --]
[-- Type: text/x-diff, Size: 0 bytes --]



[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-05-28 15:03 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-24 11:19 bug#27056: 25.2; goto-line doesn't default to current line when used interactively when the cursor isn't over a number kwc3iywb
2017-05-24 18:03 ` Glenn Morris
2017-05-25  2:29   ` kwc3iywb
2017-05-25  8:52   ` kwc3iywb
2017-05-25  9:41   ` kwc3iywb
2017-05-25 10:21   ` kwc3iywb
2017-05-27  2:38   ` kwc3iywb
2017-05-27 13:13 ` Eli Zaretskii
2017-05-28  8:11   ` kwc3iywb
2017-05-28  8:18   ` kwc3iywb
2017-05-28 15:03     ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).