aboutsummaryrefslogtreecommitdiff
path: root/wttrin.el
Commit message (Collapse)AuthorAgeFilesLines
* Add comprehensive ERT test suite and fix critical bugsCraig Jennings2025-11-041-11/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Session 1: Testing infrastructure and initial test coverage Bug fixes in wttrin.el: - Fix wttrin-additional-url-params to handle nil unit system - Remove incorrect callback parameter to url-retrieve-synchronously - Add nil buffer check for network failures - Strip HTTP headers before decoding response - Kill buffer after fetch to prevent memory leaks - Fix double concatenation of URL params in cache function - Add proper URL encoding via new wttrin--build-url function Refactoring: - Extract wttrin--build-url as pure, testable function - Separate URL building logic from network I/O Test infrastructure (33 tests, 100% passing): - tests/testutil-wttrin.el: Shared test utilities - tests/test-wttrin-additional-url-params.el: 7 tests - tests/test-wttrin--make-cache-key.el: 9 tests - tests/test-wttrin--build-url.el: 10 tests - tests/test-wttrin--cleanup-cache-if-needed.el: 7 tests Documentation: - docs/testing-plan.org: Comprehensive testing roadmap - docs/bugs.org: Bug analysis from code review - docs/NOTES.org: Session tracking and guidelines - docs/session-1-summary.org: Detailed session summary Next session: Cache workflow tests, parsing logic extraction, integration tests 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
* Add caching system for weather dataCraig Jennings2025-09-251-11/+93
| | | | | | | | | | | | | | Implement a caching mechanism to reduce API calls and improve performance. The cache stores weather data with configurable TTL (15 minutes default) and automatic cleanup when exceeding max entries (50 default). - Add cache configuration options for TTL and max entries - Store fetched data with timestamps in hash table - Add force refresh functionality with 'r' key binding - Implement automatic cache cleanup to prevent unbounded growth - Fall back to stale cache on network errors - Also, fixed URL parameter concatenation in fetch function
* use https rather than httpCraig Jennings2025-09-241-1/+1
|
* don't mutate url-request-extra-headersCraig Jennings2025-09-241-7/+7
| | | | - bind it locally instead within the let form
* ensure utf-8 encodingCraig Jennings2025-09-241-1/+1
|
* changed accept-language variable name to wttrin-default-languagesCraig Jennings2024-04-221-3/+3
| | | | | the unwieldly wttrin-default-accept-language became the lighter-weight and more user-friendly wttrin-default-language
* clean-up byte compile and licensing issuesCraig Jennings2024-04-211-47/+53
| | | | | | | - fix let-binding for date-time-stamp and location-info - also switched goto-line usage (interactive only) with forward-line - require face-remap for buffer-face-mode-face - adjust all code and docstring for 80 column width
* fix docstring longer than 80 charactersCraig Jennings2024-04-211-1/+2
|
* Add License Boilerplate and SPDX-License-Identifier for GPL 3.0Craig Jennings2024-04-211-0/+17
|
* fit and finish bugfixingCraig Jennings2024-04-111-38/+53
| | | | | | | | | | - adjust display header to location and date - change references from cities to location - update default-location names requery smoothly - always name the buffer *wttr.in* for easy reuse/killing - keep the buffer display up while user chooses next location
* package prep: linter bugfixing and updated readmev0.2.3Craig Jennings2024-04-011-6/+1
| | | | | | | | | - added manual and straight installation instructions - corrected font-height setting example - corrected :type for wttrin-default-accept-language - fix docstrings corrected emacs-lisp code block, upcased usage header
* bugfixesCraig Jennings2024-04-011-23/+27
| | | | | | | | | - fixed types for default-accept-language and default-cities - removed unneeded status variable in wttrin-fetch-raw-string - syntax correction in defgroup wttrin description - changed default font to Lucida Console (more universal + compatible with wttr.in) - added games to keywords per package linter - updated version, header description, and commentary
* customize font, display date, clean requeries, license change, &c.v0.2.2Craig Jennings2024-04-011-20/+69
| | | | | | | | | | | - changed license to GPLv3 - allow user to specify font name and height for display - place date/time stamp above location name at top of buffer - re-query with new location deletes to reduce buffer clutter - updated screenshot to show current updates - changed references from "city" to "location" in wttrin.el - removed old CI config files - removed old badges from readme file
* Reapplying patch to avoid raw HTML; other changesCraig Jennings2024-03-111-36/+35
| | | | | | | | | Other changes being: - added text prompt for quitting and selecting another city - updated default cities - fixed docstring issues reported by Emacs' linter - updated several prompt texts - updated maintainer
* applying outstanding patchesCraig Jennings2021-08-251-1/+14
| | | | | | | This fork has the following patches applied (still outstanding in bcbcarl/emacs-wttrin): - patch for selecting the unit system: https://github.com/bcbcarl/emacs-wttrin/pull/10 - patch for url request to return ascii rather than html https://github.com/bcbcarl/emacs-wttrin/pull/18 - patch to use https instead of http: https://github.com/bcbcarl/emacs-wttrin/pull/15
* Added user.agent fix to correct color display, also using httpsCraig Jennings2021-08-231-2/+2
|
* Default the city name if only one city is defined.Dave Pearson2017-06-121-1/+5
| | | | | If wttrin-default-cities only has the one city in it, default the input to wttrin to that so that it's easier and faster to get the weather.
* Allow wttrin to be called with a city as an argumentDave Pearson2017-06-121-4/+4
| | | | | This means it can be easily called from other code, with the city passed as an argument.
* [add] add HTTP request header: Accept-Language, display different language.emacsist2017-03-221-0/+7
|
* Added local keymapPavel Kurnosov2016-04-141-0/+7
| | | | Local keymap allows to quit current buffer or query for new place.
* Add autoload cookie for lazy loadingSyohei YOSHIDA2016-03-061-0/+1
|
* Some improvements and drop ido dependencyCarl X. Su2016-03-061-4/+3
| | | | | | * Depend on stable version of `xterm-color`. * Use `erase-buffer` instead of delete all region. * Replace `ido-completing-read` with `completing-read`.
* Update buffer generation rulesCarl X. Su2016-03-061-0/+2
|
* Update author list and versionCarl X. Su2016-03-061-1/+2
|
* Fix typo and conflictCarl X. Su2016-03-061-17/+24
|\
| * wttrin-default-cities & completionkuanyui2016-03-061-12/+7
| |
| * Error handlingkuanyui2016-03-061-8/+11
| |
| * Refactoring to more universal functionskuanyui2016-03-061-8/+13
| |
| * More universal C-u M-x wttrinkuanyui2016-03-061-14/+19
| |
| * Rename functionkuanyui2016-03-061-1/+1
| |
| * Prevent creating duplicated bufferskuanyui2016-03-061-2/+1
| |
| * Remove unused local bindingkuanyui2016-03-061-1/+1
| |
* | Remove unnecessary variableCarl X. Su2016-03-061-1/+1
|/
* Remove HTTP headerkuanyui2016-03-061-0/+3
|
* Fix requirekuanyui2016-03-061-1/+3
|
* Initial commitCarl X. Su2016-03-061-0/+47