aboutsummaryrefslogtreecommitdiff
path: root/tests/test-wttrin--resolve-favorite-location.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-21 08:48:04 -0400
committerCraig Jennings <c@cjennings.net>2026-06-21 08:48:04 -0400
commit72cb7cfc64b884965835afaac3f3877fdb1dcb57 (patch)
tree6ebccde4131d28cbe16d8b259fbe251f7b29430d /tests/test-wttrin--resolve-favorite-location.el
parent55c60f025e834c6bc60523542644ac0ec03d035c (diff)
downloademacs-wttrin-main.tar.gz
emacs-wttrin-main.zip
feat: add persistent location search historyHEADmain
Successful searches are now remembered and offered as completion candidates the next time you run wttrin, listed after the configured defaults. Only successful fetches are saved, so typos and not-found locations never enter the history. A location already in wttrin-default-locations isn't duplicated into it. The list is capped at wttrin-location-history-max (default 20), oldest entries falling off first. Persistence uses savehist: the history variable is registered with savehist-additional-variables, so enabling savehist-mode carries it across restarts with no custom file I/O. Without savehist it lasts the session. Two commands manage the list: wttrin-remove-location-history drops one entry, wttrin-clear-location-history clears all. I don't pass the history variable as the completing-read history argument, because the minibuffer would then save every typed string, including failed lookups. It stays a curated candidate source, updated only on success. I trim with butlast rather than seq-take to keep the Emacs 24.4 baseline.
Diffstat (limited to 'tests/test-wttrin--resolve-favorite-location.el')
0 files changed, 0 insertions, 0 deletions