- Updates Magit and Transient
- Plays with
C-x a
in Magit’s menus - Very nice! I love that it highlights the changes. Thanks!
- 0 Posts
- 59 Comments
7890yuiop@alien.topBto Emacs@communick.news•It is recommended to not use lambdas in (add-hook) expressions. Is there a better way to do (setq)s for major modes without (add-hook) at all?English1·2 years ago- They used to be hard to remove. As mentioned,
M-x remove-hook
has alleviated that to an extent. - They are still harder to update because you need to remember to remove the old one when adding the replacement. I’ve seen any number of cases where people were inadvertently adding lots of slightly different versions of their function to a hook variable, and wondering why they were still having problems.
- They are very unhelpful when you inspect the hook variable. Rather than seeing a function name (from which you could jump to the nicely-formatted function definition), you see at best the lisp code all jammed into a single line, and at worst a heap of unreadable byte-code.
Use named functions. It’s just better.
- They used to be hard to remove. As mentioned,
7890yuiop@alien.topBto Emacs@communick.news•How can I remove repetition in python REPL?English2·2 years agoCheck
C-h v comint-process-echoes
in that buffer.If it’s
nil
, try(setq-local comint-process-echoes t)
If that fixes it, then you can use this repl’s major mode hook to do that automatically.
7890yuiop@alien.topBto Emacs@communick.news•What is the point of using Vterm or Eat?English1·2 years agoYou mean “as opposed to using term.el” ?
Performance, mostly. (I’m still using term myself, but suspect I’ll switch to eat at some point.)
7890yuiop@alien.topBto Emacs@communick.news•Using local language server for remote filesEnglish1·2 years agoHowever, if attempt it on a remote file (opened over tramp) it says it can’t find the binary and prompts me to point it at it. I could do that, but then the language server would start on that same machine and that’s a no go since it’s a shared login machine.
How would the local language server inspect a file which is on some other machine?
You should start by establishing how that is going to work, and add that information to your question.
7890yuiop@alien.topBto Emacs@communick.news•I want to journaling, but I need a few specific things. Can you tell me if Emacs can do them, before start learning it?English1·2 years agoNote that Emacs can interface with tools for encrypting and decrypting (and can work seamlessly with encrypted files in many cases), but Emacs itself is not performing those activities. There are many ways of encrypting things, and a decision on which approach to use is probably not going to be entirely tied to Emacs (although you’ll want to be confident that the two things will work together).
If you’re sold on sticking with Emacs, then learning elisp will unquestionably pay dividends, and the more you learn the more you’ll be able to do (but you don’t need to understand everything in order to do anything).
and how exactly can i improve my emacs experience if i learned elisp?
That’s the thing – it’s up to you. The ability to “scratch any itch” is what elisp give you. That doesn’t mean any given thing is easy to do (although it might be) but, to a significant extent, if you can identify a problem then implementing a solution is also a possibility.
7890yuiop@alien.topBto Emacs@communick.news•I tried neovim and helix, and finally vim-likes are becoming more emacs-likeEnglish1·2 years ago…Coming Soon to an Emacs “Games” menu near you! 🐸
7890yuiop@alien.topBto Emacs@communick.news•Why does pop-to-buffer break save-excursion?English1·2 years agoThis is 100% expected behaviour.
save-excursion
has nothing to do with windows.Perhaps you are confused about the phrase “…and the current buffer [is] restored”. The “current buffer” is independent of the buffer in the selected window, and moreover need not be displayed at all. The current buffer is simply the buffer which is being acted on at the time.
7890yuiop@alien.topBto Emacs@communick.news•Why does pop-to-buffer break save-excursion?English1·2 years agoThis is 100% expected behaviour.
save-excursion
has nothing to do with windows.Perhaps you are confused about the phrase “…and the current buffer [is] restored”. The “current buffer” is independent of the buffer in the selected window, and moreover need not be displayed at all. The current buffer is simply the buffer which is being acted on at the time.
7890yuiop@alien.topBto Emacs@communick.news•How can I become a more "proficient" Emacs user? Esp. in regards to developingEnglish1·2 years agoI feel like whenever I am browsing emacs content online there are still many topics for me to discover.
This will never not be the case.
My suggestions are:
- focus on addressing known pain points
- if something seems very popular, it might be worth trying to learn why and whether it could be beneficial to you as well
- if something else sounds super-interesting, take a look
- don’t fret about not keeping abreast of everything – it’s almost certainly impractical
7890yuiop@alien.topBto Emacs@communick.news•Making Emacs without terminal emulator a little more usableEnglish1·2 years agoThere is a thing which provides zsh completions. It’s zsh. If that’s what you’re wanting, then maybe don’t stop using it?
And in case the video doesn’t say it:
Ediff has its own user manual:
C-h i g (ediff)
7890yuiop@alien.topBto Emacs@communick.news•emacs org for brainstorming is not optimalEnglish1·2 years agoHave you considered an
org-capture
template fitting your desired format?
7890yuiop@alien.topBto Emacs@communick.news•Does anyone else feel like use-package might be the wrong abstraction, or do I just not get it?English1·2 years agoI don’t use
use-package
, but I’ve seen a lot of questions from users who do use it but don’t understand how to use it, or what it’s going to expand to, or what the things that it expands to actually do. My conclusion has been that for some users it introduces as many problems as it solves. I think those users would be better off if they learned how to manage their config without it first, and only considereduse-package
after understanding the more fundamental building blocks upon which it is built.It’s certainly not something you need to use, in any case. It’s clearly an invaluable system to many users, but if you don’t get along with it, don’t use it.
7890yuiop@alien.topBto Emacs@communick.news•OrgNote - mobile app inspired by org-roam and org-roam-ui (early beta)English1·2 years agoAwesome; thank you.
7890yuiop@alien.topBto Emacs@communick.news•Emacs natively on Wayland (PGTK) is slower than on Xwayland (Lucid) Also fonts are not looking good on both (but good on X).English1·2 years agoThe author of the emacs pgtk code says that no one who has X installed should use pgtk – he’s stated on several occasions that if you have X at all then you should use a supported X toolkit in Emacs for best results.
I’ve seen counter-arguments that pgtk is still beneficial if you happen to have a “high DPI display”, but I believe that’s the only argument I’ve ever seen for using pgtk under X.
I always build
--with-x-toolkit=lucid
myself, and can happily vouch for that one. I don’t use Wayland, though.
7890yuiop@alien.topBto Emacs@communick.news•My code to send raw keystrokes to ansi-term doesn't work with Emacs 29.1English1·2 years agoLooks like a bug (whether documentation or code) as
read-kbd-macro
still claims to return a string if possible, but nowadays it forcibly returns a vector. PleaseM-x report-emacs-bug
to get that clarified.You could extract a string of characters from the vector:
(mapconcat (lambda (event) (and (characterp event) (char-to-string event))) (read-kbd-macro "C-c"))
But if you look at the code for
read-kbd-macro
you’ll see that it calls this:(defun edmacro-parse-keys (string &optional _need-vector) (let ((result (kbd string))) (if (stringp result) (seq-into result 'vector) result)))
Hence the string value you wanted is coming from
kbd
:(kbd "C-c") => "^C"
There are of course arguments you can pass to
kbd
which won’t return a string, but that would always have been the case for your code, and presumably you’re not attempting to use any of those.
Assuming that you are referring to plain text…
First of all you need to establish why a plain text URL is doing something when you click on it, as your new requirement is going to need to interact with that.
(I’m guessing
goto-address-mode
is enabled, so I would check that first.)