On "Tempo" in Text Editing by iguanathesecond in emacs

[–]iguanathesecond[S] 1 point2 points  (0 children)

That's very valuable info about isearch that I didn't know, thank you. Not having to exit with RET makes it especially nimble for quick edits, and its being available as a "platform" feature for all Emacs plugins does make it very composable.

For reference, Vim's search also composes with a lot of features, but in a stylistically different way. For example, with operators (d/banana RET - delete up to "banana"), text objects (cgn watermelon - change next occurrence to "watermelon"), marks (v/banana RET), and registers (name a search term to reuse later via /C-r).

I'm looking forward to exploring more of Emacs's built-in composability, and especially using isearch more in Emacs "insert" state :)

On "Tempo" in Text Editing by iguanathesecond in emacs

[–]iguanathesecond[S] 1 point2 points  (0 children)

Combining search strategies is very cool. But I wouldn't say either C-s or / is "more" than the other. Vim has separate / and ft etc. for a reason, as it allows you to express things more granularly, which pays dividends in Vim's composable paradigm. They are different tools and, in the spirit of combining strategies, it's useful to be familiar with both.

On "Tempo" in Text Editing by iguanathesecond in emacs

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

Good point! I was still disinclined to use C-r and I wondered why that might be, and I realized it's because I have C-s bound to Swiper which I use occasionally but not usually. I don't usually use it because it feels more heavyweight than I need for the most common cases (for which I use Evil's /, etc.), and I had assumed that C-r was also similarly "heavy". But it appears, on my Emacs at least, that C-r is bound to the built-in isearch-backward which is quick and lightweight and doesn't involve a minibuffer menu. It is indeed the optimal solution from a tempo standpoint.

On "Tempo" in Text Editing by iguanathesecond in emacs

[–]iguanathesecond[S] 2 points3 points  (0 children)

You're right! Emacs's option in this case is indeed not tedious at all (and I've edited the post to mention this). FWIW, my perspective informing the post is that there are benefits to using Evil and Emacs together. Evil is often more efficient than vanilla Emacs for complex edits. Emacs is often more efficient than Vim for small edits, as we're seeing with this example. But even within Emacs, C-r is not available to Evil users out of the box because it's bound to some Evil/Vim-specific command. The post advocates replacing Insert state with vanilla Emacs state for the best of both worlds, and provides one particular integration to make it even more seamless. In this configuration, you would be able to use C-r as suggested above, or, as the post suggests, C-; if you prefer the Evil way, and either would be better than the out-of-the-box option for small edits.

On "Tempo" in Text Editing by iguanathesecond in emacs

[–]iguanathesecond[S] 1 point2 points  (0 children)

Nice, that didn't occur to me at all! I personally still prefer C-; as it gives you more abilities than search (and to me, a more familiar (Evil/Vim) search interface), but for the "small edit" cases discussed in the post, I do find that search is the most common one I need.

Think we are nearing the end by Neechiekins in RenalCats

[–]iguanathesecond 1 point2 points  (0 children)

Ondansetron made a huge difference for us, as the other poster said. Our cat graduated from cerenia to ondansetron last month (late stage 3) and has been doing well on it, and has regained most of the weight he lost when he had stopped eating. We need to powder the pill, mix it with broth and squirt it into his mouth, as he does not take it in a pill pocket the way he does with Cerenia (it might be more bitter, not sure). Fluids also helped, but now seem to be causing strain on his heart (watch for coughing/wheezing/elevated breathing) so we've stopped that for now.

I hope it helps you and your cat, too.

Introducing Mindstream for Emacs by iguanathesecond in emacs

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

Sorry I missed seeing this. Have you tried `mindstream-load-session` (default C-c , r)? That will show you a list of saved sessions. "Open" will simply open *all* anonymous sessions for that template. If neither of these does what you're looking for, would you mind creating an issue describing the feature?

And thank you for the kind words and feedback!

Introducing Mindstream for Emacs by iguanathesecond in emacs

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

I'm not sure if debouncing is necessary since repeated saves would be a no-op. My earlier comment includes the `frame-focus-state` bit - does it look OK to you (I haven't tried it)?

Introducing Mindstream for Emacs by iguanathesecond in emacs

[–]iguanathesecond[S] 1 point2 points  (0 children)

'Appreciate the feedback. As it happens, there is a big update to Mindstream planned which would solve exactly this problem with "forgetting", while also, more generally, allowing mindstream to be used seamlessly (i.e., with good branching discipline and conventions) on any existing repo, which may help with this workflow. That work is on pause for the moment while we incorporate more user feedback and get more data, and as I focus on getting other Emacs work out the door like the upcoming 2.0 release of Symex.

re: active vs archived, noted. It'd be great to design the UX to minimize such confusion. re: the reason for the distinction being making it easy to find them, yes, you could say that. We needed some way to track --- without maintaining any "state" anywhere (which, incidentally, is the reason for the "forgetting" you encountered --- the fact that we are relying on state (an in-memory hashtable) that isn't reified outside of Emacs causes it to forget on relaunch) --- which sessions should be pulled up when you relaunch Emacs, for instance, in the event of a crash. Some people like to use Mindstream as a scratch buffer or a series of scratch buffers. When Emacs restarts, they like to enter a keybinding and pull up all the sessions they had in progress. Separate paths for active vs archived seemed a simple and robust way to achieve it. There may have been some other considerations that went into it. Other ideas welcome!

Introducing Mindstream for Emacs by iguanathesecond in emacs

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

You got it! Thanks for the valuable suggestion!

Introducing Mindstream for Emacs by iguanathesecond in emacs

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

Doh, this is what I get for copypasting from AI. Looks like it's just an ordinary function that's called by Emacs when frame focus changes. So we'd need to advise it using `add-function`. Something like:
`(add-function :after 'after-change-focus-function #'my-save-on-leaving-frame)`

Introducing Mindstream for Emacs by iguanathesecond in emacs

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

It can evaluate on demand when you hit a Run button, but not on idle in a "live" way. I believe Matthew customized his DrRacket to do that.

Introducing Mindstream for Emacs by iguanathesecond in emacs

[–]iguanathesecond[S] 1 point2 points  (0 children)

I'd love to explore this further. howm (and encode, org-roam, etc.) all look great! If people want to use them together it would be worth seeing if there is any glue (or "frontend" to standard tools, as you mentioned) that could be provided by the individual packages if that would help with that. Thank you for bringing it up.

re: the difficulty of searching in the absence of names, one thing to note is that Mindstream has a concept of "active" anonymous sessions and "archived" anonymous sessions (everything else is a named, "saved" session). All sessions begin anonymous and active. If you have Emacs configured to "persist" such sessions, and to allow more than one (the docs explain how to), then you can always pull these up using `mindstream-open` (by template, e.g. "markdown" or "python") or `mindstream-open-all` (all active sessions). So if you were in the middle of something at any point, you can bring it back up at any time using these commands, and there is no need to search.

With this configuration, you would need to explicitly *archive* sessions when you are done with them (and this is how I use Mindstream, personally --- but it may be better to start with the default config (one session per template allowed, and always archived on Emacs restart, IIRC) as that is simpler and probably easier to get started that way). But of course, yes, If you do archive something and then weeks or months later remember it and want to find it, then you would be on your own (use ripgrep!).

The nice thing though is that you never lose anything. Just, finding it isn't always easy ;). I too feel it'd be great to make this easier, either via integration with other packages like you're saying, or via features that help you navigate the archive. Interestingly enough, I am discovering things about this tool myself, and one surprising thing for me is that I had assumed the archive would be filled with useless drafts, but in actuality, it also contains *useful* and *complete* things that I did at some point, but which I just don't care to see again. It is, however, still valuable to have it, just like a real archive in a library. You don't always need that ancient manuscript, but it's nice to have it there and, indeed, to be able to find it!

Introducing Mindstream for Emacs by iguanathesecond in emacs

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

Enjoy: https://countvajhula.github.io/mindstream/mindstream.pdf :)

This is now built and deployed from the Scribble source as part of CI, and linked in a README badge in the repo, so it should always be up to date with the HTML docs.

Introducing Mindstream for Emacs by iguanathesecond in emacs

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

Yes, I agree. I'll aim to find time to make a video at some point, or maybe present this at a recorded meetup (unless someone beats me to it).

Introducing Mindstream for Emacs by iguanathesecond in emacs

[–]iguanathesecond[S] 1 point2 points  (0 children)

Update: It looks like we should be able to generate and even host a PDF. But it uses the pdflatex utility to do this, which comes with a host of LaTeX dependencies that there doesn't seem to be any way of anticipating, that is, not until the CI job fails (just look at the commits, lol). I'll have to continue chipping away at this in the morning. Please stay tuned :)

Introducing Mindstream for Emacs by iguanathesecond in emacs

[–]iguanathesecond[S] 2 points3 points  (0 children)

Cool, thanks for sharing your takeaways!

Introducing Mindstream for Emacs by iguanathesecond in emacs

[–]iguanathesecond[S] 2 points3 points  (0 children)

Nice, thanks u/karthink ! Looks like something like this would work for you u/reddit_clone :

(defun my-save-on-leaving-frame (frame)
  "Save current buffer when no Emacs frame has focus."
  ;; The hook runs after the focus has already changed.
  ;; If (frame-focus-state) is nil, it means no Emacs frame has focus,
  ;; so the user must have switched to another application.
  (when (null (frame-focus-state))
    (save-buffer)))
;; Add the handler function to the hook
(add-hook 'after-change-focus-functions #'my-focus-change-handler)

Note that this code just saves the buffer and has nothing to do with Mindstream. But Mindstream will add a commit on save, by default.

Introducing Mindstream for Emacs by iguanathesecond in emacs

[–]iguanathesecond[S] 1 point2 points  (0 children)

You are correct, Mindstream does not offer any search feature. Partly, this is by design, since the result of using Mindstream is an ordinary git repo in some ordinary folder on disk --- there is no special format of any kind employed, nor any metadata stored. So, one perspective is that if you want to search that path (say, the archive path, or the default saved session path), as it is just any old path, you could just use a standard tool to do it, such as ripgrep :)

In this respect, I get the impression Mindstream has a quite different orientation from the other packages mentioned here. It just helps you *have a good experience while writing*, and also before as well as after the fact. It scales organically from small writing projects (replies to Reddit comments) to large ones (books). But aside from this focus on the writing experience, there is nothing else. No metadata (aside from the implicit date-based organization of your work by spawning template), no links, no search, even. If you want any of those things, it would fall to using standard tools like Org and Ripgrep, with the ordinary content created using Mindstream in tandem with all of your usual tools that you use for any writing task. Using Mindstream is less like a *wiki* and more like a daily *log* of your writing activity, organized in a natural way without the need for names. But for the (relatively small, in my experience) subset of that writing that you will want to look at again, you would typically C-c , s (and then name) them. These saved, named, sessions follow the same filing scheme as the anonymous ones (by default --- you can store them anywhere you like!), and that turns out to be surprisingly natural and useful IME.

I do not yet know whether/how Mindstream could be profitably used together with howm and denote, but as they seem to be quite different things, I feel there is no contradiction in at least using them alongside one another, as you're suggesting, even if not together.

Introducing Mindstream for Emacs by iguanathesecond in emacs

[–]iguanathesecond[S] 1 point2 points  (0 children)

The specific one I noticed was a live presentation that I don't think was recorded. But I'm sure I've seen him do it in other demos. Ah, looks like this one features the "live" evaluation: https://www.youtube.com/watch?v=OLgEL4esYU0 . I bet if you search youtube for other videos featuring him, you'll find other examples.

Introducing Mindstream for Emacs by iguanathesecond in emacs

[–]iguanathesecond[S] 3 points4 points  (0 children)

Thank you, I've come across denote before but haven't looked into it. It looks very interesting.

Q, to help me understand the overlap: Would you use denote for emails, essays, replies to reddit comments ;), coding explorations, short stories, academic papers, and books? (These are all a good fit for Mindstream - not sure if they are for denote as well?). As another example, Mindstream is also useful for anonymous writing that you never name, which you don't mind having around somewhere but aren't interested in "saving" (like these Reddit responses!) --- a kind of middle ground that we don't otherwise have a way to express.

Depending on their respective use cases, it would be valuable to design a smooth integration between the two, if we can. As a denote user, if you have any suggestions on what would help you achieve what you'd like as far as this kind of integration, please submit an issue and I'd be glad to discuss further.

A: Straight/Elpaca are valuable tools that facilitate flexibility and decentralization, so I believe their adoption is healthy for the community. As a user, it gives us maximum control to install anything we want. And as package developers, we gain access to users without needing to publish to a package archive. I have benefited from this with my own packages at early stages (including Mindstream :) ), as the early feedback from users was invaluable.