Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use-package-with-elapsed-timer: respect option at runtime #96

Merged
merged 3 commits into from
Mar 10, 2014
Merged

use-package-with-elapsed-timer: respect option at runtime #96

merged 3 commits into from
Mar 10, 2014

Conversation

tarsius
Copy link
Contributor

@tarsius tarsius commented Mar 9, 2014

Previously the option use-package-verbose was consulted at macro
expansion time, and as a result customizing the option did nothing,
without also recompiling use-package.el.

The other two commits are cosmetics.

Previously the option `use-package-verbose' was consulted at macro
expansion time, and as a result customizing the option did nothing,
without also recompiling `use-package.el'.
@Silex
Copy link
Contributor

Silex commented Mar 9, 2014

What does use-package-with-elapsed-timer do? is it related to #77?

jwiegley added a commit that referenced this pull request Mar 10, 2014
use-package-with-elapsed-timer: respect option at runtime
@jwiegley jwiegley merged commit 0454402 into jwiegley:master Mar 10, 2014
@jwiegley
Copy link
Owner

use-package-with-elapsed-timer displays elapsed loading time for either packages that take a long time to load, or for all packages if verbosity is enabled.

@Silex
Copy link
Contributor

Silex commented Mar 10, 2014

Ah, ok so it's not something you use directly. I've been using it without knowing it because of (setq use-package-verbose t) in my config :)

@YoungFrog
Copy link
Contributor

Why add use-package-with-elapsed-timer to font locking ? It's an internal macro isn't it ?

@tarsius
Copy link
Contributor Author

tarsius commented Mar 10, 2014

It probably was intended as that initially, but it is actually quite useful in places where you would also use use-package. E.g. I use it several times in my init.el. One of these uses wraps everything but loading use-package itself :-) But it would be good if it had a doc-string.

@npostavs
Copy link
Contributor

@jwiegley: shouldn't that be
use-package-with-elapsed-timer displays elapsed loading time for either packages that take a long time to load or for all packages only if verbosity is enabled.

I'm wondering if I accidentally changed it from the original intention in 0b088fb, though as far as I can tell, it was always this way.

But it would be good if it had a doc-string.

Yup.

@jwiegley
Copy link
Owner

No, it always reports really long load times.

@npostavs
Copy link
Contributor

No, it always reports really long load times.

hmm

(let ((use-package-verbose nil))
  (pp-macroexpand-expression
   '(use-package-with-elapsed-timer "text"
      (do-stuff))))

=>

(progn
  (do-stuff))

That's before this patch, now the if is at runtime instead, but the effect is the same.

@jwiegley
Copy link
Owner

I don't understand. So what has changed exactly?

@npostavs
Copy link
Contributor

I don't think the behaviour has changed, but it doesn't appear to match your description.

jollaitbot pushed a commit to sailfishos-mirror/emacs that referenced this pull request Nov 24, 2022
use-package-with-elapsed-timer: respect option at runtime
GitHub-reference: jwiegley/use-package#96
jollaitbot pushed a commit to sailfishos-mirror/emacs that referenced this pull request Nov 29, 2022
use-package-with-elapsed-timer: respect option at runtime
GitHub-reference: jwiegley/use-package#96
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants