Add context-aware date adjustment functions#68
Merged
blais merged 1 commit intobeancount:mainfrom Oct 27, 2025
Merged
Conversation
Member
|
Tests all fail; I haven't touched this in a while.
Can you run the tests and make sure they still run?
…On Wed, Oct 22, 2025 at 11:48 PM Lungang Fang ***@***.***> wrote:
Implement beancount-date-up and beancount-date-down to
increment/decrement date components based on cursor position. When cursor
is on the year, adjust by years; on month, adjust by months; on day, adjust
by days. Includes proper handling of month boundaries and day overflow
(e.g., Jan 31 to Feb 28/29).
Example configuration:
(use-package beancount
;; ...
:bind (
(:map beancount-mode-map
("C-c <down>" . beancount-date-down)
("C-c <up>" . beancount-date-up))
(:repeat-map beancount-repeat-map
("<down>" . beancount-date-down)
("<up>" . beancount-date-up))))
------------------------------
You can view, comment on, or merge this pull request online at:
#68
Commit Summary
- 13c0daf
<13c0daf>
Add context-aware date adjustment functions
File Changes
(1 file <https://github.com/beancount/beancount-mode/pull/68/files>)
- *M* beancount.el
<https://github.com/beancount/beancount-mode/pull/68/files#diff-874bcac7101ecefa1ee83b6f83bb0c791bef82ce09ae427716778e23f681d9a2>
(82)
Patch Links:
- https://github.com/beancount/beancount-mode/pull/68.patch
- https://github.com/beancount/beancount-mode/pull/68.diff
—
Reply to this email directly, view it on GitHub
<#68>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACSBE5IWABG67JGRBOQDE33ZBF2NAVCNFSM6AAAAACJ6ZAKO2VHI2DSMVQWIX3LMV43ASLTON2WKOZTGU2DGMBSGM2TGMI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Implement beancount-date-up and beancount-date-down to increment/decrement date components based on cursor position. When cursor is on the year, adjust by years; on month, adjust by months; on day, adjust by days. Includes proper handling of month boundaries and day overflow (e.g., Jan 31 to Feb 28/29).
Contributor
Author
Member
|
Merged both. Thank you!
…On Sun, Oct 26, 2025 at 2:48 AM Lungang Fang ***@***.***> wrote:
*lgfang* left a comment (beancount/beancount-mode#68)
<#68 (comment)>
@blais <https://github.com/blais> Thanks for checking this out. The
failures are due to new options in bean-doctor 3.2.0, not changes in this
PR. I've opened #69 <#69>
to address the failures separately. Could you please merge that PR first?
I'll rebase this one after.
—
Reply to this email directly, view it on GitHub
<#68 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACSBE4FTZCEV6XGCFZOOJT3ZRVEHAVCNFSM6AAAAACJ6ZAKO2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTINBYGA3DOMBYGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implement
beancount-date-upandbeancount-date-downto increment/decrement date components based on cursor position. When cursor is on the year, adjust by years; on month, adjust by months; on day, adjust by days. Includes proper handling of month boundaries and day overflow (e.g., Jan 31 to Feb 28/29).Example configuration: