From debbugs-submit-bounces@debbugs.gnu.org Mon May 06 10:23:24 2019 Received: (at submit) by debbugs.gnu.org; 6 May 2019 14:23:24 +0000 Received: from localhost ([127.0.0.1]:57156 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNeWZ-0008C2-Sc for submit@debbugs.gnu.org; Mon, 06 May 2019 10:23:24 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57437) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNaVH-0007Mj-He for submit@debbugs.gnu.org; Mon, 06 May 2019 06:05:48 -0400 Received: from lists.gnu.org ([209.51.188.17]:60727) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hNaV9-0006fv-Mf for submit@debbugs.gnu.org; Mon, 06 May 2019 06:05:41 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43577) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNaV7-0007k5-N7 for bug-gnu-emacs@gnu.org; Mon, 06 May 2019 06:05:39 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hNaV5-0006cu-4m for bug-gnu-emacs@gnu.org; Mon, 06 May 2019 06:05:37 -0400 Received: from mail-yw1-xc42.google.com ([2607:f8b0:4864:20::c42]:35265) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hNaV4-0006as-V0 for bug-gnu-emacs@gnu.org; Mon, 06 May 2019 06:05:35 -0400 Received: by mail-yw1-xc42.google.com with SMTP id n188so9912261ywe.2 for ; Mon, 06 May 2019 03:05:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=MhFtyEyc+re5FflECyr9VyYhCJ186ePwIiBm13MgtZk=; b=MvZ0IHzPv7kCFvEOusQ8wxe8uD9BG7gNlBn1DmMy2JmscV/O/3AG/3iv1iPk7CH8JP MFhPmfCSWzFdz/waHGNn1T4XRyeccaVSe52PVp7jF95pLUj8Hppkqsw2qeSmzQF+NQVc DjGVlHY9mrnP4zIrMDXlglT4EOioYh56JYQeLcr17ZxS9aE5/KYDCqXkISZZSF5DXR2R KU39SNdyx4UO+kjzxElzPSi5iAwj6CTNVesIsEih/KSEwFAblJHbWdqjIm71kizQdZLC bOJis/p9JYcjSLDXaYb90YOZZ+FmxWj2FWl+bvR9ZdDKhB7F1w0te30UB+xVcXr1o7Pr Me3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=MhFtyEyc+re5FflECyr9VyYhCJ186ePwIiBm13MgtZk=; b=YT6rR/yUGZjffC+OuRUyggxK4uvdjzrqBTYLEgQaZPd1VHl8/Y8oZntXkzQju9XiEc PxArL2j9v6OmA1FDY3gm7b4MYTxNeYRGanHrugmNJLQ/BnWwEY38gHv50YzeWTUwz1dA uj/OyXSjMHetY9MjUSoZKYZhLPceIJGnS9gU5vbJXju8pIkC6sJ+f4saE1h2Uu0zIpeb zxLRfjvFkBz/x8tNUYZ76cbY1OERFcS6NuPYw2/Xs38crdAg68r3aCrlQfDvLcg6Xch5 ocJiE1EwdQKKR8QWBmcNuTa0/iW/rnpIDNRaGTPAy5KMSyHbbh5+wjF1wsGu4Igspuvc 9k3A== X-Gm-Message-State: APjAAAWryOsRuvCahBMjoCguVYKJyK+9xdiIOxWpV4/6oRFLIKMar982 PbcwC1LWzn8IlUaDFr8GIqRD2JI37Sg+U8ysa2c5bJRA X-Google-Smtp-Source: APXvYqz7Ww0l73/QY4fs1dncQPsiXa+PvSP2nUZEzNaXqMbznQf28OAjwbO0i+v3GbCEbpv3mN5BIyP3I/IlvYQaD54= X-Received: by 2002:a25:360d:: with SMTP id d13mr16662291yba.277.1557137130710; Mon, 06 May 2019 03:05:30 -0700 (PDT) MIME-Version: 1.0 From: Robert Parlett Date: Mon, 6 May 2019 11:05:19 +0100 Message-ID: Subject: 26.1; emacsclient doesn't go to the desired line To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary="0000000000008aece40588353dad" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::c42 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 06 May 2019 10:23:22 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --0000000000008aece40588353dad Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable When running emacsclient with the =E2=80=9C+line=E2=80=9D option, on a file= already loaded in emacs, but not the current buffer, emacs fails to go to the desired line. This is easy to reproduce as follows :- 1. Start emacs with emacs -Q 2. In emacs, start the server with M-x server-start 3. In a shell, create some test text files :- $ man bash >f1.txt $ man top >f2.txt 4. Now run the following commands in the shell :- $ emacsclient +200 -n f1.txt $ emacsclient +300 -n f2.txt $ emacsclient +400 -n f1.txt The bug can be seen after the last emacsclient command above. The correct result would be that file f1.txt is made the current buffer, with the cursor on line 400. However, instead it is made the current buffer with the cursor remaining on line 200. In GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.7) of 2019-04-11, modified by Debian built on lcy01-amd64-021 Windowing system distributor 'The X.Org Foundation', version 11.0.12004000 System Description: Ubuntu 19.04 Recent messages: Updating buffer list...done Mark set Updating buffer list...done Mark set [3 times] Updating buffer list...done Mark set [3 times] Replaced 5 occurrences Updating buffer list...done Configured using: 'configure --build x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/var/lib --libexecdir=3D/usr/lib --localstatedir=3D/var/lib --infodir=3D/usr/share/info --mandir=3D/usr/share/man --enable-libsystemd --with-pop=3Dyes --enable-locallisppath=3D/etc/emacs:/usr/local/share/emacs/26.1/site-lisp:= /usr/local/share/emacs/site-lisp:/usr/share/emacs/26.1/site-lisp:/usr/share= /emacs/site-lisp --with-sound=3Dalsa --without-gconf --with-mailutils --build x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/var/lib --libexecdir=3D/usr/lib --localstatedir=3D/var/lib --infodir=3D/usr/share/info --mandir=3D/usr/share/man --enable-libsystemd --with-pop=3Dyes --enable-locallisppath=3D/etc/emacs:/usr/local/share/emacs/26.1/site-lisp:= /usr/local/share/emacs/site-lisp:/usr/share/emacs/26.1/site-lisp:/usr/share= /emacs/site-lisp --with-sound=3Dalsa --without-gconf --with-mailutils --with-x=3Dyes --with-x-toolkit=3Dgtk3 --with-toolkit-scroll-bars 'CFLAGS=3D-g -O2 -fdebug-prefix-map=3D/build/emacs-cQxEw2/emacs-26.1+1=3D. -fstack-protector-strong -Wformat -Werror=3Dformat-security -Wall' 'CPPFLAGS=3D-Wdate-time -D_FORTIFY_SOURCE=3D2' 'LDFLAGS=3D-Wl,-Bsymbolic-functions -Wl,-z,relro'' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 THREADS LIBSYSTEMD LCMS2 Important settings: value of $LANG: en_GB.UTF8 locale-coding-system: utf-8-unix Major mode: Fundamental Minor modes in effect: tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t size-indication-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: /usr/share/emacs/site-lisp/llvm-6.0/llvm-mode hides /usr/share/emacs/site-lisp/llvm-7/llvm-mode /usr/share/emacs/site-lisp/llvm-6.0/tablegen-mode hides /usr/share/emacs/site-lisp/llvm-7/tablegen-mode /usr/share/emacs/site-lisp/llvm-6.0/emacs hides /usr/share/emacs/site-lisp/llvm-7/emacs /usr/share/emacs/site-lisp/llvm-6.0/llvm-mode hides /usr/share/emacs/site-lisp/llvm-8/llvm-mode /usr/share/emacs/site-lisp/llvm-6.0/tablegen-mode hides /usr/share/emacs/site-lisp/llvm-8/tablegen-mode /usr/share/emacs/site-lisp/llvm-6.0/emacs hides /usr/share/emacs/site-lisp/llvm-8/emacs /usr/share/emacs/26.1/lisp/emacs-lisp/regexp-opt hides /home/rparlett/emacsinit/regexp-opt Features: (shadow sort mail-extr emacsbug message rmc puny format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils make-mode conf-mode m4-mode cl-extra thingatpt rng-xsd xsd-regexp rng-cmpct rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap sgml-mode dom nxml-util nxml-enc xmltok help-mode autoconf autoconf-mode sh-script smie executable etags xref cl-seq project eieio eieio-core eieio-loaddefs ring cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs vc-dispatcher vc-svn misearch multi-isearch cl-macs ibuf-ext edmacro kmacro ibuffer ibuffer-loaddefs seq byte-opt bytecomp byte-compile cconv vc-cvs elec-pair cus-edit cus-start cus-load wid-edit server cl-indent apropos objecticon-setup dired-x easymenu dired dired-loaddefs cl gv cl-loaddefs cl-lib time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors 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 composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray 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 lcms2 dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 517476 54974) (symbols 48 30916 1) (miscs 40 1296 2855) (strings 32 59904 5909) (string-bytes 1 1804425) (vectors 16 33815) (vector-slots 8 1553596 106048) (floats 8 81 842) (intervals 56 71779 3079) (buffers 992 163)) --0000000000008aece40588353dad Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
When running emacsclient with t= he =E2=80=9C+line=E2=80=9D option, on a file already loaded in emacs, but n= ot the current buffer, emacs fails to go to the desired line.=C2=A0 This is= easy to reproduce as follows :-
  1. Start e= macs with emacs -Q
  2. In emacs, start the server with M-x server-start=
  3. In a shell, create some test text files :-
    $ man bash >f1.tx= t
    $ man top >f2.txt
  4. Now run the following commands in the= shell :-
    $ emacsclient +200 -n f1.txt=C2=A0
    $ emacsclient +300 -n f2= .txt=C2=A0
    $ emacsclient +400 -n f1.txt=C2=A0
