I get nothing.
- 2 Posts
- 25 Comments
github-alphapapa@alien.topBto Emacs@communick.news•How to have a file manager appear on the side when I open emacs?English1·2 years agoPlease 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.
github-alphapapa@alien.topBto Emacs@communick.news•guy's give me a good reason to switch to emacsEnglish1·2 years ago“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.
github-alphapapa@alien.topBto Emacs@communick.news•How to version control elpa directory to work in both linux and windows?English1·2 years agoProbably 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 usecl-loop
andpcase
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
andseq
are built-in to Emacs and are used in core Emacs code. There’s no reason not to use them. Second,dash
ands
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. ;)
github-alphapapa@alien.topBto Emacs@communick.news•Combining use-package and generalEnglish1·2 years agoWhy did you add
:after general
? I use:general
in many of myuse-package
forms, but never have I added that.
github-alphapapa@alien.topBto Emacs@communick.news•Combining use-package and generalEnglish1·2 years agoYou’ve asked for help with code but haven’t shown the code that you tried.
github-alphapapa@alien.topBto Emacs@communick.news•Changing the value of a theme variableEnglish1·2 years agoMust be a variable then, not an option. Just use
setq
on it. If you want to automate it, you could adviseload-theme
similarly to how the function I linked does.
github-alphapapa@alien.topBto Emacs@communick.news•Changing the value of a theme variableEnglish1·2 years agoYou 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.
github-alphapapa@alien.topBto Emacs@communick.news•Share your org-mode agenda theme/screenshot (elisp included to auto-generate based on sample org file)English1·2 years agoHere’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 3org-ql-search
views.FYI, Org QL recently gained Embark support, so you can
C-.
on one of theorg-ql-view
items, just like in an Org Agenda buffer, and act on them, as well as candidates from theorg-ql-find
series of commands.(And before someone asks, the theme is
ef-elea-light
by Prot.)
github-alphapapa@alien.topBto Emacs@communick.news•Dired drag files, trival but remarkable effectiveEnglish1·2 years agoThis 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.
github-alphapapa@alien.topBto Emacs@communick.news•my pain points with Emacs code search and how I fixed themEnglish1·2 years agoYes, so how does Consult relate to not using Vertico anymore?
github-alphapapa@alien.topBto Emacs@communick.news•my pain points with Emacs code search and how I fixed themEnglish1·2 years agoAny mention of code search should probably include the built-in
project-find-regexp
.
github-alphapapa@alien.topBto Emacs@communick.news•my pain points with Emacs code search and how I fixed themEnglish1·2 years agoI’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?
github-alphapapa@alien.topBto Emacs@communick.news•New version of Emacs Writing Studio: A configuration for authorsEnglish1·2 years agoThat 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.