From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Scott Otterson Newsgroups: gmane.emacs.bugs Subject: bug#51740: 27.2; find-file-literally doesn't respect saveplace-mode Date: Tue, 9 Nov 2021 19:06:52 -0800 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000acf82605d06686a4" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6408"; mail-complaints-to="usenet@ciao.gmane.io" To: 51740@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 10 05:00:15 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mkemT-0001Pj-Km for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 10 Nov 2021 05:00:13 +0100 Original-Received: from localhost ([::1]:54176 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mkemR-0006b2-Sr for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 09 Nov 2021 23:00:11 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:33458) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mkemI-0006XQ-9c for bug-gnu-emacs@gnu.org; Tue, 09 Nov 2021 23:00:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53237) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mkemH-0006sU-WA for bug-gnu-emacs@gnu.org; Tue, 09 Nov 2021 23:00:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mkemH-0006pa-Uq for bug-gnu-emacs@gnu.org; Tue, 09 Nov 2021 23:00:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Scott Otterson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 Nov 2021 04:00:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51740 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.163651679226213 (code B ref -1); Wed, 10 Nov 2021 04:00:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 10 Nov 2021 03:59:52 +0000 Original-Received: from localhost ([127.0.0.1]:36550 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mkem7-0006oi-Ga for submit@debbugs.gnu.org; Tue, 09 Nov 2021 22:59:52 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:44146) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mke3y-0005dV-9A for submit@debbugs.gnu.org; Tue, 09 Nov 2021 22:14:18 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:54434) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mke3x-0004R8-Bx for bug-gnu-emacs@gnu.org; Tue, 09 Nov 2021 22:14:14 -0500 Original-Received: from [2607:f8b0:4864:20::236] (port=38892 helo=mail-oi1-x236.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mke3v-0006nj-76 for bug-gnu-emacs@gnu.org; Tue, 09 Nov 2021 22:14:13 -0500 Original-Received: by mail-oi1-x236.google.com with SMTP id r26so2604711oiw.5 for ; Tue, 09 Nov 2021 19:14:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharpleaf-org.20210112.gappssmtp.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=1/pMUoWHLG9uTyGWU2LsnpYQCqShV7W6fsRdE8NX+gY=; b=1o4C0zrM6HPHRXFj+9HxKhwX2xLrnAw3WYjbsANKecpVYNRdO7RfuV1TCkMy4d3U3I D6qPgRqm/087hNOmNHVkei+NPFldiQBGpv5sp631tSNCMHga4m10jNfF/wUHrMmi+wdf 8cns1oCWk0/cqozm3VuKtKPJU9k82yTtJgTs+eVUHhikyuKMwTd2IQnTEmW2MKdgC50o PucLJ/MIAcbXJhkiAQ0UOJAcWY1qGz7pSha1jGHQ+gmY6ep4mZ3TfXWFZiHhu6BcvDOd p+ZG9RAmwNfD0RbRTr9Q0aarmamfc7rvS6UZVlEp7bNkpWO34HVlit3k2YyuCNhvt9IM ctzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=1/pMUoWHLG9uTyGWU2LsnpYQCqShV7W6fsRdE8NX+gY=; b=dK04+kWuP4SRQ1k/j6vYs49OUtdLI640zobcLP54xH0psk3Pu5o+RzOcbB4JOsvwPx YfuubFM2MYQLH5+mADhjxHi2xd/FVIuHa/S/++XAwlJSisvEWsDKmIFaEmmA1uu2n/Xa vEBsqJwXCg+MVFNFwaXHVUrKRg/YAybmpipWxPItxOp/57Etf2H/Kjmc/Y570rGp2Ug2 U2VXlYszwgTthHHArGbLFjkkEQ04oqZsjjFDzH8JZvK/E0qp49qamEHW2ndCX/zkaNmr MYofN2if9Pud4l5aqAs7Px1ZlEW3VS9sbAnUrLeRdbMg95GF9wuGX24uNRwUabN/CvaK pByg== X-Gm-Message-State: AOAM533hvxAFO1lgWkA2uAuovEsbmMBeizVqny2Y2Ngau1xAgfqj9gDk k00ReIabZTkN0jEO9Ohki3iogmzpQeqAQCV46EzjiGbmcu9K3JVF X-Google-Smtp-Source: ABdhPJwAX5qMe6uGblSU6RDJPRcubqpBfbjA+WvzrAP6vRpjSQ75o+KDXJjwPvZJHvpRJH+p/NDoIaUKjiN6RYrKwpc= X-Received: by 2002:a17:90b:2389:: with SMTP id mr9mr13198316pjb.152.1636513648271; Tue, 09 Nov 2021 19:07:28 -0800 (PST) X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::236 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::236; envelope-from=scotto@sharpleaf.org; helo=mail-oi1-x236.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 09 Nov 2021 22:59:50 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:219503 Archived-At: --000000000000acf82605d06686a4 Content-Type: text/plain; charset="UTF-8" In my config file, I have (save-place-mode 1), so when I visit a file with M-x find-file, close that file, and then revisit it, the cursor is returned to its last position during the previous find-file visit. However, if I open the file with M-x find-file-literally, then the cursor always goes to the top. Also, when I later reopen the file with find-file, the previous position of the last M-x find-file is lost (the cursor goes to the top). This is a bother when I'm flipping through many files with a command like the consult package's consult-recent-file, which previews each file as you move through the recent file list. In the case of large files, consult-recent-file reverts to using find-file-literally; the result is that you can potentially lose your place in a large collection of your most used files. The simplest way to make this better is to not allow find-file-literally to change the save-place-mode state. Better would be if it opened the file at the same cursor position as would find-file, and upon exit, appropriately set the save-place-mode state. ---------- In GNU Emacs 27.2 (build 1, x86_64-w64-mingw32) of 2021-03-26 built on CIRROCUMULUS Repository revision: deef5efafb70f4b171265b896505b92b6eef24e6 Repository branch: HEAD Windowing system distributor 'Microsoft Corp.', version 10.0.22000 System Description: Microsoft Windows 10 Home (v10.0.2009.22000.282) Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Configured using: 'configure --without-dbus --host=x86_64-w64-mingw32 --without-compress-install 'CFLAGS=-O2 -static'' Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY W32NOTIFY ACL GNUTLS LIBXML2 HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS MODULES THREADS JSON PDUMPER LCMS2 GMP Important settings: value of $LANG: ENU locale-coding-system: cp1252 Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t 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 Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs text-property-search time-date subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer 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 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 threads w32notify w32 lcms2 multi-tty make-network-process emacs) Memory information: ((conses 16 47294 6213) (symbols 48 6072 1) (strings 32 16900 2165) (string-bytes 1 532003) (vectors 16 10062) (vector-slots 8 130503 11604) (floats 8 21 242) (intervals 56 235 0) (buffers 1000 11)) --000000000000acf82605d06686a4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
In my config file, I have (save-place-mode 1), so when I v= isit a file with M-x find-file, close that file, and then revisit it, the c= ursor is returned to its last position during the previous find-file visit.=

