Skip to content

Conversation

@mychris
Copy link
Contributor

@mychris mychris commented Nov 24, 2025

As requested, adds my bookmark package to core.

See the description of the package for more information.

For now, I decided to not name the package lem-bookmark. It seems this is the naming convention for internal packages, but I didn't want to break users of the package, which might already have it configured. If you would like me to change it, please tell me, I have no strong feelings about it. If you do change it yourself, please also update the documentation, which points to (find-package "BOOKMARK").

I decided to not load/save bookmarks automatically. It should be easy enough for a user to add a hook to their config if they wish to do so:

(add-hook *after-init-hook* (lambda ()
                              (bookmark:bookmark-load)))

Not sure if there is a hook for shutdown? I personally would prefer bookmarks not to be saved automatically, since I usually also add temporary bookmarks while working with a bigger project and wouldn't want them to be saved automatically. If you want to change this behaviour in the future, please think about adding a configuration variable for saving.

I didn't test the integration thoroughly. Building lem from main worked for me, bookmarks got loaded and I could jump to them.

I don't care about ownership and gladly give up all rights so this package can be easily contributed to the core.

Bookmarks are stored file paths, possibly with a location, which enables
the user to quickly visit files which are often needed.  Bookmark
information are kept in-memory, the user has to use the commands
BOOKMARK-LOAD and BOOKMARK-SAVE manually to persist bookmark
information.

The command BOOKMARK-SET can be used to create a new bookmark for the
current buffer with the current cursor position.  To go to the location
of a previously created bookmark, the command BOOKMARK-JUMP can be used.
More commands are available to manage bookmarks, see the exported
symbols from the package.
@code-contractor-app
Copy link

code-contractor-app bot commented Nov 24, 2025

✅ Code Contractor Validation: PASSED

✓ Code Contractor Validation Result
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📊 Statistics:
  Files Changed:    3
  Lines Added:      300
  Lines Deleted:    1
  Total Changed:    301
  Delete Ratio:     0.00 (0%)

Status: PASSED ✅

🤖 AI Providers:
  - codex — model: (Codex default)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📋 Validation Rules:

✅ max_files_changed - 3 file(s) changed, limit: 10
✅ max_total_changed_lines - 301 line(s) changed, limit: 400
✅ max_delete_ratio - Delete ratio: 0.00, limit: 0.50
✅ defpackage_rule - AI validation using prompt: When adding a new file, the first form in the file should be...
✅ trim_whitespace_rule - AI validation using prompt: There should be no trailing whitespace at the end of any lin...
✅ docstring_rule - AI validation using prompt: Documentation rules: - All functions, methods, and classes r...
✅ Alexandria and other utility libraries - AI validation using prompt: Lem depends on `alexandria`, so you can use `if-let`, `when-...
✅ dynamic_symbol_call_rule - AI validation using prompt: Avoid dynamic symbol calls (`uiop:symbol-call`) but rethink ...
✅ functional_style_rule - AI validation using prompt: Use `defvar` and `defparameter` for user-facing variables, b...
✅ loop_keywords_rule - AI validation using prompt: Loop keywords must be written with colons. Example: `(loop :...
✅ variable_placement_rule - AI validation using prompt: Variable placement rule: - `defvar` and `defparameter` must ...
✅ keybinding_placement_rule - AI validation using prompt: Key binding placement rule: - Key bindings for major and min...
✅ error_handling_rule - AI validation using prompt: Error handling rules: - Use `error` for internal errors. - `...
✅ macro_style_rule - AI validation using prompt: Macro style: - Don't write long macros, use the "call-with-"...
✅ user_variable_naming_rule - AI validation using prompt: Do not use the "-p" suffix for user-modifiable parameters. R...

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎉 No violations detected. Great job!
📚 About Code Contractor

Declarative Code Standards That Learn and Improve

Define domain-specific validation rules in YAML.
Your contracts document team knowledge and evolve into more accurate AI enforcement.

Want this for your repo?
Install Code Contractor

@vindarel
Copy link
Collaborator

This is great, thank you!

minor feedback, what if delete-all prompted for user y/n confirmation? "Do you want to delete [n] bookmarks?"

LGTM and I will merge anyways.

@mychris
Copy link
Contributor Author

mychris commented Nov 25, 2025

Sure thing, added.
What do you think about the package name?
On a second thought, maybe it is not a bad idea to change the package name to lem-bookmark now. Existing users already need to change their init file, because they need to remove the existing dependency. And I also think there aren't that many users right now. Better than changing it later when it's in core and there are way more users.
What do you think?

@vindarel
Copy link
Collaborator

yes, I think it's good to be consistent in naming and rename it now.

@mychris
Copy link
Contributor Author

mychris commented Nov 26, 2025

Done. Let me know if there is anything else I should do right now.

@vindarel vindarel merged commit 378cb30 into lem-project:main Nov 26, 2025
2 checks passed
@vindarel
Copy link
Collaborator

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants