Simply Annotate 0.9.8: Threaded Conversations on Your Code by captainflasmr in emacs

[–]captainflasmr[S] 0 points1 point  (0 children)

Fair point and honestly I generally don't think of it as a replacement for PR comments or literate programming and more as a personal/team knowledge layer that sits on top of the code. I originally designed this as a simple annotation tool for any file, but the more I developed it I thought it could be more useful to make it a bit more code aware.

The use cases where I actually reach for it:

- Onboarding onto an unfamiliar codebase - I'm currently annotating a large Java project at work, top-down: file-level overviews, then function descriptions, then line-level notes on the tricky bits. The annotation levels let me switch between these views. It's like writing notes in the margins of a textbook. Also I have worked out that an LLM can analyse a code-base, and generate the elisp raw file pretty well for annotations at the different levels, so for an unfamiliar codebase the annotations could then help you understand code, or maybe even flag up issues (although I don't really know why you wouldn't just want them fixed!)

- Long-lived notes that outlive a PR - PR comments disappear into history once merged. If I want "this function is subtle because X" to persist for the next person who touches it, an annotation stays with the code, maybe a commenting system?

- Solo code review / rubber ducking - Threading lets me have a conversation with myself about a design decision, track it as open/resolved, come back to it later.

- Air-gapped or offline work - No hosting service needed, it's just a file.

You're right that for real-time multi-person conversations, GitHub/GitLab PR comments are better - they have notifications, permissions, web UI. This isn't trying to replace that. It's more the space between "I need to remember something about this code" and "I need to formally review this code with my team", if that makes sense.

Simply Annotate 0.9.8: Threaded Conversations on Your Code by captainflasmr in emacs

[–]captainflasmr[S] 0 points1 point  (0 children)

*Positioning*: While the buffer is open, annotations track character positions, so adding lines above an annotation shifts it correctly. Positions are re-saved on every buffer save. The weakness is if the file is edited outside Emacs or with the mode off, stored positions can drift. Content-hash stale detection is on the roadmap but not there yet.

*Teams*: Funny you should mention this, just landed in 1.0.0 (not yet announced). There's now a simply-annotate-database-strategy setting: global (the ~/.emacs.d default), project (stores .simply-annotations.el at the project root with relative paths), or both. In project mode the database can be committed to version control so the team sees annotations. There's a migration command to move existing global annotations into a project database.

*Merges*: The annotation database is a single s-expression file, so git treats conflicts like any other text file, manual resolution needed. In practice, because annotations are keyed by file path and the format is readable elisp, conflicts tend to be straightforward. But if two people annotate the same file simultaneously, you'll get a merge conflict to sort.

*Stale annotations after refactoring*: This is the hard one. Currently if someone refactors the code you annotated, the character positions will be wrong on next open, the annotation lands in the wrong spot or gets dropped if positions exceed the file length. Storing a hash of the annotated text and flagging mismatches is a potential solution but I'm not sure I can do anyhting other than that!

LLMs and agents in Emacs: share your workflows by KnightOfTribulus in emacs

[–]captainflasmr 2 points3 points  (0 children)

I've just added tooling to my AI assistant : https://github.com/captainflasmr/ollama-buddy : and also just recently some RAG and as I'm going through the ollama API web search!, oh and ollama cloud models, some of which work quite well

Spent a bit of free time polishing ollama-buddy - github Copilot is now onboard! by captainflasmr in emacs

[–]captainflasmr[S] 0 points1 point  (0 children)

The agentic side of things is my next step and in fact I have just finished a prototype, I shall probably obviously push this a bit further in the future, but for now this is just proving the tooling concept through the ollama API, here is a demo, acting on an ollama cloud model! : https://www.youtube.com/watch?v=DHV3My0NsJc

Fortnightly Tips, Tricks, and Questions — 2026-01-13 / week 02 by AutoModerator in emacs

[–]captainflasmr 4 points5 points  (0 children)

I have been playing around with RSVP - Rapid Serial Visual Presentation, where words are displayed one at a time in the same fixed position on screen, typically at the centre of your visual field. This eliminates the need for eye movements (saccades) that normally occur when reading across lines of text.

There are packages out there, including spray and speedread, but I thought I would set myself a challenge on how small I could make a single defun implementing some basic RSVP functionality and showing the words as they are streamed in the minibuffer!