However, if I open the file with M-x find-file-literally, then the = cursor always goes to the top.=C2=A0 Also, when I later reopen the file wit= h find-file, the previous position of the last M-x find-file is lost (the c= ursor goes to the top).

This is a bother when I'm flipping throu= gh many files with a command like the consult package's consult-recent-= file, which previews each file as you move through the recent file list.=C2= =A0 In the case of large files, consult-recent-file reverts to using find-f= ile-literally; the result is that you can potentially lose your place in a = large collection of your most used files.

The simplest way to make t= his better is to not allow find-file-literally to change the save-place-mod= e state.

Better would be if it opened the file at the same cursor po= sition as would find-file, and upon exit, appropriately set the save-place-= mode state.

----------

In GNU Emacs 27.2 (build 1, x86_64-w64= -mingw32)
=C2=A0of 2021-03-26 built on CIRROCUMULUS
Repository revisi= on: deef5efafb70f4b171265b896505b92b6eef24e6
Repository branch: HEAD
= Windowing system distributor 'Microsoft Corp.', version 10.0.22000<= br>System Description: Microsoft Windows 10 Home (v10.0.2009.22000.282)
=
Recent messages:
For information about GNU Emacs and the GNU system,= type C-h C-a.

Configured using:
=C2=A0'configure --without-d= bus --host=3Dx86_64-w64-mingw32
=C2=A0--without-compress-install 'CF= LAGS=3D-O2 -static''

Configured features:
XPM JPEG TIFF G= IF PNG RSVG SOUND NOTIFY W32NOTIFY ACL GNUTLS LIBXML2
HARFBUZZ ZLIB TOOL= KIT_SCROLL_BARS MODULES THREADS JSON PDUMPER LCMS2 GMP

Important set= tings:
=C2=A0 value of $LANG: ENU
=C2=A0 locale-coding-system: cp1252=

Major mode: Lisp Interaction

Minor modes in effect:
=C2= =A0 tooltip-mode: t
=C2=A0 global-eldoc-mode: t
=C2=A0 eldoc-mode: t<= br>=C2=A0 electric-indent-mode: t
=C2=A0 mouse-wheel-mode: t
=C2=A0 t= ool-bar-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-mode: t
=C2=A0= blink-cursor-mode: t
=C2=A0 auto-composition-mode: t
=C2=A0 auto-enc= ryption-mode: t
=C2=A0 auto-compression-mode: t
=C2=A0 line-number-mo= de: t
=C2=A0 transient-mark-mode: t

Load-path shadows:
None fo= und.

Features:
(shadow sort mail-extr emacsbug message rmc puny d= ired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cac= he epa derived epg
epg-config gnus-util rmail rmail-loaddefs text-proper= ty-search time-date
subr-x seq byte-opt gv bytecomp byte-compile cconv m= m-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mai= lheader cl-loaddefs
cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util m= ail-prsvr mail-utils
tooltip eldoc electric uniquify ediff-hook vc-hooks= lisp-float-type
mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win = w32-vars
term/common-win tool-bar dnd fontset image regexp-opt fringetabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-m= ode register page tab-bar menu-bar rfn-eshadow isearch timer
select scro= ll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-color= s frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnam= ese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew gr= eek romanian slovak czech european ethiopic indian
cyrillic chinese comp= osite charscript charprop case-table epa-hook
jka-cmpr-hook help simple = abbrev obarray cl-preloaded nadvice loaddefs
button faces cus-face macro= exp files text-properties overlay sha1 md5
base64 format env code-pages = mule custom widget hashtable-print-readable
backquote threads w32notify = w32 lcms2 multi-tty make-network-process
emacs)

Memory informatio= n:
((conses 16 47294 6213)
=C2=A0(symbols 48 6072 1)
=C2=A0(string= s 32 16900 2165)
=C2=A0(string-bytes 1 532003)
=C2=A0(vectors 16 1006= 2)
=C2=A0(vector-slots 8 130503 11604)
=C2=A0(floats 8 21 242)
=C2= =A0(intervals 56 235 0)
=C2=A0(buffers 1000 11))
--000000000000acf82605d06686a4--