From unknown Fri Aug 15 14:14:57 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#65055 <65055@debbugs.gnu.org> To: bug#65055 <65055@debbugs.gnu.org> Subject: Status: 30.0.50; save-place-abbreviation-file-names :set fails for saveplace-pdf-view places Reply-To: bug#65055 <65055@debbugs.gnu.org> Date: Fri, 15 Aug 2025 21:14:57 +0000 retitle 65055 30.0.50; save-place-abbreviation-file-names :set fails for sa= veplace-pdf-view places=20 reassign 65055 emacs submitter 65055 Visuwesh severity 65055 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 04 12:15:34 2023 Received: (at submit) by debbugs.gnu.org; 4 Aug 2023 16:15:34 +0000 Received: from localhost ([127.0.0.1]:54621 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qRxSf-00045D-CV for submit@debbugs.gnu.org; Fri, 04 Aug 2023 12:15:34 -0400 Received: from lists.gnu.org ([2001:470:142::17]:56320) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qRxSd-00044x-KG for submit@debbugs.gnu.org; Fri, 04 Aug 2023 12:15:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qRxSX-00014U-N8 for bug-gnu-emacs@gnu.org; Fri, 04 Aug 2023 12:15:25 -0400 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qRxSU-0000Gs-FB for bug-gnu-emacs@gnu.org; Fri, 04 Aug 2023 12:15:25 -0400 Received: by mail-pf1-x443.google.com with SMTP id d2e1a72fcca58-687087d8ddaso2065318b3a.1 for ; Fri, 04 Aug 2023 09:15:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691165720; x=1691770520; h=mime-version:user-agent:message-id:date:subject:to:from:from:to:cc :subject:date:message-id:reply-to; bh=txyCMBM/rJWdA/HGU7uGKi7/sIsxNxFL3qYw4WqJNts=; b=gOsPyxFdDYSGsa16cwHAeBRuxcjwUnfpBcnL8Xq9396K2W6ALj6qeMo/QUZoSwqLC2 m2KqvA8sSdfCaSX27DWBzenZV+RgtWrt6gDIpl8E1dNvzVj/tJzrtvctmP7yA611OZh0 bSIy+sO+km/UsR+R3RP6d5iL16QZTvTB/N3uNFn24Pk0K5nTGfG/g4yw1uXfUBMTa+qh KpHNq3wFan1x7JZTH2O4iQyYnpiizIJj1S/qaUitGjZ8OFFN9Dip3Ii9qZ3b4eyvJ/2I sDOZ+4JXqxIHaP6woFP5Jlz52qBD++aM3Zy7o8XxT4br7ZTcdhPihLR0zgh5nwFVSr0c mg5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691165720; x=1691770520; h=mime-version:user-agent:message-id:date:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=txyCMBM/rJWdA/HGU7uGKi7/sIsxNxFL3qYw4WqJNts=; b=YC1V/MnVQc+3NiZ3ZffvFq1FMXRC0GAlrp9xvF5FUxtBbU5G0692mKAD6zQG1knNbX 4W0PisBjaFj7aEWAZzhiC95SQh6IpodNsEIjwMoLV88rEVUi13r2msZSG7IpK9b8+JCC IBQ/wcr3WpaNsLOrKos7+o3Dx5rmgo9IptQDw6Wro73izoyaDQkk1MmkEX02fnS+D/tF MKODc+fYLl+jH/O3p7gHTAP3+rO5mIu6J3wtevTKfRSnAzS6otG9B3SaCa3wlpXKN5ew jMoRHsMlDynBfpZPr0Lo/mSpIqwsoRzNGA+NuDK+k5acOF7F5ZbzgtaKEJcNSiKWkAZ2 7t0Q== X-Gm-Message-State: AOJu0Yx1uessd3YrsPSf1fI9dy9J7/jtSs9AhVT0Z0to1uO119YWAw8J Sd7d6q3yKxoa4xp3jE0EuAtAv9MgNZXF5Q== X-Google-Smtp-Source: AGHT+IHFsS3kfuFZHiPXAu1P021aCoNeoBJg5AODbX0TENsutsnBT4yEIxfshv2hwinFfU6qI9i3Sg== X-Received: by 2002:a05:6a00:194a:b0:687:596e:fa6a with SMTP id s10-20020a056a00194a00b00687596efa6amr2729128pfk.16.1691165720188; Fri, 04 Aug 2023 09:15:20 -0700 (PDT) Received: from localhost ([115.240.90.130]) by smtp.gmail.com with ESMTPSA id k18-20020aa78212000000b00686a80f431dsm1757250pfi.126.2023.08.04.09.15.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Aug 2023 09:15:19 -0700 (PDT) From: Visuwesh To: bug-gnu-emacs@gnu.org Subject: 30.0.50; save-place-abbreviation-file-names :set fails for saveplace-pdf-view places Date: Fri, 04 Aug 2023 21:45:04 +0530 Message-ID: <87edki4wdz.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::443; envelope-from=visuweshm@gmail.com; helo=mail-pf1-x443.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit 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: -0.0 (/) saveplace-pdf-view package [1] uses a custom "place" format to save and restore the last position for PDF files viewed via doc-view package. One such "place" is ("/home/viz/tmp/piron1976.pdf" (pdf-view-bookmark "piron1976.pdf" (filename . "~/tmp/piron1976.pdf") (position . 1) (last-modified 25805 5369 546130 641000) (page . 2) (slice) (size . fit-width) (origin) (handler . pdf-view-bookmark-jump-handler))) This fails with the following backtrace because (cdr (pdf-view-bookmark ...) is a list, Debugger entered--Lisp error: (wrong-type-argument stringp ("piron1976.pdf" (filename . "~/tmp/piron1976.pdf") (position . 1) (last-modified 25805 5369 546130 641000) (page . 2) (slice) (size . fit-width) (origin) (handler . pdf-view-bookmark-jump-handler))) expand-file-name(("piron1976.pdf" (filename . "~/tmp/piron1976.pdf") (position . 1) (last-modified 25805 5369 546130 641000) (page . 2) (slice) (size . fit-width) (origin) (handler . pdf-view-bookmark-jump-handler))) #f(compiled-function (sym val) #)(save-place-abbreviate-file-names nil) custom-initialize-reset(save-place-abbreviate-file-names (funcall #'#f(compiled-function () #))) custom-declare-variable(save-place-abbreviate-file-names (funcall #'#f(compiled-function () #)) "If non-nil, abbreviate file names before saving th..." :type boolean :set #f(compiled-function (sym val) #) :version "28.1") byte-code("\300\301\302\303\304DD\305\306\307\310\311\312\313&\11\210\300\314\302\303\315DD\316\306\307%\210\300\317\302\303\320DD\321\306\322%\210\300\323\302\303\324DD\325\312..." [custom-declare-variable save-place-abbreviate-file-names funcall function #f(compiled-function () #) "If non-nil, abbreviate file names before saving th..." :type boolean :set #f(compiled-function (sym val) #) :version "28.1" save-place-save-skipped #f(compiled-function () #) "If non-nil, remember files matching `save-place-sk..." save-place-skip-check-regexp #f(compiled-function () #) "Regexp whose file names shall not be checked for r..." regexp save-place-ignore-files-regexp #f(compiled-function () #) "Regexp matching files for which no position should..." "24.1"] 10) require(saveplace) eval-buffer(# nil "/home/viz/lib/emacs/straight/build/saveplace-pdf-v..." nil t) ; Reading at buffer position 1694 load-with-code-conversion("/home/viz/lib/emacs/straight/build/saveplace-pdf-v..." "/home/viz/lib/emacs/straight/build/saveplace-pdf-v..." nil t) require(saveplace-pdf-view) (progn (require 'saveplace-pdf-view)) eval((progn (require 'saveplace-pdf-view)) t) elisp--eval-last-sexp(nil) eval-last-sexp(nil) (eros--eval-overlay (eval-last-sexp eval-last-sexp-arg-internal) (point)) eros-eval-last-sexp(nil) funcall-interactively(eros-eval-last-sexp nil) call-interactively(eros-eval-last-sexp nil nil) command-execute(eros-eval-last-sexp) Checking if the cdr of that list is a string before calling expand-file-name/abbreviate-file-name fixes the issue for me. Will attach patch once bug number is generated. 1. https://github.com/nicolaisingh/saveplace-pdf-view In GNU Emacs 30.0.50 (build 3, x86_64-pc-linux-gnu, X toolkit, Xaw scroll bars) of 2023-08-04 built on astatine Repository revision: 60e5f212182ca2f41f89a4315075e38433bc8ac0 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101007 System Description: Debian GNU/Linux trixie/sid Configured using: 'configure --with-sound=alsa --with-x-toolkit=lucid --with-json --without-xaw3d --without-gconf --without-libsystemd --without-cairo' Configured features: ACL DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LIBOTF LIBSELINUX LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11 XDBE XFT XIM XINPUT2 XPM LUCID ZLIB Important settings: value of $LC_MONETARY: ta_IN.UTF-8 value of $LC_NUMERIC: ta_IN.UTF-8 value of $LANG: en_GB.UTF-8 locale-coding-system: utf-8-unix Major mode: Ement-Room:Not-syncing Minor modes in effect: buffer-face-mode: t recentf-mode: t server-mode: t eros-mode: t pdf-occur-global-minor-mode: t vz/random-frame-background-mode: t minibuffer-depth-indicate-mode: t repeat-mode: t display-time-mode: t display-battery-mode: t delete-selection-mode: t xterm-mouse-mode: t emacs-gc-stats-mode: t straight-use-package-mode: t straight-package-neutering-mode: t tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t use-hard-newlines: t tab-bar-history-mode: t tab-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t undelete-frame-mode: t buffer-read-only: t visual-line-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (shadow flyspell ispell ecomplete dabbrev emacsbug tramp-cmds log-edit vc-dir whitespace cus-start cc-mode-expansions cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs ffap find-dired grep wdired gnus-dired ement-tabulated-room-list ement ement-notify ement-room dns ement-room-list ement-lib ement-api ement-structs plz ement-macros taxy-magit-section magit-section benchmark taxy svg-lib persist xref mule-util inspector edebug sort gnus-cite mm-archive mail-extr textsec uni-scripts idna-mapping ucs-normalize uni-confusable textsec-check gnus-async gnus-bcklg gnus-ml network-stream nsm nndraft nnmh nndoc nnmaildir nnagent nnml nnnil gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls dig nntp gnus-cache gnus-sum shr pixel-fill kinsoku url-file svg gnus-group gnus-undo gnus-start gnus-dbus gnus-cloud nnimap nnmail mail-source utf7 nnoo gnus-spec gnus-int gnus-range message sendmail yank-media puny rfc822 mml mml-sec epa epg rfc6068 epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader gnus-win gnus nnheader gnus-util mail-utils range mm-util mail-prsvr sh-script smie treesit executable smerge-mode add-log expand-region text-mode-expansions er-basic-expansions expand-region-core expand-region-custom bug-reference help-fns radix-tree cl-print pulse color avy misearch multi-isearch shell-command+ face-remap reveal noutline outline tramp-cache time-stamp tramp-sh tramp trampver tramp-integration files-x tramp-message tramp-compat xdg shell pcomplete parse-time iso8601 tramp-loaddefs recentf tree-widget vc-backup log-view pcvs-util vc diff vc-git diff-mode vc-dispatcher typo inline cursor-sensor server paredit edmacro kmacro eros checkdoc lisp-mnt flymake-proc flymake project warnings thingatpt notifications time-date wordel-autoloads mines-autoloads sokoban-autoloads ement-autoloads svg-lib-autoloads taxy-magit-section-autoloads magit-section-autoloads dash-autoloads taxy-autoloads persist-autoloads plz-autoloads nov-autoloads esxml-autoloads kv-autoloads transmission-autoloads csv-mode-autoloads lua-mode-autoloads nix-mode-autoloads gnuplot-autoloads go-mode-autoloads racket-mode-autoloads eros-autoloads writegood-mode-autoloads siege-mode-autoloads paredit-autoloads puni-autoloads expand-region-autoloads filladapt-autoloads compose scroll-other-window org-pdftools-autoloads org-noter-autoloads change-env-autoloads math-delimiters-autoloads doct-autoloads ob-async-autoloads async-autoloads emacs-ob-racket-autoloads valign-autoloads cdlatex-autoloads auctex-autoloads tex-site tempo pdf-occur ibuf-ext ibuffer ibuffer-loaddefs tablist advice tablist-filter semantic/wisent/comp semantic/wisent semantic/wisent/wisent semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local cedet pdf-isearch let-alist pdf-misc imenu pdf-tools package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse auth-source eieio eieio-core json url-vars compile comint ansi-osc ansi-color ring cus-edit wid-edit pdf-view password-cache bookmark text-property-search jka-compr pdf-cache pdf-info tq pdf-util pdf-macs image-mode exif pdf-tools-autoloads tablist-autoloads typo-autoloads mb-depth repeat visual-fill-autoloads olivetti-autoloads time format-spec battery filenotify dom tamil99 quail disp-table lacarte-autoloads shell-command-plus-autoloads icons delsel xt-mouse cus-load avy-autoloads skeleton icalendar diary-lib diary-loaddefs cal-menu calendar cal-loaddefs dired-du-autoloads finder-inf dired-x filecache imenu-xref-autoloads ert map byte-opt pp ewoc debug backtrace find-func dbus xml derived chemtable-autoloads molar-mass-autoloads vc-backup-autoloads compat-autoloads saveplace-pdf-view-autoloads rx inspector-autoloads xr-autoloads emacs-gc-stats easy-mmode pcase dired-aux dired dired-loaddefs emacs-gc-stats-autoloads straight-autoloads cl-seq info cl-extra help-mode straight subr-x cl-macs gv cl-loaddefs cl-lib bytecomp byte-compile vz-nh-theme vz-options-theme rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode 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 lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine 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 emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify dynamic-setting system-font-setting font-render-setting x-toolkit xinput2 x multi-tty move-toolbar make-network-process emacs) Memory information: ((conses 16 983800 273359) (symbols 48 42908 28) (strings 32 226910 9992) (string-bytes 1 12254797) (vectors 16 104106) (vector-slots 8 2152690 189597) (floats 8 895 10919) (intervals 56 24419 1685) (buffers 976 78)) From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 04 12:18:50 2023 Received: (at 65055) by debbugs.gnu.org; 4 Aug 2023 16:18:50 +0000 Received: from localhost ([127.0.0.1]:54633 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qRxVp-0004CJ-RO for submit@debbugs.gnu.org; Fri, 04 Aug 2023 12:18:50 -0400 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]:61595) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qRxVo-0004C1-Cz for 65055@debbugs.gnu.org; Fri, 04 Aug 2023 12:18:48 -0400 Received: by mail-pf1-x442.google.com with SMTP id d2e1a72fcca58-68706b39c4cso1663347b3a.2 for <65055@debbugs.gnu.org>; Fri, 04 Aug 2023 09:18:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691165922; x=1691770722; h=content-disposition:mime-version:user-agent:message-id:date :references:in-reply-to:subject:to:from:from:to:cc:subject:date :message-id:reply-to; bh=eGad7VGYYShIXikrCMknpqfhud0A9rox5pg/055FY3k=; b=eE7r6Zb2KXc5p504fK7XLyDiO+6Fc0hCRV1VekXdbtKnrm4kxGForsbeMqDHMXIDSc p5fu+uW/tki6tKHLTUmtV2hLQfgSbZcVVElgfccztYmxR58cSj9SXkXuL342nOYnwuwk d96f1OTUhDRk+skmj3HxvndcR4RiLDKp8i3XJG5tiss66NpxMW5H4N/IUWb8922BcgC5 W64dO3AM9xVICjPXmMeYDEW60PgmkTfzTvSkz3GIPn6QL54l4Wy4Cu4tVU7kEgPe6UdJ qtuajFUekoEAz7CvOvHnO/Y5VmKbW1xA2tVhSyFid6TikPEoL5ondqc7yLFr4SbZvwSm Y7ZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691165922; x=1691770722; h=content-disposition:mime-version:user-agent:message-id:date :references:in-reply-to:subject:to:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=eGad7VGYYShIXikrCMknpqfhud0A9rox5pg/055FY3k=; b=XwQDKeEAODWHC3Nwyo5L1IbCUdp8xQzHJW7uTM/jt/wkIfNcxpKoXnLD4/utMYcRTN fDI1cbQlpFfOLmR/LkdXikdJK5IZV/IfnKknpFtxsl1Gu2H2gQ21JEAGynfKzTcCrSEo BxrOkTmSNYPNP6B+bps+VsuBLSeVHnEeiDQylaY0LJWbkJw2dO9Jl7qbuh+u12BaBn+j 2EF5Ax9/p5UO9dhADrV1qTwgUPWOdLyN6H+R6fDpotvTcnhcJ0Zxvxj4WW5Zd5h6wsKR vcCbwOuEbTBg5W0AtjVw+w6CBLOua1JyA7h9zDoquNrhLgXYvVANnUwRM/WOVTV+Y7ja o7Bw== X-Gm-Message-State: AOJu0YxEy8hwGjwGNUoeTEDuwuRSrpw0xdudPwS8HcG8vwRoBZAg7LE/ Qs3oxr7su5NPD5+5UwW1CrINyPuTqwDgDQ== X-Google-Smtp-Source: AGHT+IHYE+y56Jd6rDP4+LV/MXk9z+wYmZV8XLrhoi3F5mCvh2fIj2keeO/X5Qre2rBHgKZcUl3PpA== X-Received: by 2002:a05:6a20:158e:b0:130:9af7:bfa with SMTP id h14-20020a056a20158e00b001309af70bfamr2232089pzj.60.1691165922161; Fri, 04 Aug 2023 09:18:42 -0700 (PDT) Received: from localhost ([118.185.152.162]) by smtp.gmail.com with ESMTPSA id c21-20020a62e815000000b0066f37665a6asm1765852pfi.117.2023.08.04.09.18.40 for <65055@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Aug 2023 09:18:41 -0700 (PDT) From: Visuwesh To: 65055@debbugs.gnu.org Subject: Re: bug#65055: 30.0.50; save-place-abbreviation-file-names :set fails for saveplace-pdf-view places In-Reply-To: <87edki4wdz.fsf@gmail.com> (Visuwesh's message of "Fri, 04 Aug 2023 21:45:04 +0530") References: <87edki4wdz.fsf@gmail.com> Date: Fri, 04 Aug 2023 21:48:26 +0530 Message-ID: <87a5v64w8d.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Only-abbreviate-expand-strings-when-adjusting-savepl.patch X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 65055 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: -1.0 (-) >From 92f9d2b43e1974bf1496e436ad49d3b687ee0d3f Mon Sep 17 00:00:00 2001 From: Visuwesh Date: Fri, 4 Aug 2023 21:47:11 +0530 Subject: [PATCH] Only abbreviate/expand strings when adjusting saveplace * lisp/saveplace.el (save-place-abbreviate-file-names): Only call abbreviate-file-name/expand-file-name on strings in :set function. (bug#65055) --- lisp/saveplace.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/saveplace.el b/lisp/saveplace.el index 18d296ba2d..6386791337 100644 --- a/lisp/saveplace.el +++ b/lisp/saveplace.el @@ -154,7 +154,9 @@ save-place-abbreviate-file-names (if (listp v) (cl-loop for (k1 . v1) in v collect - (cons k1 (funcall fun v1))) + (cons k1 (if (stringp v1) + (funcall fun v1) + v1))) v))) :key #'car :from-end t -- 2.40.1 From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 04 13:49:37 2023 Received: (at 65055) by debbugs.gnu.org; 4 Aug 2023 17:49:37 +0000 Received: from localhost ([127.0.0.1]:54705 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qRyvh-00011y-2G for submit@debbugs.gnu.org; Fri, 04 Aug 2023 13:49:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45938) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qRyve-00011k-Lr for 65055@debbugs.gnu.org; Fri, 04 Aug 2023 13:49:35 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qRyvV-0002i7-Md; Fri, 04 Aug 2023 13:49:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=QIbuRq1on+tNj+i4JQyGHdiuzavRaq56CuPPdk2o1hg=; b=lLABlGuswRTd k09UN7+9e0VUw8Qq6fYTCpA3bh267nETY7606oCGY8ziyI4YRk+JDHn+uu/LjczaITyzKHtFURXPj VdzRN+Qh65unTDE9gcz5o0Gw9nnUlqmIRnfc6juAS7JlPjEPMkAzThKZ88/3edwXNWlAYSldtSTxD kZNDt31FXDQow3ihCybyBHVGMqDipY24IaJzauyqAajiL789SQp7KjuLqUJ+2C1cfBHzu527EUVg7 1Kw9jrfkc8oc7yXDI7GihEdjbGI4CcFhszKLhh4yzrwSi2rqhcOkTX8Xqkh9TU3DrLs52qgHa8jTY AgE55ufZYEPI5P3gKVEuNQ==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qRyvV-00013j-57; Fri, 04 Aug 2023 13:49:25 -0400 Date: Fri, 04 Aug 2023 20:49:38 +0300 Message-Id: <83cz02vgst.fsf@gnu.org> From: Eli Zaretskii To: Visuwesh In-Reply-To: <87edki4wdz.fsf@gmail.com> (message from Visuwesh on Fri, 04 Aug 2023 21:45:04 +0530) Subject: Re: bug#65055: 30.0.50; save-place-abbreviation-file-names :set fails for saveplace-pdf-view places References: <87edki4wdz.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65055 Cc: 65055@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: Visuwesh > Date: Fri, 04 Aug 2023 21:45:04 +0530 > > saveplace-pdf-view package [1] uses a custom "place" format to save and > restore the last position for PDF files viewed via doc-view package. > > One such "place" is > > ("/home/viz/tmp/piron1976.pdf" > (pdf-view-bookmark "piron1976.pdf" > (filename . "~/tmp/piron1976.pdf") > (position . 1) > (last-modified 25805 5369 546130 641000) > (page . 2) > (slice) > (size . fit-width) > (origin) > (handler . pdf-view-bookmark-jump-handler))) > > This fails with the following backtrace because > (cdr (pdf-view-bookmark ...) is a list, I don't understand: the valid format of save-place-alist is documented in its doc string, so this looks like a bug in saveplace-pdf-view package? Or what am I missing? From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 04 14:14:23 2023 Received: (at 65055) by debbugs.gnu.org; 4 Aug 2023 18:14:23 +0000 Received: from localhost ([127.0.0.1]:54821 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qRzJe-0001jW-Lk for submit@debbugs.gnu.org; Fri, 04 Aug 2023 14:14:22 -0400 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:48620) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qRzJc-0001jJ-UU for 65055@debbugs.gnu.org; Fri, 04 Aug 2023 14:14:21 -0400 Received: by mail-pf1-x443.google.com with SMTP id d2e1a72fcca58-687087d8ddaso2168109b3a.1 for <65055@debbugs.gnu.org>; Fri, 04 Aug 2023 11:14:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691172855; x=1691777655; h=content-transfer-encoding:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5UUI3jTQRb9JXPcz1cWkW8uj/gcZi2lB9XXnF4gD0po=; b=Na5htC47zH3e1RXmbeH++A77zTuBEqaYZbsh5lwTNFgJ2Q7viMsmgepR7sdL5x3box ya42GOAgEgy/bp+x7RDQWcS90GIf6XNKLc6aRPuoNf9Ra3u3mVEMBxC6TIBySzx4E5yD CEiJZQHWlaaxyK+oq4kIxb1pG4bjsF0zwtlhdatuqpnVPlbGf8QQl9CQd/RPF695SJ0H /p9ryVOWUYIMvJ8ckQDyU8EcII2cW03krcv7qZFgibI96qb6c8/oVinZ8kjJcBsOy0+T omv6hlrLS/2ryR7twNPAEEQekqbpOgMp+CmXF0nhJPjlOR/OiVGkgR8I7MalJWm5wLWO D7CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691172855; x=1691777655; h=content-transfer-encoding:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=5UUI3jTQRb9JXPcz1cWkW8uj/gcZi2lB9XXnF4gD0po=; b=aFwGyXWzCJpoMMCJKU5wNpMBTCQVqeftKfvowB7BzpBURd+BwcdWKBcWGdaye3U2VC 8rAkE6bdD+yXidrwwnai0rcwHvbETfg63v6icAzqN3kbj2V39L5Hbw5k2qhhd6mMSTdR aWwmKoIvpgr5ZTEIWLLrSCvTpjgq0vkSbxP0Gw048oel/+m8EAAKMt4kxe4LtH71Syrv CUwIbPipdztSLJeCht03MZV8palIN9BxQzxmLT/wTZULnXSe8YHCg/EzkCy5FWbfp6zR sdAOBI8sFhBalcYua7+8X+TJTBK1WOizCkb/8P+xZ7SYRiyE5TKQFt4gW1XKqs6FbH8N NpuA== X-Gm-Message-State: AOJu0Yz2/tjMhWX6PONBAWJ5r3qBs3kmGLg/YXEfzpXkqadPdBSq9E/9 Q9Kqp7UresNX0mfpk7CHbk4dUPW9Q64WIg== X-Google-Smtp-Source: AGHT+IG2DX6+lFyJbkfdt4ODmPWP9m6cnHY548GRp/9NIqmBLXI1LWulWCf7/8BFruBh5YqrUbNVRA== X-Received: by 2002:a05:6a20:6a28:b0:135:293b:9b14 with SMTP id p40-20020a056a206a2800b00135293b9b14mr3045966pzk.55.1691172855049; Fri, 04 Aug 2023 11:14:15 -0700 (PDT) Received: from localhost ([115.240.90.130]) by smtp.gmail.com with ESMTPSA id j3-20020aa78003000000b00678afd48250sm1841799pfi.218.2023.08.04.11.14.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Aug 2023 11:14:14 -0700 (PDT) From: Visuwesh To: Eli Zaretskii Subject: Re: bug#65055: 30.0.50; save-place-abbreviation-file-names :set fails for saveplace-pdf-view places In-Reply-To: <83cz02vgst.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 04 Aug 2023 20:49:38 +0300") References: <87edki4wdz.fsf@gmail.com> <83cz02vgst.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Fri, 04 Aug 2023 23:43:56 +0530 Message-ID: <87v8du65gb.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 65055 Cc: 65055@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: -1.0 (-) [=E0=AE=B5=E0=AF=86=E0=AE=B3=E0=AF=8D=E0=AE=B3=E0=AE=BF =E0=AE=86=E0=AE=95= =E0=AE=B8=E0=AF=8D=E0=AE=9F=E0=AF=8D 04, 2023] Eli Zaretskii wrote: >> From: Visuwesh >> Date: Fri, 04 Aug 2023 21:45:04 +0530 >>=20 >> saveplace-pdf-view package [1] uses a custom "place" format to save and >> restore the last position for PDF files viewed via doc-view package. >>=20 >> One such "place" is >>=20 >> ("/home/viz/tmp/piron1976.pdf" >> (pdf-view-bookmark "piron1976.pdf" >> (filename . "~/tmp/piron1976.pdf") >> (position . 1) >> (last-modified 25805 5369 546130 641000) >> (page . 2) >> (slice) >> (size . fit-width) >> (origin) >> (handler . pdf-view-bookmark-jump-handler))) >>=20 >> This fails with the following backtrace because=20 >> (cdr (pdf-view-bookmark ...) is a list, > > I don't understand: the valid format of save-place-alist is documented > in its doc string, so this looks like a bug in saveplace-pdf-view > package? Or what am I missing? Unfortunately, that's only half the story. save-place-alist can also have elements such as ("SOME-DIRECTORY" (dired-filename . "SOME-FILENAME")) to save the place for dired buffers. This is why the :set function of the user option checks if second element of above place is a list and also changes the "SOME-FILENAME" to be abbreviated/expanded. But instead of checking if the second element of the place's cdr is a string, the :set function simply assumes that it will be always be a string. This is not wrong as such since that's the only allowed format as far as core Emacs is concerned but I think having the check in place would help expand the save-place-alist format as the user desires. From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 04 15:03:46 2023 Received: (at 65055) by debbugs.gnu.org; 4 Aug 2023 19:03:46 +0000 Received: from localhost ([127.0.0.1]:54878 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qS05R-0005l4-NS for submit@debbugs.gnu.org; Fri, 04 Aug 2023 15:03:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50892) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qS05Q-0005kr-Pm for 65055@debbugs.gnu.org; Fri, 04 Aug 2023 15:03:45 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qS05L-0001va-7S; Fri, 04 Aug 2023 15:03:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=SkguO/YMXGubRLJcYAfoN/ZkVYEn3ke09mvSGzwJKS0=; b=NmW9nRvRaTaMVu9UYDSh ULY0KoqmJqHGvPTOTPbK44JkX47D8A4q8vvsK//7v1M2sNrblzr5wpP3tCuARD55oTcBVf65ImRM4 JMdhvGKLk1SJB0jcf2/EtEAQqrAKMGSLyKQ/cl1CfOlhvH851VYcR+bRGIyT/A0B0YdpXaqRWHUku W4jdMukANypTtpmjh+fDC54kkYtk3afbQlJx544i1XNcALpmxSAVNR4QGeDJ3gpc8K7rtEo9Elb/2 5YSRvs2Ip+nn0hT1YQJKWI46O1uqwhUV7ihUWWQ8OuHh1BPY2kBEEQgVkMd0b4NrW5hKn9p/4FDTO ZSqblafDUOAXGA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qS05D-0006Cp-4J; Fri, 04 Aug 2023 15:03:38 -0400 Date: Fri, 04 Aug 2023 22:03:39 +0300 Message-Id: <835y5uvddg.fsf@gnu.org> From: Eli Zaretskii To: Visuwesh In-Reply-To: <87v8du65gb.fsf@gmail.com> (message from Visuwesh on Fri, 04 Aug 2023 23:43:56 +0530) Subject: Re: bug#65055: 30.0.50; save-place-abbreviation-file-names :set fails for saveplace-pdf-view places References: <87edki4wdz.fsf@gmail.com> <83cz02vgst.fsf@gnu.org> <87v8du65gb.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65055 Cc: 65055@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: Visuwesh > Cc: 65055@debbugs.gnu.org > Date: Fri, 04 Aug 2023 23:43:56 +0530 > > [வெள்ளி ஆகஸ்ட் 04, 2023] Eli Zaretskii wrote: > > >> ("/home/viz/tmp/piron1976.pdf" > >> (pdf-view-bookmark "piron1976.pdf" > >> (filename . "~/tmp/piron1976.pdf") > >> (position . 1) > >> (last-modified 25805 5369 546130 641000) > >> (page . 2) > >> (slice) > >> (size . fit-width) > >> (origin) > >> (handler . pdf-view-bookmark-jump-handler))) > >> > >> This fails with the following backtrace because > >> (cdr (pdf-view-bookmark ...) is a list, > > > > I don't understand: the valid format of save-place-alist is documented > > in its doc string, so this looks like a bug in saveplace-pdf-view > > package? Or what am I missing? > > Unfortunately, that's only half the story. save-place-alist can also > have elements such as > > ("SOME-DIRECTORY" (dired-filename . "SOME-FILENAME")) > > to save the place for dired buffers. Where is this documented, and when the change to support this extension was added? And in any way, the form you show above, which is used by saveplace-pdf-view, is not even of that extended format, or am I again missing something? > But instead of checking if the second element of the place's cdr is a > string, the :set function simply assumes that it will be always be a > string. This is not wrong as such since that's the only allowed format > as far as core Emacs is concerned but I think having the check in place > would help expand the save-place-alist format as the user desires. I don't think we should tweak our code to support save-place-alist formats that violate the documented formats. If the documented format is not followed, how do you know which elements of which parts of the data structures are file names in the first place? The right way of extending such data structures is to allow functions as the values, and let those functions deal with non-standard formats. The way saveplace-pdf-view does it, IIUC, is simply wrong: it just happened to work by sheer luck with previous versions because Emacs never actually acted on the assumption that a file name is in a certain place in the data stricture. From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 04 23:37:32 2023 Received: (at 65055) by debbugs.gnu.org; 5 Aug 2023 03:37:32 +0000 Received: from localhost ([127.0.0.1]:55192 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qS86e-0004qd-BB for submit@debbugs.gnu.org; Fri, 04 Aug 2023 23:37:32 -0400 Received: from mail-oa1-x41.google.com ([2001:4860:4864:20::41]:53480) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qS86c-0004qP-U5 for 65055@debbugs.gnu.org; Fri, 04 Aug 2023 23:37:31 -0400 Received: by mail-oa1-x41.google.com with SMTP id 586e51a60fabf-1bb575a6ed3so2090254fac.2 for <65055@debbugs.gnu.org>; Fri, 04 Aug 2023 20:37:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691206645; x=1691811445; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/yGN9/py/jr2i0bhIMFW2g8leelA5NW4Rf+tn7OzFCU=; b=BG2gySWlFg2iEcu7F4AaRbGUPOxlQmHdrqo2poqVv5+hXTWP9sMIpvhmYv+BirZUYn ni05Vx93r38gjryqzyOkQPjKXdRftUG5rqeXgqbTVcwTb7q3cb3Itnp82TI3o49EZaVf OQFhxMnOsiILyftb9O/BoGwTMi4SbT2ke8DNUjJQLJTEhqMTZLG71NUlduvqNFyUF+yg AmF3DLF4DSDiYedngvPvK4c0znTtet731ijADWq9eDwM9EegzO/GjnWqoUHmrYNgaGQi LiNSSzbaSPuu/AcgyViJIbMrvJtOVOTEeuwBfP3sKdPdWiPBq0WVPWDfwLVQHtlVNiVE U0MA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691206645; x=1691811445; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=/yGN9/py/jr2i0bhIMFW2g8leelA5NW4Rf+tn7OzFCU=; b=KEbxf86Qqv+BpTVPX48B7dEDu3fX1JPp2t3iTxBWcpg+dUCRJ5pIOoRQ7JkgH8aFoG WmD32whCpoHwQlZqqY7XAv7NI/3eHyDQHvRB5xkUP8hWnj7klpgSXgUa0aUmvKzoBXmL cPLpcp1fVgjEc4L9wvclq3XSIl/4NHIkQp3VT4M0xg4Qxl56AANMB4jPy6pbBKrhhNbC HZSVSUWZCuO69iqiXrZ9P6aC2KlN2k/jexvUM5AokMxJ06DzKxxUVWmB4wfYr4yzKnvO EXS0GTeqIW2eitXMaW/fqt+o4U2JKhOpEpTDoc10aH3zTgshFLKP4uqQOtR6aFzAwtfk zGWQ== X-Gm-Message-State: AOJu0YwKn2Vxl9lh75S+3OR7jXn4rDQdtF1ORkC6o4M9qjtQu9fhyPyM tBITxb6SNfSZsefWoQYqy9g= X-Google-Smtp-Source: AGHT+IFZRYHnT5X2gKQU+9CSrO18hv/JbqI7hXqNByiOPZ/W4faIByvbbv9gb6FHTPinJcry+bZStQ== X-Received: by 2002:a05:6870:d7a8:b0:1bf:2e81:e1e1 with SMTP id bd40-20020a056870d7a800b001bf2e81e1e1mr4516725oab.33.1691206644865; Fri, 04 Aug 2023 20:37:24 -0700 (PDT) Received: from localhost ([14.139.216.98]) by smtp.gmail.com with ESMTPSA id r7-20020a62e407000000b006870c50efaesm2229628pfh.9.2023.08.04.20.37.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Aug 2023 20:37:24 -0700 (PDT) From: Visuwesh To: Eli Zaretskii Subject: Re: bug#65055: 30.0.50; save-place-abbreviation-file-names :set fails for saveplace-pdf-view places In-Reply-To: <835y5uvddg.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 04 Aug 2023 22:03:39 +0300") References: <87edki4wdz.fsf@gmail.com> <83cz02vgst.fsf@gnu.org> <87v8du65gb.fsf@gmail.com> <835y5uvddg.fsf@gnu.org> Date: Sat, 05 Aug 2023 09:07:06 +0530 Message-ID: <87r0oi5fdp.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 65055 Cc: 65055@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: -1.0 (-) [=E0=AE=B5=E0=AF=86=E0=AE=B3=E0=AF=8D=E0=AE=B3=E0=AE=BF =E0=AE=86=E0=AE=95= =E0=AE=B8=E0=AF=8D=E0=AE=9F=E0=AF=8D 04, 2023] Eli Zaretskii wrote: >> Unfortunately, that's only half the story. save-place-alist can also >> have elements such as >>=20 >> ("SOME-DIRECTORY" (dired-filename . "SOME-FILENAME")) >>=20 >> to save the place for dired buffers. > > Where is this documented It is not. The only way to know how this comes to be is to read `save-place-to-alist'. BTW, another specially handled major-mode is hexl-mode. >, and when the change to support this > extension was added? In commit d4466a91f271db0b414a605ede1a7befd403b950. commit d4466a91f271db0b414a605ede1a7befd403b950 Author: Ivan Kanis Date: Fri Jun 14 11:32:01 2013 +0200 Add support for dired in saveplace. > And in any way, the form you show above, which is used by > saveplace-pdf-view, is not even of that extended format, or am I again > missing something? No, you are not missing anything. >> But instead of checking if the second element of the place's cdr is a >> string, the :set function simply assumes that it will be always be a >> string. This is not wrong as such since that's the only allowed format >> as far as core Emacs is concerned but I think having the check in place >> would help expand the save-place-alist format as the user desires. > > I don't think we should tweak our code to support save-place-alist > formats that violate the documented formats. If the documented format > is not followed, how do you know which elements of which parts of the > data structures are file names in the first place? I understand your point, > The right way of extending such data structures is to allow functions > as the values, and let those functions deal with non-standard formats. > The way saveplace-pdf-view does it, IIUC, is simply wrong: it just > happened to work by sheer luck with previous versions because Emacs > never actually acted on the assumption that a file name is in a > certain place in the data stricture. That was my idea two years back and till now but I simply didn't/don't have the motivation to come up with a patch since I don't use saveplace for anything but pdf buffers and saveplace-pdf-view did the job good enough for me to not worry about a better way=E2=84=A2. In the absence of = such motivation, I will solve the problem in saveplace-pdf-view's side and call it a day. If/when the motivation returns, I guess we can revisit this issue. This report can be closed if you wish. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 05 05:15:38 2023 Received: (at 65055-done) by debbugs.gnu.org; 5 Aug 2023 09:15:38 +0000 Received: from localhost ([127.0.0.1]:55550 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qSDNp-00086b-Ks for submit@debbugs.gnu.org; Sat, 05 Aug 2023 05:15:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42414) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qSDNn-00086M-Sv for 65055-done@debbugs.gnu.org; Sat, 05 Aug 2023 05:15:36 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qSDNi-0003Fi-Ls; Sat, 05 Aug 2023 05:15:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=Vw8G7U8P/4jsmC/VI1B/Ip+dx0LgwOt54/oeNhFUdsU=; b=Qo8/eKZ/a5bDeUrwYCMy KoCVju9Oj3ca7CLGP+WMJ6gs4dTX9kna/uYHF5D3n6hHD6VYso7KoiuY7kvjaurkSMtTHqW51hCAn iKcAdHza+d7FVD8UAbTHut9fJoZp30QOhwoTnfpKR0+4GWEVKp4GbMCZIcDxRN0tjlWIrQVSiUbF1 yJ/pBUSqo1OvTuR4lX85czH+vu6/Am6WDVOQddqPO0v/14mmIua2KohzWxroBBCueNu8Y5r5tr5SJ QeF00ZUmK/s0UL4XdtbhhWjuXtk/pHxk7h8IW8UQRgd+xlA/9OHfQ772qI3LF0U3Ymstia6ikkxtJ +LeWeHTBy0w9dg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qSDNh-0005wx-L1; Sat, 05 Aug 2023 05:15:30 -0400 Date: Sat, 05 Aug 2023 12:15:43 +0300 Message-Id: <83cz01u9xc.fsf@gnu.org> From: Eli Zaretskii To: Visuwesh In-Reply-To: <87r0oi5fdp.fsf@gmail.com> (message from Visuwesh on Sat, 05 Aug 2023 09:07:06 +0530) Subject: Re: bug#65055: 30.0.50; save-place-abbreviation-file-names :set fails for saveplace-pdf-view places References: <87edki4wdz.fsf@gmail.com> <83cz02vgst.fsf@gnu.org> <87v8du65gb.fsf@gmail.com> <835y5uvddg.fsf@gnu.org> <87r0oi5fdp.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65055-done Cc: 65055-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: Visuwesh > Cc: 65055@debbugs.gnu.org > Date: Sat, 05 Aug 2023 09:07:06 +0530 > > [வெள்ளி ஆகஸ்ட் 04, 2023] Eli Zaretskii wrote: > > >> Unfortunately, that's only half the story. save-place-alist can also > >> have elements such as > >> > >> ("SOME-DIRECTORY" (dired-filename . "SOME-FILENAME")) > >> > >> to save the place for dired buffers. > > > > Where is this documented > > It is not. The only way to know how this comes to be is to read > `save-place-to-alist'. BTW, another specially handled major-mode is > hexl-mode. > > >, and when the change to support this > > extension was added? > > In commit d4466a91f271db0b414a605ede1a7befd403b950. > > commit d4466a91f271db0b414a605ede1a7befd403b950 > Author: Ivan Kanis > Date: Fri Jun 14 11:32:01 2013 +0200 > > Add support for dired in saveplace. Thanks, but actually the format extension was done later, in commit 1d42e5b6396fd7234ff94e6fec7fd4f39d1faddb. Anyway, what a mess! I've now fixed the doc strings added by those two commits, and documented the new format. > > I don't think we should tweak our code to support save-place-alist > > formats that violate the documented formats. If the documented format > > is not followed, how do you know which elements of which parts of the > > data structures are file names in the first place? > > I understand your point, > > > The right way of extending such data structures is to allow functions > > as the values, and let those functions deal with non-standard formats. > > The way saveplace-pdf-view does it, IIUC, is simply wrong: it just > > happened to work by sheer luck with previous versions because Emacs > > never actually acted on the assumption that a file name is in a > > certain place in the data stricture. > > That was my idea two years back and till now but I simply didn't/don't > have the motivation to come up with a patch since I don't use saveplace > for anything but pdf buffers and saveplace-pdf-view did the job good > enough for me to not worry about a better way™. In the absence of such > motivation, I will solve the problem in saveplace-pdf-view's side and > call it a day. If/when the motivation returns, I guess we can revisit > this issue. > This report can be closed if you wish. OK, closing after installing the above-mentioned documentation fixes. From unknown Fri Aug 15 14:14:57 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 02 Sep 2023 11:24:05 +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