I get nothing.
I get nothing.
Please do not answer if you are not willing to tell me exactly what to put in my init.el file.
Please do not ask if you are not willing to google your question first. We are not ChatGPT.
“i want a video or a proof” that you googled these questions and found no answers
Since this question is asked at least weekly, you should have.
We do users like this no favors by indulging them.
Probably not what you want to do, but IIUC you could run Emacs from Cygwin and it wouldn’t have that problem.
These should be functions instead of macros.
As well, being that simple, they shouldn’t generally exist at all. Rather, the dolist
forms should just be inlined. (This is probably the usual case of a user who just learned about macros and is excited to use them, and so overuses them. We’ve all been there. :)
Emacs is more like a piece of marble. Harder to work with but has so much more potential.
More like a ball of clay: infinitely and trivially malleable. And you can bake parts of it into ceramic whenever you want.
My first suggestion would be to use plz
for HTTP. Then I’d use cl-loop
and pcase
to simplify the rest of the code. Here’s a partial rewrite with a TODO for further exercise. :)
(defun wikipedia-article-references (subject)
(let* ((url (format "https://en.wikipedia.org/wiki/%s" (url-hexify-string subject)))
(dom (plz 'get url :as #'libxml-parse-html-region)))
(cl-loop for cite-tag in (dom-by-tag dom 'cite)
for cite-class = (dom-attr cite-tag 'class)
collect (pcase cite-class
((rx "journal")
(let ((a-tag (dom-search cite-tag
(lambda (tag)
(string-prefix-p "https://doi.org" (dom-attr tag 'href))))))
(cons (concat "doi:" (dom-text a-tag))
;; TODO: Use `string-match' with `rx' and `match-string' here.
(let* ((cite-texts (dom-texts cite-tag))
(title-beg (1+ (string-search "\"" cite-texts)))
(title-end (string-search "\"" cite-texts (1+ title-beg))))
(substring cite-texts title-beg title-end)))))
((rx "book")
(let ((a-tag (dom-search cite-tag
(lambda (tag)
(string-prefix-p "/wiki/Special:BookSources" (dom-attr tag 'href))))))
(cons (concat "isbn:" (dom-text (dom-child-by-tag a-tag 'bdi)))
(dom-text (dom-child-by-tag cite-tag 'i)))))
(_ (let ((a-tag (assoc 'a cite-tag)))
(cons (dom-attr a-tag 'href) (dom-text a-tag))))))))
Regarding this:
And yes, I know that I could probably use a library like s, dash, seq, or cl, but I try to keep my elisp functions free of those kind of things
First of all, cl
and seq
are built-in to Emacs and are used in core Emacs code. There’s no reason not to use them. Second, dash
and s
are on ELPA and are widely used; it’s largely a matter of style, but they are solid libraries, so again, no reason not to use them. They don’t have cooties. ;)
Why did you add :after general
? I use :general
in many of my use-package
forms, but never have I added that.
You’ve asked for help with code but haven’t shown the code that you tried.
Must be a variable then, not an option. Just use setq
on it. If you want to automate it, you could advise load-theme
similarly to how the function I linked does.
You can do M-x customize-option RET mode-line-padding RET
, or if you want to do it only for that theme, see https://github.com/alphapapa/unpackaged.el#customize-theme-faces for code that does that for faces; you could adapt it to do the same for an option.
Here’s an example of one of my current views: https://i.imgur.com/aZIncEM.png I use bufler-workspace
to save and restore a tab-bar tab of 4 windows, the left one being the project’s Org file, and the right ones showing 3 org-ql-search
views.
FYI, Org QL recently gained Embark support, so you can C-.
on one of the org-ql-view
items, just like in an Org Agenda buffer, and act on them, as well as candidates from the org-ql-find
series of commands.
(And before someone asks, the theme is ef-elea-light
by Prot.)
This feature is supported only on X Windows
Friendly correction: It’s called the X Window System, X11, or simply X (Xorg now being the standard implementation of it). I tell you this only because if you call it “X Windows” it sounds like you don’t know better. :)
I don’t use worktrees very often, but when I do, I just use them simply: I make a worktrees
subdirectory in the repo root, then use Magit to check out worktrees into subdirectories of that.
Yes, so how does Consult relate to not using Vertico anymore?
Any mention of code search should probably include the built-in project-find-regexp
.
I’m looking into dropping Vertico after I upgrade to 29. It’s almost incredible that Minad’s user focus and humility make that a potentially reasonable option, and I really appreciate the fantastically sound design of his completion ecosystem.
What do you mean? Vertico is a library that provides a UI for displaying completions; Consult is a library that provides commands to select items with completion. The two libraries complement each other.
Again, look at its history. Every comment sounds like it’s written by GPT. And it keeps talking about email marketing out of context. And it’s not participating in any communities, it’s just spamming comments randomly to farm karma. And, look, 3.2k comment karma on an 8-day-old account. Does that really seem legit to you?
That account is a spambot. Please report it so it gets banned.
I hesitate to be the curmudgeon here, but if you can’t–or won’t–bother to visit youtube.com and type “emacs” into the search box, then you probably won’t enjoy using Emacs. Emacs is most appreciated by people who take a bit of initiative.