The bug can b= e seen after the last emacsclient command above.=C2=A0 The correct result w= ould be that file f1.txt is made the current buffer, with the cursor on lin= e 400.=C2=A0 However, instead it is made the current buffer with the cursor= remaining on line 200.


In GNU= Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.7)
= =C2=A0of 2019-04-11, modified by Debian built on lcy01-amd64-021
= Windowing system distributor 'The X.Org Foundation', version 11.0.1= 2004000
System Description: Ubuntu 19.04

Recent messages:
Updating= buffer list...done
Mark set
Updating buffer list...don= e
Mark set [3 times]
Updating buffer list...done
<= div>Mark set [3 times]
Replaced 5 occurrences
Updating = buffer list...done

Configured using:
=C2= =A0'configure --build x86_64-linux-gnu --prefix=3D/usr
=C2=A0= --sharedstatedir=3D/var/lib --libexecdir=3D/usr/lib
=C2=A0--local= statedir=3D/var/lib --infodir=3D/usr/share/info
=C2=A0--mandir=3D= /usr/share/man --enable-libsystemd --with-pop=3Dyes
=C2=A0--enabl= e-locallisppath=3D/etc/emacs:/usr/local/share/emacs/26.1/site-lisp:/usr/loc= al/share/emacs/site-lisp:/usr/share/emacs/26.1/site-lisp:/usr/share/emacs/s= ite-lisp
=C2=A0--with-sound=3Dalsa --without-gconf --with-mailuti= ls --build
=C2=A0x86_64-linux-gnu --prefix=3D/usr --sharedstatedi= r=3D/var/lib
=C2=A0--libexecdir=3D/usr/lib --localstatedir=3D/var= /lib
=C2=A0--infodir=3D/usr/share/info --mandir=3D/usr/share/man = --enable-libsystemd
=C2=A0--with-pop=3Dyes
=C2=A0--enab= le-locallisppath=3D/etc/emacs:/usr/local/share/emacs/26.1/site-lisp:/usr/lo= cal/share/emacs/site-lisp:/usr/share/emacs/26.1/site-lisp:/usr/share/emacs/= site-lisp
=C2=A0--with-sound=3Dalsa --without-gconf --with-mailut= ils --with-x=3Dyes
=C2=A0--with-x-toolkit=3Dgtk3 --with-toolkit-s= croll-bars 'CFLAGS=3D-g -O2
=C2=A0-fdebug-prefix-map=3D/build= /emacs-cQxEw2/emacs-26.1+1=3D. -fstack-protector-strong
=C2=A0-Wf= ormat -Werror=3Dformat-security -Wall' 'CPPFLAGS=3D-Wdate-time
=C2=A0-D_FORTIFY_SOURCE=3D2' 'LDFLAGS=3D-Wl,-Bsymbolic-functi= ons -Wl,-z,relro''

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOT= IFY
ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZL= IB
TOOLKIT_SCROLL_BARS GTK3 X11 THREADS LIBSYSTEMD LCMS2

