
Emacs
- protesilaos.com Emacs: modus-themes version 4.3.0
Information about the latest version of my highly accessible themes for GNU Emacs.
-
[SOLVED][HELP] Disable certain minor modes w/ elisp
See my reply below (https://lemmy.ml/comment/3972018) for a working solution.
---
I've got quite a few useful minor modes enabled globally, namely
puni-mode
anddisplay-line-numbers-mode
.However, I'd like to be able to disable (one or more of) them for certain major modes. For example, I don't want puni or display-line-number to be activated when using
vterm
.I've been trying to make the following snippet do the job for me to no avail. What am I missing?
I'd appreciate any hints/help 🙏
---
```lisp (defvar bahman/display-line-numbers-mode.disabled-modes '(vterm-mode erlang-shell-mode) "Disable `display-line-numbers' for the specified modes.")
(defvar bahman/puni-mode.disabled-modes '(vterm-mode) "Disable `puni-mode' for the specificied modes.")
(defun bahman/after-change-major-mode-hook.disable-minor-modes () "Disable certain minor modes for certain major modes 🤷. See
bahman/display-line-numbers-mode.disabled-modes'
bahman/puni-mode.disabled-modes'" (with-current-buffer (current-buffer) (when (seq-contains-p bahman/display-line-numbers-mode.disabled-modes major-mode #'eq) (display-line-numbers-mode -1)) (when (seq-contains-p bahman/puni-mode.disabled-modes major-mode #'eq) (puni-mode -1))))(add-hook 'after-change-major-mode-hook #'bahman/after-change-major-mode-hook.disable-minor-modes) ```
-
Org-roam compatible Android app?
I am looking for an app for note taking that is compatible with my Linux Org-roam setup?
- emacsnotes.wordpress.com View ‘info’, ‘texi’, ‘org’ and ‘md’ files as ‘Info’ manual
Browsing documetation, even Emacs-related documentaion, within Emacs is a non-uniform experience I have been using Emacs for close to two decades now. When it comes to viewing documentation in Emac…
View ‘info’, ‘texi’, ‘org’ and ‘md’ files as ‘Info’ manual
-
Mastering Emacs: Let's Write a Tree-Sitter Major Mode
www.masteringemacs.org Let's Write a Tree-Sitter Major ModeCreating a standard programming major mode presents significant challenges, with the intricate tasks of establishing proper indentation and font highlighting being among the two hardest things to get right. It's painstaking work, and it'll quickly descend into a brawl between the font lock engine an...
- github.com GitHub - Elilif/emacs-immersive-translate: Immersive-translate provides bilingual simultaneous display and translation of any text in Emacs.
Immersive-translate provides bilingual simultaneous display and translation of any text in Emacs. - GitHub - Elilif/emacs-immersive-translate: Immersive-translate provides bilingual simultaneous di...
-
RIP Thien-Thi Nguyen (ttn) 😑
cross-posted from: https://lemmy.ml/post/4692376
> From GNU lists earlier today: > > > We have learned with deep sadness that Thien-Thi Nguyen (ttn) died in > October 2022. Thien-Thi was a hacker, artist, writer, and long-time > maintainer and contributor to many GNU programs as well as other free > software packages. He was the GNU maintainer of the rcs, guile-sdl, > alive, and superopt packages, and he was working on GNU Go as well. > > > >Thien-Thi especially loved GNU Emacs, GNU Taler, and GNU Go: he was > the author and maintainer of the xpm, gnugo, ascii-art-to-unicode, > and hideshow GNU Emacs packages and made substantial contributions to many others such as vc, as well as to GNU Taler and its documentation. > > > >We greatly miss Thien-Thi in the free software community - his death > is a great loss to the Free World.
-
[CODE-REVIEW] Determine if given lists intersect
Suppose I need to find out if the intersection of an arbitrary number of lists or sequences is empty.
Instead of the obvious O(n2) approach I used a hash table to achieve an O(n) implementation.
Now,
loop
mini-language aside, is this idiomatic elisp code? Could it be improved w/o adding a lot of complexity?You can view the same snippet w/ syntax highlighting on pastebin.
```lisp (defun seq-intersect-p (seq1 seq2 &rest sequences) "Determine if the intersection of SEQ1, SEQ2 and SEQUENCES is non-nil." (cl-do* ((sequences `(,seq1 ,seq2 ,@sequences) (cdr sequences)) (seq (car sequences) (car sequences)) (elements (make-hash-table :test #'equal)) (intersect-p nil)) ((or (seq-empty-p sequences)) intersect-p) (cl-do* ((seq seq (cdr seq)) (element (car seq) (car seq))) ((or intersect-p (seq-empty-p seq)) intersect-p) (if (ht-get elements element) (setf intersect-p t) (ht-set elements element t)))))
(defun test-seq-intersect-p () "Test cases." (cl-assert (null (seq-intersect-p '() '()))) (cl-assert (null (seq-intersect-p '(1) '()))) (cl-assert (null (seq-intersect-p '(1 2) '(3 4) '(5 6)))) (cl-assert (seq-intersect-p '(1 2) '(3 4) '(5 6) '(1))) t)
(test-seq-intersect-p) ```
-
Alsa is a dependency for emacs?
I am asking for learning purposes. I don't fully understand what Emacs does with sound either, but is there a logical reason why it still uses Alsa and not Pipewire?
-
Minimal Emacs?
I have been using vim for forever and I have dabbled in using emacs throughout the years. Emacs with the evil mode bindings is very comfortable, and I prefer org-mode over markdown (at least for the type of notes I do).
The main thing that stops me from using emacs though is how bloated it is. I don't want the games, web browser, email client, etc. Is there a way to remove those features from a standard install or from source?
Edit: I guess I'll stick with vim for now. It looks like Neovim might be more what I'm looking for instead of Emacs
-
Emacs upstream commit feed
As part of building an emacs local CI (ELCI lol) for myself, I've setup some tooling others might find interesting.
This page generates a commit in near-real-time, updated when someone pushes to emacs.git on savannah: https://u.bru.st/?#emacs-dev
You can get a single property like this: https://u.bru.st/last-rev.pl/?project=emacs&property=revision
Finally, you can also view the raw JSONL FIFO used by last-rev.pl: https://u.bru.st/emacs.jsonl
Sources should be all, or very nearly all, somewhere on my sr.ht GPL or APGL licensed but I'm afraid I've lots to do shifting things around so they make much sense from "the outside". Trying to setup all of this just from sources and my notes so far is probably not great fun. https://git.sr.ht/~mplscorwin/
FTR, this is very brittle; please be gentle in your experimentation and do shout if you see something I might should fix. Same handle on libera.chat IRC is the fastest way to reach me when I'm reachable.
- jeffbowman.writeas.com Crafted Emacs Update for August and Another New Teammate
Documentation work has been ongoing this month, as well as a few fixes. I'll get to that in a moment though. New Teammate! I have expan...
-
Can't figure out how to install codeium on emacs.
Hi guys.
So I figured out I should try to work with Codeium on emacs for a while. See how I like it and if I feel I need it. Seemingly this is easy. Codeium.el say that I should just clone into the repo and add it to my init file. Right? Wrong. I'm clearly doing something wrong. Since no matter what I do I cannot run the
m-x codeium-install
part. I only get "no match" output.I've tried to place the
(add-to-list 'load-path "~/.emacs.d/codeium.el")
both in the~/.emacs
and the~/.emacs.d/init.el
file with no success. I also tried renaming thecodeium.el
library to be justcodeium
(and updating the init file) still with no luck.So what am I doing wrong here? This should be simple to do, I'm sure of it.
-
Keybindings defined by general stays undefined until evil mode has changed
Here's my config
emacs-lisp (use-package general :demand t :config (general-create-definer my/leader-keys :keymaps '(normal insert visual emacs) :prefix "SPC" :global-prefix "C-SPC") (my/leader-keys ;; Eval "ee" 'eval-last-sexp "eb" 'eval-buffer) (my/leader-keys 'normal org-mode-map "''" 'org-edit-special) (my/leader-keys 'normal org-src-mode-map "''" 'org-edit-src-exit "'k" 'org-edit-src-abort))
Keybinding defined for
org-edit-special
works fine in org mode. But, when I'm in org src buffer I can't use keybinding fororg-edit-src-exit
until I go to insert mode an come back. I've also discovered that calling describe key onC-c '
, which is default keybinding for that, also works. I'm very confused about this. Can it be a bug or I'm doing something wrong? Thanks in advance for your help. -
[TIL] Key sequence [...] starts with non-prefix key [...]
After I restarted my Emacs daemon (after a couple of months uptime), I started getting plenty of errors like below during the initialisation and most of my keys stopped working:
Key sequence C-c [...] starts with non-prefix key C-c
A quick search indicated that error means the "non-prefix key" is already used. In my case, it was
C-c
which sounded quite weird.I ran
ag
on~/.emacs.d
& luckily was able to find the culprit after a few minutes.I had this somewhere in my init files:
(global-set-key (kbd "C-c s a") #'avy-goto-char-2)
Note the newline after
C-c
- I must have pressed ENTER by mistake and saved the file w/o paying attention.I thought I'd share this as this may save some fellow Emacs denizens a few minutes confusing minutes.
My immediate reaction was to blame it on the upgrade to 29.1 🤦♂️ The morale of the story is find the blame w/i and not in Emacs!
- karthinks.com Fifteen ways to use Embark
Update (2021-10-16): While this list was intended as a demonstration of the kinds of things you can do with Embark, there has been some interest by readers in reproducing these demos exactly on their machines. So I have added a “Play by play” section under each demo listing the sequence of actions i...
Embark is a fantastic and thoughtfully designed package for Emacs that flips Emacs’ action → object ordering without adding a learning curve. It’s completely changed how I use Emacs, and I’m going to show you why.
-
Using whitespace mode
vernon-grant.com Using whitespace mode - Vernon GrantToday, we're taking a look at Emacs's whitespace-mode and discussing how we can simplify its configuration to make it more applicable for most use cases.
Today, we’re taking a look at Emacs’s whitespace-mode and discussing how we can simplify its configuration to make it more applicable for most use cases.
-
pulsar version 1.0.0
protesilaos.com Emacs: pulsar version 1.0.0Information about the latest version of my pulsar package for GNU Emacs.
Pulsar is a small package that temporarily highlights the current line, either on demand or automatically after invoking a function that is present in a user-defined list.
-
How to use Pylance in Emacs
I developed a patcher to allow Pylance to run outside of VS Code again, standalone. You can combine that with a code snippet from the lsp-mode issue tracker to integrate Pylance into Emacs. The patcher is so trivial under the hood that you can do it by hand if you prefer it that way, assuming a bit of JavaScript knowledge.
-
Huh? Is there an @emacs setting to get format=flowed?
Huh? Is there an @emacs setting to get format=flowed?
-
Pin/lock certain files/buffers to specific tabs
Is there a way to configure Emacs to lock certain files/buffers to specific tabs? For example, if I want all ERC buffers to stay in the ERC tab, or a selected set of org files to stay in the Org tab, etc.
-
meain/evil-textobj-tree-sitter now supports builtin treesit and works without evil-mode
Video
Click to view this content.
evil-textobj-tree-sitter
is a project that provides additional textobjects by usingtree-sitter
. Link: https://github.com/meain/evil-textobj-tree-sitter---
Hey everyone! Since we have
tree-sitter
now built into Emacs in the newer versions, I've updatedevil-texobj-tree-sitter
to work with the builtintreesit
package. The queries are not as complete the implementation usingelisp-tree-sitter
, but should cover most of the common usecases. You can find more information in https://github.com/meain/evil-textobj-tree-sitter/pull/93Removing hard dependency on evil-mode was one other most upvoded issue on the project and so I have added integration with
thing-at-point
for use without evil-mode. This happen a little while ago, but thought I would add it as well in this update. -
Emacs 29.1-1.1 broken on openSUSE Tumbleweed
⛔ Latest #Emacs (29.1-1.1) is broken on openSUSE Tumbleweed. Running
emacs
fails w/ a cryptic message.💡The solution is to launch it using any of
emacs-gtk
oremacs-x11
oremacs-nox
.💡If your workflow relies on Emacs daemon like mine does, then simply evaluate
(server-start)
in the scratch buffer.Hopefully the fix will be out very soon.
Cross-posted from https://mastodon.social/@bahmanm/110842724716130994
-
Remove hook from a mode setting completion at point functions?
I’m trying to set up completion-at-point-functions in pascal-mode, I found that adding a hook with use-package works and leaves the global setting:
:hook (pascal-mode . (remove-hook ‘completion-at-point-functions ‘pascal-completions-at-point t))
However that causes a
File mode specification error: (error Lisp nesting exceeds ‘max-lisp-eval-depth’)
when I open a pascal file. Any ideas on how I could do it better? -
Upgrade to 29.1 broke my emacs
I'm on opensuse tumbleweed, and today after updating my packages, I can't use emacs. Anyone have any ideas how to troubleshoot this?
``` ❯ emacs -Q Loading loadup.el (source)... Dump mode: nil Using load-path (/usr/share/emacs/29.1/lisp /usr/share/emacs/29.1/lisp/emacs-lisp /usr/share/emacs/29.1/lisp/progmodes /usr/share/emacs/29.1/lisp/language /usr/share/emacs/29.1/lisp/international /usr/share/emacs/29.1/lisp/textmodes /usr/share/emacs/29.1/lisp/vc) Loading emacs-lisp/debug-early... Symbol's function definition is void: file-name-sans-extension
```
-
Is there any way to have gnus put your sent emails in the Sent folder through IMAP?
Hello,
I am trying to switch to gnus for my main email client, however I cannot figure out how to get a copy of each email sent to my default Sent folder used by other email applications that was created by my provider (Posteo to be exact).
I have tried different things, such as by seting archive folder and attempting to gcc, but none of these have worked.
Additionally, I see many posts online are about doing this with an archive about once a month, whereas I just want each individual message to be placed in the "Sent" folder when it is sent.
Thank you.
- www.masteringemacs.org Tree Sitter and the Complications of Parsing Languages
I talk about tree sitter, CEDET, and Combobulate -- my "paredit-style" package that's designed to work with most programming languages.
-
Anything like counsel-search for consult?
Counsel-search is one of the few swiper commands I haven't yet replaced with a consult equivalent (counsel-keepassxc being the other one). Did anyone know if an equivalent tool exists in the counsel space?
-
Devil mode v0.6.0 released
github.com Release 0.6.0 · susam/devilDevil is an Emacs minor mode that intercepts and translates keystrokes to provide a modifier-free editing experience in a non-modal manner. See https://susam.github.io/devil/ to learn more about it...
-
[[bbb:OrgMeetup]] on Wed, Aug 9, 19:00 UTC+3
Dear all,
A number of people expressed interest in a dedicated Org meetup. So, let's start it.
URL: https://bbb.emacsverse.org/b/iho-h7r-qg8-led
Time & Date: <2023-08-09 Wed 19:00-21:00 @+03,Europe/Istanbul>
The room will be open half an hour before the official start.
During the meetup, we can:
- Give advice to new users
- Showcase Org configs or workflows
- Demo/discuss interesting packages
- Troubleshoot each-other's issues
- Discuss "Org mode" section of Emacs news (https://sachachua.com/blog/)
- Discuss anything else Org-related
- Everyone is free to join the discussion/chat or lurk around silently, listening.
We will not do any recording by default.
Original announcement: https://list.orgmode.org/orgmode/87tttlflht.fsf@localhost/
-
Mastering Emacs - What's New in Emacs 29.1?
www.masteringemacs.org What's New in Emacs 29.1?What's new in Emacs 29.1? I go through every change and annotate the ones I feel are interesting or worth knowing more about.