From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: kwc3iywb@vfemail.net Newsgroups: gmane.emacs.bugs Subject: bug#27056: 25.2; goto-line doesn't default to current line when used interactively when the cursor isn't over a number Date: Wed, 24 May 2017 11:19:37 +0000 Message-ID: <20170524111937.GA17052@vfemail.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Bn2rw/3z4jIqBvZU" X-Trace: blaine.gmane.org 1495639876 1675 195.159.176.226 (24 May 2017 15:31:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 24 May 2017 15:31:16 +0000 (UTC) User-Agent: Mutt/1.8.2 (2017-04-18) To: 27056@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 24 17:31:12 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDYFh-0000G1-8K for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 May 2017 17:31:09 +0200 Original-Received: from localhost ([::1]:55507 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dDYFm-0001Qg-PT for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 May 2017 11:31:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39838) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dDYFf-0001Qa-70 for bug-gnu-emacs@gnu.org; Wed, 24 May 2017 11:31:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dDYFc-0004fg-0o for bug-gnu-emacs@gnu.org; Wed, 24 May 2017 11:31:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33694) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dDYFb-0004fa-So for bug-gnu-emacs@gnu.org; Wed, 24 May 2017 11:31:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dDYFb-0003JP-Mj for bug-gnu-emacs@gnu.org; Wed, 24 May 2017 11:31:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: kwc3iywb@vfemail.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 May 2017 15:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 27056 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.149563981612674 (code B ref -1); Wed, 24 May 2017 15:31:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 24 May 2017 15:30:16 +0000 Original-Received: from localhost ([127.0.0.1]:36371 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDYEp-0003IL-Bf for submit@debbugs.gnu.org; Wed, 24 May 2017 11:30:15 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37902) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDWHd-0000Dd-Ng for submit@debbugs.gnu.org; Wed, 24 May 2017 09:25:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dDWHX-0005E6-B5 for submit@debbugs.gnu.org; Wed, 24 May 2017 09:24:56 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:34930) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dDWHX-0005E2-77 for submit@debbugs.gnu.org; Wed, 24 May 2017 09:24:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57100) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dDWHV-0000PS-Pj for bug-gnu-emacs@gnu.org; Wed, 24 May 2017 09:24:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dDWHR-0005D0-Qc for bug-gnu-emacs@gnu.org; Wed, 24 May 2017 09:24:53 -0400 Original-Received: from onethreetwo.vfemail.net ([199.16.11.132]:29692 helo=vfemail.net) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dDWHR-0005CX-IG for bug-gnu-emacs@gnu.org; Wed, 24 May 2017 09:24:49 -0400 Original-Received: (qmail 19152 invoked by uid 89); 24 May 2017 13:24:43 -0000 Original-Received: from localhost (HELO freequeue.vfemail.net) (127.0.0.1) by localhost with (DHE-RSA-AES256-SHA encrypted) SMTP; 24 May 2017 13:24:39 -0000 Original-Received: (qmail 84124 invoked by uid 89); 24 May 2017 11:19:31 -0000 Original-Received: by simscan 1.4.0 ppid: 84122, pid: 84123, t: 0.0023s scanners:none Original-Received: from unknown (HELO smtp101-2.vfemail.net) (172.16.100.61) by FreeQueue with SMTP; 24 May 2017 11:19:31 -0000 Original-Received: (qmail 13270 invoked by uid 89); 24 May 2017 11:19:31 -0000 Original-Received: by simscan 1.4.0 ppid: 13241, pid: 13266, t: 2.3110s scanners:none Original-Received: from unknown (HELO vfemail.net) (a3djM2l5d2JAdmZlbWFpbC5uZXQ=@176.67.168.210) by 172.16.100.61 with ESMTPA; 24 May 2017 11:19:29 -0000 Content-Disposition: inline X-detected-operating-system: by eggs.gnu.org: FreeBSD 8.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Mailman-Approved-At: Wed, 24 May 2017 11:30:13 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:132792 Archived-At: --Bn2rw/3z4jIqBvZU Content-Type: multipart/mixed; boundary="sm4nu43k4a2Rpi4c" Content-Disposition: inline --sm4nu43k4a2Rpi4c Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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))) --sm4nu43k4a2Rpi4c Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-index-on-master-bf4f69ab6d-vc-hg.el-Silence-byte-com.patch" --sm4nu43k4a2Rpi4c-- --Bn2rw/3z4jIqBvZU Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEwDlXGhappiWTpfDDYMrq6KZEr9sFAlklbEMACgkQYMrq6KZE r9t1qQ//YMXq4FT59RaqX5oWmBOEX7muw5rA1Tg2axN3UMR4OzEma+0Ee9zm4yYU nAuFqnS6kxnRfcZvzLig9jCYVRgCJbMmBu+y8MFPkKopZh6tr53FnAZB+phickiW fz6wr9jG5sMbsgzwcX4ATq86l6UEd3UarMupkqfTYRP02wQa1Zb2GpH+rCY/H+5s wY4OGDCxLCpcNrbzSXIxm/AVc3I3qG3yYQiMNhDjeJmRVdvfwadON9Zpq0joNsvS jSAmXnu3iQplNChlMw39mARaAr2gg3Cf2d7l13nowxsebqBgxH05WohVB9Ma6ow8 jFyNAAIvpSs39TtbpRan+enC/vb3OLTCDuy2LWGlHD5tS8wPAB9VSE10yytKSewG OmRwPPht0tv6UnBYfuS2v8m0VYPsR7FuzQ3trVicAlhSGBLXcStJO9zmq1B5Zc9b gs+r3skTiygP9QfVg4qsfHtBLR+zWLimRIyLsUNVXLm9ZKjlMQHv3BKO4zlPgGtt hXXwwe01JRFaVUH6xD/5SZqWwEFIFogXFsoKhvqORQPR2x4XxGce1QdCYhvEv7b4 MI7uiYIq5TUfHYEu6FE7vujvTgejDxoaM8qnMOFey4seV7KxPtTfHIN0vQWR1Eio o3iZjIEcCMfR4ISYhYC8kdjzvIz35qJLZviP3AoeAL5KaHUuS9o= =yrBQ -----END PGP SIGNATURE----- --Bn2rw/3z4jIqBvZU--