Important settings:
=C2=A0 value of $LANG: en_GB= .UTF8
=C2=A0 locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effec= t:
=C2=A0 tooltip-mode: t
=C2=A0 global-eldoc-mode: t
=C2=A0 electric-indent-mode: t
=C2=A0 mouse-wheel-mode: = t
=C2=A0 menu-bar-mode: t
=C2=A0 file-name-shadow-mode:= t
=C2=A0 global-font-lock-mode: t
=C2=A0 font-lock-mod= e: t
=C2=A0 auto-composition-mode: t
=C2=A0 auto-encryp= tion-mode: t
=C2=A0 auto-compression-mode: t
=C2=A0 siz= e-indication-mode: t
=C2=A0 column-number-mode: t
=C2= =A0 line-number-mode: t
=C2=A0 transient-mark-mode: t
<= br>
Load-path shadows:
/usr/share/emacs/site-lisp/llvm-= 6.0/llvm-mode hides /usr/share/emacs/site-lisp/llvm-7/llvm-mode
/= usr/share/emacs/site-lisp/llvm-6.0/tablegen-mode hides /usr/share/emacs/sit= e-lisp/llvm-7/tablegen-mode
/usr/share/emacs/site-lisp/llvm-6.0/e= macs hides /usr/share/emacs/site-lisp/llvm-7/emacs
/usr/share/ema= cs/site-lisp/llvm-6.0/llvm-mode hides /usr/share/emacs/site-lisp/llvm-8/llv= m-mode
/usr/share/emacs/site-lisp/llvm-6.0/tablegen-mode hides /u= sr/share/emacs/site-lisp/llvm-8/tablegen-mode
/usr/share/emacs/si= te-lisp/llvm-6.0/emacs hides /usr/share/emacs/site-lisp/llvm-8/emacs
<= div>/usr/share/emacs/26.1/lisp/emacs-lisp/regexp-opt hides /home/rparlett/e= macsinit/regexp-opt