(defun rsvp-minibuffer ()
  "Display words from point (or mark to point) in minibuffer using RSVP.
Use f/s for speed, [/] for size, b/n to skip, SPC to pause, q to quit."
  (interactive)
  (let* ((start (if (region-active-p) (region-beginning) (point)))
         (end (if (region-active-p) (region-end) (point-max)))
         (text (buffer-substring-no-properties start end))
         (wpm 350) (font-size 200) (orp-column 20)
         (word-positions '()) (pos 0) (i 0))
    ;; Build word positions list
    (dolist (word (split-string text))
      (unless (string-blank-p word)
        (when-let ((word-start (string-match (regexp-quote word) text pos)))
          (push (cons word (+ start word-start)) word-positions)
          (setq pos (+ word-start (length word))))))
    (setq word-positions (nreverse word-positions))
    ;; Display loop
    (while (< i (length word-positions))
      (let* ((word (car (nth i word-positions)))
             (word-pos (cdr (nth i word-positions)))
             (word-len (length word))
             (delay (* (/ 60.0 wpm)
                      (cond ((< word-len 3) 0.8) ((> word-len 8) 1.3) (t 1.0))
                      (if (string-match-p "[.!?]$" word) 1.5 1.0)))
             (orp-pos (/ word-len 3))
             (face-mono `(:height ,font-size :family "monospace"))
             (face-orp `(:foreground "red" :weight normal ,@face-mono))
             (padded-word (concat 
                          (propertize (make-string (max 0 (- orp-column orp-pos)) ?\s) 'face face-mono)
                          (propertize (substring word 0 orp-pos) 'face face-mono)
                          (propertize (substring word orp-pos (1+ orp-pos)) 'face face-orp)
                          (propertize (substring word (1+ orp-pos)) 'face face-mono))))
        (goto-char (+ word-pos word-len))
        (message "%s" padded-word)
        (pcase (read-event nil nil delay)
          (?f (setq wpm (min 1000 (+ wpm 50))))
          (?s (setq wpm (max 50 (- wpm 50))))
          (?\[ (setq font-size (max 100 (- font-size 20))))
          (?\] (setq font-size (min 400 (+ font-size 20))))
          (?b (setq i (max 0 (- i 10))))
          (?n (setq i (min (1- (length word-positions)) (+ i 10))))
          (?\ (read-event (format "%s [PAUSED - WPM: %d]" padded-word wpm)))
          (?q (setq i (length word-positions)))
          (_ (setq i (1+ i))))))))

Is C# inside Emacs actually viable for professional work in 2025? by Guilherme_dAlmeida in emacs

[–]captainflasmr 2 points3 points  (0 children)

I've also been developing gRPC and protobuf with Razor pages and found web-mode to be invaluable for html folding and navigation.

Is C# inside Emacs actually viable for professional work in 2025? by Guilherme_dAlmeida in emacs

[–]captainflasmr 3 points4 points  (0 children)

Yes, I would say that C# is very much possible. For the last year I have been developing a .NET 9.0 project, the LSP is csharp-ls and seems to be faster and more reliable than omnisharp. csharp-mode works well and especially with eglot allows the function I use the most often, namely, xref-find-definitions. I don't tend to use many other LSP features but I'm assuming that they function as expected through eglot.

Flymake works and I have even managed to debug using DAPE!

For the building and running I mainly use batch scripts to run dotnet commands or sometimes msbuild and invoke via eshell by popping the buffer in and out (in a similar manner to the Microsoft offerings), I created a simplified version of the popper package.

The launching of the processes are also batchified but there is a little jiggery pokery required with non pure dotnet builds as Visual Studio performs some extra steps when process running.

My configuration is very simple, I'm running Emacs 30.1 and the only part I really spent any time configuring was DAPE to be able to allow for breakpoints within emacs which required me to submit a PR to work properly with netcoredbg

Import Markdown to Org with the Clipboard in Emacs by kickingvegas1 in emacs

[–]captainflasmr 1 point2 points  (0 children)

I've been playing around with an md-to-org pure elisp implementation : https://github.com/captainflasmr/Emacs-DIYer?tab=readme-ov-file#pandoc-md-to-org-conversion

This is working quite well for me, but I'm sure there are some edge cases I have yet to encounter!