diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-25 12:15:34 -0400 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-25 12:15:34 -0400 |
| commit | 33621b5a6e5407da190767b89756e287698ef234 (patch) | |
| tree | 5ff74e05a81a4ace888a18245304cc28c51dfc3c /examples/geolocation | |
| parent | 4266923daf6f137fbe2897334b7669f7fb4633c8 (diff) | |
| download | emacs-wttrin-33621b5a6e5407da190767b89756e287698ef234.tar.gz emacs-wttrin-33621b5a6e5407da190767b89756e287698ef234.zip | |
feat: add current-location detection to the weather picker
Geolocation used to live in a separate command, so getting weather for where you are meant knowing a second command existed. I added a "Current location (detect)" entry pinned to the top of the M-x wttrin picker. Selecting it detects your location and shows its weather. If the guess is wrong (VPN, hotspot) the detected city is visible in the header, so you reopen the picker and type one. Press d to keep the detected city as the default.
The entry is pinned first through a completion table whose display-sort-function holds against completion frameworks that re-sort, and it never enters location history or the cache as a place.
A new wttrin-geolocation-enabled (default t) turns every geolocation surface off for users who want that: the picker entry, the auto-detect favorite, and the command. It stays on by default.
The older wttrin-set-location-from-geolocation command is now obsolete in favor of the picker. Its customize-save-variable persistence advice is replaced by savehist, which already carries the favorite across sessions.
Diffstat (limited to 'examples/geolocation')
0 files changed, 0 insertions, 0 deletions
