all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Liu Hui <liuhui1610@gmail.com>
Cc: ruijie@netyu.xyz, 62413-done@debbugs.gnu.org
Subject: bug#62413: 29.0.60; [PATCH] save-place-mode cannot restore saved position
Date: Thu, 06 Apr 2023 13:27:55 +0300	[thread overview]
Message-ID: <83h6ttqp90.fsf@gnu.org> (raw)
In-Reply-To: <CAOQTW-N9zY9=GrWZwELtgydsroy8ajmd+RZL0iCfsA62O-fMqQ@mail.gmail.com> (message from Liu Hui on Tue, 4 Apr 2023 09:37:26 +0800)

> From: Liu Hui <liuhui1610@gmail.com>
> Date: Tue, 4 Apr 2023 09:37:26 +0800
> Cc: Eli Zaretskii <eliz@gnu.org>, 62413@debbugs.gnu.org, bug-gnu-emacs@gnu.org
> 
> Ruijie Yu <ruijie@netyu.xyz> 于2023年4月3日周一 11:06写道:
> 
> > Two minor comments below.
> >
> > > @@ -90,8 +92,32 @@ save-place-forget-unreadable-files
> > >  (defcustom save-place-abbreviate-file-names nil
> > > [...]
> > > +  :set (lambda (sym val)
> > > +         (set-default sym val)
> > > +         (let ((fun (if val 'abbreviate-file-name 'expand-file-name)))
> >
> > I believe function quotes "#'" are preferred over simple quotes "'" when
> > dealing with functions.
> 
> OK
> 
> > > @@ -214,7 +241,11 @@ save-place-to-alist
> > >                           ((and (derived-mode-p 'dired-mode) directory)
> > >                            (let ((filename (dired-get-filename nil t)))
> > >                              (if filename
> > > -                                `((dired-filename . ,filename))
> > > +                                   (list
> > > +                                    (cons 'dired-filename
> > > +                                          (if save-place-abbreviate-file-names
> > > +                                              (abbreviate-file-name filename)
> > > +                                            filename)))
> >
> > It seems that you rewrote the quote-backquote thing with regular
> > list-cons construct -- no comments on that.  I noticed that here, and in
> > a few other places, you are reusing the exact `if' construct multiple
> > times.  Does that warrant defining a helper function?
> 
> I feel such a function is too short.
> 
> > Also, while I was about to send the mail, regarding the docstring of
> > `save-place-abbreviate-file-names', instead of letting the user enable
> > `save-place-mode', would it be better if you directly call facilities in
> > saveplace to load `save-place-alist' from file system, within your :set
> > function?
> 
> Thanks for the suggestion. I have added `save-place-load-alist-from-file'
> to the :set function in the new patch.

Thanks, I installed this on the master branch, and I'm therefore
closing this bug.





      reply	other threads:[~2023-04-06 10:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-24  2:19 bug#62413: 29.0.60; [PATCH] save-place-mode cannot restore saved position Liu Hui
2023-03-25 11:52 ` Eli Zaretskii
2023-03-25 14:14   ` Liu Hui
2023-03-25 14:17     ` Eli Zaretskii
2023-03-26  1:26       ` Liu Hui
2023-03-26  5:20         ` Eli Zaretskii
2023-03-28  5:56           ` Liu Hui
2023-03-28 12:03             ` Eli Zaretskii
2023-03-30  2:49               ` Liu Hui
2023-03-30  5:34                 ` Eli Zaretskii
2023-04-03  1:02                   ` Liu Hui
2023-04-03  2:45                     ` Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-04  1:37                       ` Liu Hui
2023-04-06 10:27                         ` Eli Zaretskii [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83h6ttqp90.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=62413-done@debbugs.gnu.org \
    --cc=liuhui1610@gmail.com \
    --cc=ruijie@netyu.xyz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.