Skip to content

Commit fbd267c

Browse files
committed
Update README.md
1 parent e212588 commit fbd267c

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ In addition to *minimal-emacs.d*, startup speed is influenced by your computer's
7575
- [Configuring org-mode](#configuring-org-mode)
7676
- [Configuring markdown-mode (e.g., README.md syntax)](#configuring-markdown-mode-eg-readmemd-syntax)
7777
- [Tree-sitter Integration (Better Syntax Highlighting)](#tree-sitter-integration-better-syntax-highlighting)
78+
- [Auto upgrade Emacs packages](#auto-upgrade-emacs-packages)
7879
- [Treemacs, a tree layout file explorer (Sidebar file explorer)](#treemacs-a-tree-layout-file-explorer-sidebar-file-explorer)
7980
- [Inhibit the mouse](#inhibit-the-mouse)
8081
- [Spell checker](#spell-checker)
@@ -965,6 +966,48 @@ To enable Tree-sitter, add the following to your `~/.emacs.d/post-init.el`:
965966
(global-treesit-auto-mode))
966967
```
967968

969+
### Auto upgrade Emacs packages
970+
971+
The `auto-package-update` package that automates the process of updating installed packages managed by *package.el*. Instead of requiring users to manually invoke `package-list-packages` and update each package, `auto-package-update` can check for available updates at regular intervals, perform updates in the background, and optionally hide the results buffer or prompt before applying changes.
972+
973+
To configure **auto-package-update**, add the following to `~/.emacs.d/post-init.el`:
974+
975+
```elisp
976+
;; This automates the process of updating installed packages managed by *package.el*
977+
(use-package auto-package-update
978+
:ensure t
979+
:custom
980+
;; Set the number of days between automatic updates.
981+
;; Here, packages will only be updated if at least 7 days have passed
982+
;; since the last successful update.
983+
(auto-package-update-interval 7)
984+
985+
;; Suppress display of the *auto-package-update results* buffer after updates.
986+
;; This keeps the user interface clean and avoids unnecessary interruptions.
987+
(auto-package-update-hide-results t)
988+
989+
;; Automatically delete old package versions after updates to reduce disk
990+
;; usage and keep the package directory clean.
991+
(auto-package-update-delete-old-versions t)
992+
993+
;; Uncomment the following line to enable a confirmation prompt
994+
;; before applying updates. This can be useful if you want manual control.
995+
;; (auto-package-update-prompt-before-update t)
996+
997+
:config
998+
;; Run package updates automatically at startup, but only if the configured
999+
;; interval has elapsed.
1000+
(auto-package-update-maybe)
1001+
1002+
;; Schedule a background update attempt daily at 10:00 AM.
1003+
;; This uses Emacs' internal timer system. If Emacs is running at that time,
1004+
;; the update will be triggered. Otherwise, the update is skipped for that
1005+
;; day. Note that this scheduled update is independent of
1006+
;; `auto-package-update-maybe` and can be used as a complementary or
1007+
;; alternative mechanism.
1008+
(auto-package-update-at-time "10:00"))
1009+
```
1010+
9681011
### Treemacs, a tree layout file explorer (Sidebar file explorer)
9691012

9701013
The [treemacs](https://github.com/Alexander-Miller/treemacs) package is a file and project explorer for Emacs that provides a visually structured tree layout similar to file browsers in modern IDEs. It integrates well with various Emacs packages such as `projectile`, `lsp-mode`, and `magit`, allowing users to navigate their project structure efficiently.

0 commit comments

Comments
 (0)