Features:
(shadow so= rt mail-extr emacsbug message rmc puny format-spec rfc822 mml
mml= -sec password-cache epa derived epg epg-config gnus-util rmail
rm= ail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231
mai= labbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
= mm-util mail-prsvr mail-utils make-mode conf-mode m4-mode cl-extra
thingatpt rng-xsd xsd-regexp rng-cmpct rng-nxml rng-valid rng-loc
rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns=
nxml-mode nxml-outln nxml-rap sgml-mode dom nxml-util nxml-enc x= mltok
help-mode autoconf autoconf-mode sh-script smie executable = etags xref
cl-seq project eieio eieio-core eieio-loaddefs ring cc= -mode cc-fonts
cc-guess cc-menus cc-cmds cc-styles cc-align cc-en= gine cc-vars cc-defs
vc-dispatcher vc-svn misearch multi-isearch = cl-macs ibuf-ext edmacro
kmacro ibuffer ibuffer-loaddefs seq byte= -opt bytecomp byte-compile cconv
vc-cvs elec-pair cus-edit cus-st= art cus-load wid-edit server cl-indent
apropos objecticon-setup d= ired-x easymenu dired dired-loaddefs cl gv
cl-loaddefs cl-lib tim= e-date mule-util tooltip eldoc electric uniquify
ediff-hook vc-ho= oks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd= tool-bar dnd fontset image regexp-opt fringe
tabulated-list repl= ace newcomment text-mode elisp-mode lisp-mode
prog-mode register = page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse j= it-lock font-lock syntax facemenu font-core
term/tty-colors 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 c= omposite charscript charprop case-table epa-hook jka-cmpr-hook
he= lp simple abbrev obarray 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-reada= ble
backquote dbusbind inotify lcms2 dynamic-setting system-font-= setting
font-render-setting move-toolbar gtk x-toolkit x multi-tt= y
make-network-process emacs)

