Emacs

2594 readers
3 users here now

Our infinitely powerful editor.

founded 5 years ago
MODERATORS
151
 
 

if so, a video would be cool. ive been troubleshootinf this for a week now and canr get it to work

152
 
 

This is the first pretest for what will become the 29.2 release of Emacs, which is primarily a bugfix release.

153
-11
Is GNU Emacs still worth it? (lemmy.opensupply.space)
submitted 2 years ago* (last edited 2 years ago) by nyl@lemmy.opensupply.space to c/emacs@lemmy.ml
 
 

Seems like with all AI-enabling and just works out of the box experiences with VSCode and alike, makes GNU Emacs absolete. I'm aware of AI packages for GNU Emacs, but don't think is worth the investiement so much; I would mostly save it for org mode, TUI, and some other few packages. But for programming, it doesn't seem lile worth the investment, and use VSCode instead.


Certainly knowing things will always be valuable - but the effect of assistants and LLMs may be to change what it is valuable to know by devaluing a great heap of current generation’s programmers’s stock and trade.

As an addenda: by value in the above I mean “instrumental value” or more specifically, valuable to the rich who want to exploit the skills of others to become yet richer. There is always intrinsic value to knowing for the people who love to know.


fomosapien@emacs.ch, https://emacs.ch/users/fomosapien/statuses/111264462444461233

154
 
 

Whenever I try to install package, I get error 'invalid read syntax ".", 2, 3 '. Please help.

edit: I followed the process from https://sourceforge.net/projects/android-ports-for-gnu-emacs/files/ , error still persists.

155
 
 

Hello folks! I'm using straight.el for my package management, but one thing that I'm missing is some sort of easy way to see what's changed, when I do a straight-pull-all. Ideally, I could see which packages that I explicitly have a dependency on have changed, and see either a changelog or a list of commits.

Does anyone know if something like this already exists?

Thanks!

156
157
158
159
 
 

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 and display-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 🙏


(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)
160
 
 

I am looking for an app for note taking that is compatible with my Linux Org-roam setup?

161
1
@emacs (mastodon.ml)
submitted 2 years ago by pashkafd4@mastodon.ml to c/emacs@lemmy.ml
 
 

@emacs
#emacs #neovim #vim
Есть ли руководство на русском языке по Emacs ?
Как и что какие клавиатурные команды выполняются.
Также интересен Вим и Неовим.

162
 
 

View ‘info’, ‘texi’, ‘org’ and ‘md’ files as ‘Info’ manual

163
164
165
 
 

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.

166
1
submitted 2 years ago* (last edited 2 years ago) by bahmanm@lemmy.ml to c/emacs@lemmy.ml
 
 

Suppose I need to find out if the intersection of an arbitrary number of lists or sequences is empty.

Instead of the obvious O(n^2^) 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.

(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)
167
 
 

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?

168
3
Minimal Emacs? (lemmy.blahaj.zone)
submitted 2 years ago* (last edited 2 years ago) by moonsnotreal@lemmy.blahaj.zone to c/emacs@lemmy.ml
 
 

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

169
 
 

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.

170
171
 
 

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 the codeium.el library to be just codeium (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.

172
173
 
 

Here's my config

(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 for org-edit-src-exit until I go to insert mode an come back. I've also discovered that calling describe key on C-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.

174
 
 

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!

175
 
 

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.

view more: ‹ prev next ›