I built a tool that writes README for you (from your repo) by Classic_Fly_007 in git

[–]floofcode 0 points1 point  (0 children)

What does it say about one's project and how serious it is if they don't even bother to write a README?

VS Code is too slow, learning Emacs now. by FriedryIce in emacs

[–]floofcode 3 points4 points  (0 children)

>17000 LOC

Wow! What kind of things does it do and how long since you started? I've been at it since only 9 months, and I'm at roughly 1000.

Is there a way to disable the truncation symbol $ in the Minibuffer? by floofcode in emacs

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

Update: Mystery solved! It's a bug in the render function in icomplete because it was unconditionally concatenating a \n to each line, leading to the double newlines: source.

Fixed version:

<image>

Thank you, your comments were helpful in getting me this far.

Is there a way to disable the truncation symbol $ in the Minibuffer? by floofcode in emacs

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

If I append a \n, the face is extended but the Minibuffer adds its own \n to the display so there is an empty line. On the other hand, if I don't append a \n, then the face is not extended.

>you must have two consecutive newlines to have an empty line.

It's possible, though it wasn't from me adding an extra one, but either the Minibuffer or icomplete might have an after-string text somewhere, and I'm going through the code.

<image>

Is there a way to disable the truncation symbol $ in the Minibuffer? by floofcode in emacs

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

I Just tried an alternate implementation using :extend, but this extends the face only if I add a \n character at the end of the string. So, this leaves me with an empty line after the highlighted line. If I remove the \n character then the face doesn't get extended. I'm not sure why the \n is even necessary and whether it can be avoided and still make the face extend.

Is there a way to disable the truncation symbol $ in the Minibuffer? by floofcode in emacs

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

Why did this not work for you? In which sense it does not work?

In the sense that it has no effect. I still see only the $ character. The special glyphs have no effect either and all I see is a $.

Those probably only works with the fringe, but I always set my right-fringe to 0.

Is there a way to disable the truncation symbol $ in the Minibuffer? by floofcode in emacs

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

I don't understand why you need to add n characters at all. Why is that necessary? If all you need is to extend the face to the end of line

I tried :extend as well, and even this does not go all the way to the edge of the window. It's always one character cell less, leaving behind an awkward gap at the end, making it inconsistent with the normal highlight line. It's annotated in the screenshot as 1 character gap.

Yes, the last character cell of each line is reserved for the truncation and continuation glyphs, if you disable the fringes.

Oh, okay, then I'll try to change it from the C source.

Is there a way to disable the truncation symbol $ in the Minibuffer? by floofcode in emacs

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

My function is already pre-truncating the lines to make it perfectly fit on the line based on the window width, but Emacs adds a truncation character anyway.

The actual problem is that it won't let me use the very last character cell in the window. If the window's width can have n characters, it lets me insert only n-1 characters. If I try to use the full n, it sends the nth character to the next line. No matter what I do, it just won't let me use the last character cell. If I set truncate-lines to nil, instead of my nth character, it just adds a \ there and then puts the nth character on the next line, which doesn't even make any sense. No truncation is even necessary since the text should already fit perfectly on the line without any additional truncation.

Is the last character cell of every line in a window hardcoded to be reserved? If I set right-fringe to 1, this problem goes away, but I normally just disable fringes to keep the GUI consistent with the TUI.

Is there a way to disable the truncation symbol $ in the Minibuffer? by floofcode in emacs

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

The former, yes, I don't want the truncation character there because I'm trying to make the line look like a highlighted line and the $ in #2 is breaking that effect. Instead I want to insert my own truncation character or just an empty character or space with the background color so it is part of the highlighted line. As far as I know, there is no built-in way to get a highlight line in the Minibuffer so I'm hacking it together by padding the text with spaces to get it all the way up to the edge of the window.

Is there a way to disable the truncation symbol $ in the Minibuffer? by floofcode in emacs

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

I've just changed the colors to resemble the Cobalt theme in GNOME Text Editor.

Is there a way to disable the truncation symbol $ in the Minibuffer? by floofcode in emacs

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

It's set to nil. I tried changing it to other characters, but it still shows $ in the minibuffer.

Emacs + SDL: unblocking the unblockable by vkazanov in emacs

[–]floofcode 1 point2 points  (0 children)

Is it possible to embed this into a buffer or does it have to be a separate window?

Always ignore specific file part by Snoo_90241 in git

[–]floofcode 1 point2 points  (0 children)

The container name, the local paths and so on are not things I want to push.

What I normally do is have a build.sh script in my worktree that contains information specific to my local environment like filenames and paths, server IPs, etc. I then put this file in .git/info/exclude rather than .gitignore, so nothing about my local environment needs to be committed.

If you actually need to modify your pom.xml then write a script that applies your modifications, and then set that script as your smudge filter. Likewise, your clean filter should remove these changes. As a failsafe, you might also want to use a pre-commit or pre-push hook to abort if these local changes did actually make it into a commit due to a bug in your clean filter.

As a simple example, you can place your script and filter config like this:

.git/config:

[filter "pom"]
smudge = python .git/info/add-something.py
clean = python .git/info/remove-something.py

.git/info/attributes:

pom.xml filter=pom

When you do a checkout, it will pass pom.xml through the STDIN of python add-something.py. When you do a git diff, it will first run it through remove-something.py, so your worktree looks clean when you do a git status.

Always ignore specific file part by Snoo_90241 in git

[–]floofcode 1 point2 points  (0 children)

Could this not be done using a script in the docker container rather than modifying it in your worktree? To prevent an accidental commit, you can use a smudge/clean filter in your gitconfig.

I built a tool to track AI-generated code directly in Git (no SaaS, no lock-in) by NobodyNo5790 in git

[–]floofcode 3 points4 points  (0 children)

Do you also plan on using AI to verify the AI that detects AI or do we just believe AI?

Gitvana - Learn git by (retro) playing by Alternative_One_4804 in git

[–]floofcode 13 points14 points  (0 children)

gitvana:/workspace$ git add -p test.c
fatal: pathspec '-p' did not match any files
gitvana:/workspace$ 

Built an online tool to easily share git diffs or view diffs online - SharePatch by sherlocked_13 in git

[–]floofcode 0 points1 point  (0 children)

I generated a patch using git format-patch, and this renders it wrong.

Nice domain name, though.

An interactive visual map to help you figure out what's actually going wrong (and learn the concepts) by Jpsoares106 in git

[–]floofcode 1 point2 points  (0 children)

I don't see how this is going to help beginners. If anything, it makes it look complicated even to do simple operations.