emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New feature in project.el: Remembering the previously used projects


From: Kévin Le Gouguec
Subject: Re: New feature in project.el: Remembering the previously used projects
Date: Sat, 30 May 2020 00:55:16 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Dmitry Gutov <dgutov@yandex.ru> writes:

> Please let us know how you like the change, and if you see any new problems.

This is a nice addition!

I have one gripe with it though: I've rigged frame-title-format to show
the basename of the project root directory[1], which means I have a call
to project-current on every redisplay.

IIUC, when default-directory is inside a project, project-current now
calls project--add-to-project-list-front, which in turn calls
project--write-project-list.

This slows down redisplay quite noticeably on my end[2].  I don't know
what the best solution would be; does it sound acceptable to add an
optional SKIP-LIST-UPDATE argument for project-current, or is it too
much trouble for this peculiar use-case?


At any rate, thanks for enhancing project.el.


[1] 
https://gitlab.com/peniblec/dotfiles/-/blob/0812042b76691c704d902acd7710350648bd9344/.emacs#L377

[2] Just typing is enough for me to notice it; it's even more noticeable
    if you e.g. bind C-x o to this function:

    (defun my/other-window (count &optional all-frames)
      (interactive "p")
      (let ((repeat-map (make-sparse-keymap)))
        (define-key repeat-map [?o] #'other-window)
        (set-transient-map repeat-map t)
        (other-window count all-frames)))

    … then split a window, hit C-x o and keep "o" pressed.  Sticking a
    counter in other-window suggests that there's no actual slowdown;
    visually though, before this feature, the focused window changed
    very rapidly, while with this feature the focus change is only
    visible every second or so.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]