Memory inf= ormation:
((conses 16 517476 54974)
=C2=A0(symbols 48 3= 0916 1)
=C2=A0(miscs 40 1296 2855)
=C2=A0(strings 32 59= 904 5909)
=C2=A0(string-bytes 1 1804425)
=C2=A0(vectors= 16 33815)
=C2=A0(vector-slots 8 1553596 106048)
=C2=A0= (floats 8 81 842)
=C2=A0(intervals 56 71779 3079)
=C2= =A0(buffers 992 163))

--0000000000008aece40588353dad-- From debbugs-submit-bounces@debbugs.gnu.org Tue May 07 10:21:57 2019 Received: (at 35602) by debbugs.gnu.org; 7 May 2019 14:21:58 +0000 Received: from localhost ([127.0.0.1]:59289 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hO0yj-0000hL-Hb for submit@debbugs.gnu.org; Tue, 07 May 2019 10:21:57 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59552) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hO0yh-0000h6-Ju for 35602@debbugs.gnu.org; Tue, 07 May 2019 10:21:56 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60281) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hO0yc-00028x-Ay; Tue, 07 May 2019 10:21:50 -0400 Received: from [176.228.60.248] (port=3710 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hO0yb-0001Ws-OX; Tue, 07 May 2019 10:21:50 -0400 Date: Tue, 07 May 2019 17:21:35 +0300 Message-Id: <835zqmjqfk.fsf@gnu.org> From: Eli Zaretskii To: Robert Parlett In-reply-to: (message from Robert Parlett on Mon, 6 May 2019 11:05:19 +0100) Subject: Re: bug#35602: 26.1; emacsclient doesn't go to the desired line References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35602 Cc: 35602@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Robert Parlett > Date: Mon, 6 May 2019 11:05:19 +0100 > > 1 Start emacs with emacs -Q > 2 In emacs, start the server with M-x server-start > 3 In a shell, create some test text files :- > $ man bash >f1.txt > $ man top >f2.txt > 4 Now run the following commands in the shell :- > $ emacsclient +200 -n f1.txt > $ emacsclient +300 -n f2.txt > $ emacsclient +400 -n f1.txt > > The bug can be seen after the last emacsclient command above. The correct result would be that file f1.txt is > made the current buffer, with the cursor on line 400. However, instead it is made the current buffer with the > cursor remaining on line 200. Thanks for reporting this. This is switch-to-buffer-preserve-window-point in action. Does the patch below fix the problem for you? --- lisp/server.el~0 2019-01-16 06:33:00.000000000 +0200 +++ lisp/server.el 2019-05-07 17:20:14.108225200 +0300 @@ -1655,7 +1655,14 @@ (frame-terminal)))) 'nomini 'visible (selected-window)))) (condition-case nil - (switch-to-buffer next-buffer) + ;; If the client specified a new buffer position, + ;; treat that as an explicit point-move command, and + ;; override switch-to-buffer-preserve-window-point. + (let ((switch-to-buffer-preserve-window-point + (if filepos + nil + switch-to-buffer-preserve-window-point))) + (switch-to-buffer next-buffer)) ;; After all the above, we might still have ended up with ;; a minibuffer/dedicated-window (if there's no other). (error (pop-to-buffer next-buffer))))))) From debbugs-submit-bounces@debbugs.gnu.org Wed May 08 02:07:30 2019 Received: (at 35602) by debbugs.gnu.org; 8 May 2019 06:07:30 +0000 Received: from localhost ([127.0.0.1]:60174 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOFjk-0003fT-Ho for submit@debbugs.gnu.org; Wed, 08 May 2019 02:07:30 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52184) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOFjj-0003fE-Gb for 35602@debbugs.gnu.org; Wed, 08 May 2019 02:07:27 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45576) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOFje-0006Ak-7b; Wed, 08 May 2019 02:07:22 -0400 Received: from [176.228.60.248] (port=2308 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hOFjd-0003rZ-DP; Wed, 08 May 2019 02:07:21 -0400 Date: Wed, 08 May 2019 09:07:09 +0300 Message-Id: <83h8a5iinm.fsf@gnu.org> From: Eli Zaretskii To: Robert Parlett In-reply-to: (message from Robert Parlett on Tue, 7 May 2019 23:38:14 +0100) Subject: Re: bug#35602: 26.1; emacsclient doesn't go to the desired line References: <835zqmjqfk.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35602 Cc: 35602@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) [Please use Reply to All to have the bug address on the CC list.] > From: Robert Parlett > Date: Tue, 7 May 2019 23:38:14 +0100 > > Thank you for your reply. > > I find that if the variable you mention (switch-to-buffer-preserve-window-point) is set to nil, then the problem is > indeed averted. Thanks. Did you also try the patch? It doesn't change the value of that variable, only binds it temporarily while Emacs changes the buffer in the selected window. > I should have mentioned in my original report that this bug wasn't present in previous versions; it appeared > after an update to emacs 26.1 from (I think) 25.2. That's because Emacs 26 changed the default of that variable to t. From debbugs-submit-bounces@debbugs.gnu.org Wed May 08 13:36:56 2019 Received: (at 35602-done) by debbugs.gnu.org; 8 May 2019 17:36:56 +0000 Received: from localhost ([127.0.0.1]:33942 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOQUy-0007ZC-6y for submit@debbugs.gnu.org; Wed, 08 May 2019 13:36:56 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55275) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOQUw-0007Yw-03 for 35602-done@debbugs.gnu.org; Wed, 08 May 2019 13:36:54 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55141) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOQUq-000662-O9; Wed, 08 May 2019 13:36:48 -0400 Received: from [176.228.60.248] (port=1666 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hOQUi-0004PM-KZ; Wed, 08 May 2019 13:36:46 -0400 Date: Wed, 08 May 2019 20:36:29 +0300 Message-Id: <83o94chmqq.fsf@gnu.org> From: Eli Zaretskii To: Robert Parlett In-reply-to: (message from Robert Parlett on Wed, 8 May 2019 15:20:42 +0100) Subject: Re: bug#35602: 26.1; emacsclient doesn't go to the desired line References: <835zqmjqfk.fsf@gnu.org> <83h8a5iinm.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35602-done Cc: 35602-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Robert Parlett > Date: Wed, 8 May 2019 15:20:42 +0100 > > Thanks, that makes sense now. > > I have just tried your patch by downloading the 26.2 source, editing server.el, removing server.elc, building and > installing everything to a temporary directory, and can confirm the patch works fine. Thanks, I installed the change on the emacs-26 branch, and I'm therefore closing the bug. From unknown Tue Jun 17 01:46:29 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 06 Jun 2019 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator