home.social

#magit — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #magit, aggregated by home.social.

  1. RE: fosstodon.org/@tarsius/1163800

    Do you use #emacs and #magit or #transient ?

    Help one of the stand out #emacs package maintainers and developers by making a donation, no matter how small (ideally recurring).

    See also magit.vc/donate/

  2. Re: #Emacs for #ADHD

    @marlinz's "Constantly fighting for structure" includes "constantly fighting against friction, because the slightest friction can become paralyzing, especially additively."

    Conversely, removing distractions becomes a long-term exercise in continuous subtraction. Removing UI elements until only the essential is visible. Removing steps in workflows. Paradoxically, ADDING steps (single keystrokes) to workflows in order to reveal options in steps rather than presenting all the choices. Each reduction is tiny, but the cumulative effect—over years—is a huge reduction in stress and a huge increase in productivity throughout the day.

    Much more of the day in focus. Much more of the day in flow.

    For someone else's brain, context switching between a bunch of desktop apps might feel like the same cognitive burden as switching between #Emacs buffers. But for me, #OrgMode, #mu4e, and #magit have not just changed how I work.

    They allow me to control how I work, with results that have been a binary, qualitative improvement.

  3. I installed "b4" using "pipx", which sets up a virtual environment for the "b4" code and its dependencies. I looked for a way to set TMPDIR to the current working directory when running "b4".

    After some research, I found I could create a "foo.pth" file in the pipx virtual environment's site-pakages directory, which a 1 liner:

    import os; os.environ['TMPDIR'] = os.getenv('PWD')

    This did the trick! b4 prep --edit-cover now works with emacsclient and Magit!

    5/5

  4. I'm not sure why Magit really cares. I tried using advice to get around this, but didn't quite get it to work.

    Looking at the "b4", I found the Python code for editing the cover letter. It creates a temporary directory and then "COMMIT_EDITMSG" in that directory. Looking at the documentation for tempfile.TemporaryDirectory suggested using an environment variable like TMPDIR. Okay, this is another idea, set TMPDIR to the current working directory.

    4/5

  5. The file is showing in Emacs. I tried to exit the emacsclient session with C-x #, and it asked if I wanted to create the directory where the file lived. Sure, I say. But at this point its useless. So I looked for ways to work around or fix this problem. With Emacs, I suspect Magit was involved. Looking at the source code, I found the places where this error was triggered. There was no easy way to get around this, other than put the file in the repository directory tree.

    3/5

  6. "b4 prep --edit-cover" uses the EDITOR environment variable to figure out which editor to use. Apparently the default for bash on Fedora 42 is to set EDITOR to /usr/bin/vim. While I'm quite versed in vi (the predecessor to vim), I prefer to use Emacs. So I set EDITOR to emacsclient and tried again. But this time I got an error about the file not being in a Git repository, and b4 said the file hadn't changed.

    2/5

  7. I recently found a small typo in some Linux kernel documentation, and posted a patch to get it fixed. There were some problems with the patch, and it was suggested I use a tool called "b4" b4.docs.kernel.org/en/latest/i. I started using it for my next patch revision, but ran into a snag when editing the patch cover file.

    1/5

  8. Started playing with and aider.el for aaaaaand so far I'm not impressed.

    My colleague and good friend, who haven't really found a use-case for AI yet, thinks it rocks however. He's more of a low-level kernel coder, so that was surprising.

    I really dislike the default of it committing stuff to git without my review first. I mean, I know I can revert, I have for this, but I don't trust robots working in the background without my approval.

  9. perplexity.ai/search/i-wish-to

    忘了分享這則對話。

    基本上我要它做一個 interactive function 給我,能夠吃 "ghq list -p" 然後然我以 fuzzy search 的方式選一個路徑,然後要用 magit 去打開我所選的路徑。

    基本上第一個答案給的就已經是可動而且是 minimum implementation,沒有依賴如 ivy 或 helm 等外部的函式庫。

    fuzzy search 的部分是中途增加的,也是沒有是使用外部函式庫。

    我後來手動把這段

    (split-string (shell-command-to-string "ghq list -p") "\n" t)

    調爲

    (process-lines "ghq" "list" "-p")

    主要是 error handling 較好 (shell command 可能會出錯)。

    但基本上沒什麼不乖的(?)地方了。

    #emacs #elisp #magit #ghq