Emacs

2679 readers
1 users here now

Our infinitely powerful editor.

founded 5 years ago
MODERATORS
1
 
 

I think one of my package is interacting wrongly with TRAMP and it is too often freezing. It is difficult to debug as it freezes totally and quite annoying as I cannot interrupt with C-g. Are there options to run tramp in a way it does not collapse the whole emacs? I could then try to guess which package interact with it by deactivating/activating them...

It seems to work properly if I open emacs with emacs -Q

2
 
 

Hello, guys!

I'm in process of moving my notes from Joplin, which is also a great tool, to Emacs 30.1. I use denote for managing notes.

I found a strange behavior when using org-publish: almost every note I created and exported using org-publish can't be read by webserver. It happens when file name consists cyrillic letters. I've tried nginx, apache, python http.server, web-static-server. When I run a server and try to open html file in latin - it's OK, but when there some cyrillic letters in file name - web serser tells me it can't find file with this name like "%u...". However when I open html files locally with Firefox everything works just fine.

So after a couple of days of reasearch I found that one reason for such behavior could be the wrong file name encoding. As far as I'm not an expert may be somebody can explain how to make emacs convert with org-publish notes in encoding that is readable for any web server?

My emacs config consists:

org-publish-project-alist '(
                            (
                             "notes"
                             :base-directory "~/org/denotes/"
                             :recursive nil
                             :publishing-directory "~/public_notes"
                             :section-numbers nil
                             :with-toc nil
                             :with-author nil
                             :with-creator nil
                             :with-date nil
                             :html-preamble "<nav><a href='index.html'>Notes</a></nav>"
                             :html-postamble nil
                             :auto-sitemap t
                             :sitemap-filename "index.org"
                             :sitemap-title "Notes"
                             :sitemap-sort-files anti-chronologically
                             )

Host is Debian 13. UTF-8 is the only encoding enabled in locales. Servers I've tried so far also run on Debian 13 with UTF-8.

3
4
 
 

Hello all,

I recently started working out again, and started thinking can I track my workouts using emacs org mode.

What I basically envision is tracking what exercises I did in a given day, repetitions and weights. Any suggestions? Thanks in advance!

5
6
7
 
 

Hello! I'm happy to announce the release of Disproject version 2.2.0. This update comes with various improvements, including:

  • a new customizable menu that lets the user select from a list of display-buffer overrides as transient state, which can be applied to suffix commands;
  • a new customizable menu for finding common project files like the dir-locals file or README file, dubbed "special files";
  • and a newly-written Info user manual to provide documentation on using and configuring Disproject (please feel free to inform me or open an issue about any mistakes or sections that feel confusing!).

The full change notes for this release can be found here.

Other links:

Disproject is a GNU Emacs package that implements Transient menus for managing and interacting with project files. It aims to provide a featureful, yet extensible interface from which users can intuitively dispatch commands on projects.

Some of its notable features include:

  • a main menu with access to many of the built-in project library's commands and other project-aware commands;
  • auto-detection of current project as the default project to act on from the menu;
  • options for switching to other projects from the menu in order to execute commands elsewhere;
  • a menu for finding common "special" project files, like the dir-locals file;
  • a menu for custom project-local suffix commands;
  • and display-buffer override options, to control where commands should display buffers to.

This package was inspired by the project-switch-project command, from the built-in project library. Users may also draw similarities to the Projectile library's projectile-commander.

8
 
 

Lately I've been experimenting with my emacs setup, which has led to a lot of extra ELPA (gnu and nongnu) requests. Unfortunately, ELPA is very slow nowadays, which makes experimenting inconvenient. Also, I don't want to contribute to the already high load on the official GNU servers.

Are there any "official" mirrors for ELPA? How can I activate them? If not, how can I activate and validate non official mirrors?

9
10
 
 

Dear emacs and org-mode comrades.

Given:

  • a table with
    • a list of tags +
    • their number of appearances in question 1 (Q1) & and question 2 (Q2).
  • org support for tag groups (https://orgmode.org/manual/Tag-Hierarchy.html)
  • 3 defined tag groups
    • GroupTag1 (GT1)=tagA+tagC+tagD and
    • GroupTag2 (GT2)=tagB+tagE
    • GroupTag3 (GT3)=tagB+tagC+tagD (yes, some tags are in more than 1 group)

How can I count with pure elisp (assuming some table formula but I'm open to other ways) the sum of individual tag appearances of each tag group, for each question?

Example:

| tag  | Q1 | Q2 |
|------+----+----|
| tagA |  9 |    |
| tagB |  4 |  2 |
| tagC |  1 |  4 |
| tagD |    |  5 |
| tagE |    |  6 |
|------+----+----|
| GT1  | 10 |  9 |
| GT2  |  4 |  9 |
| GT3  |  5 | 11 |

Thanks a lot for your time and attention... :)

11
12
 
 

So I wrote a little function for how I use eat.

In eat, you can have multiple terminal buffers open, and they are differentiated by incrementing numbers. The official way to open an additional buffer is to run eat with a prefix argument like C-u M-x eat. I wrote my little function to do this for me, because I don't use prefix arguments/C-u anywhere else and just couldn't remember it.

So this function checks the buffer list for existing eat buffers. If there is one with a number at the end, it takes this number, increments it by one and then opens a new eat buffer with this incremented number. If there is just one without a number, it opens a new buffer with the number one, since the first buffer is created without a number per default. If there is no eat buffer at all, it just calls eat to create one. This is the function:

(defun eat-more ()
  "Open a new terminal"
  (interactive)
  (if (match-buffers "\*eat\*")
      (if (string-match ".*<.>" (prin1-to-string (last (match-buffers "\*eat\*"))))
	  (eat (funcall eat-default-shell-function) (+ (string-to-number (substring (prin1-to-string (last (sort (match-buffers "\*eat\*")))) -4 -3)) 1))
	(eat (funcall eat-default-shell-function) 1))
    (eat)))

This works as intended, but the line getting and incrementing the buffer number looks really awkward. So my question is: How could I improve that to make it more readable without changing the logic completely?

There are probably shorter ways to do this by just calling eat with a prefix argument in the function itself, or something like that. But I am interested in interacting with the buffer list and all this nested string slicing and converting feels off. The actual eat function is defined here in eat.el Do you have any suggestions?

13
14
 
 

I "live in Emacs", like most of us (atleast at work). It has been getting slower release on release, async support doesn't seem to have been picked up by most packages and native-comp has made it more brittle.

Over this time, we moved from running the OS on hardware to running in VMs, so fractional slowdown was expected. But what I have is a few X slower Emacs. I had never seen Emacs take a minute to indent a few thousand lines, for example. Maybe some modes have slower code.

15
 
 

I didn't know how to title this one, and it is such an esoteric thing but this set of tools I think actually makes a really compelling mobile text editing/task tracking solution allowing full use of org mode in emacs with file syncing capability naturally and easily accessible through termux's straightforward ability to add the filepath of a syncthing folder share to the termux app and thus for emacs/spacemacs and org mode.

Cursed? I mean yeah... but also consider that you can still mainly use something like orgro or orgzly revived to access your org files and use this crazed method as a backup for edge cases where you are stuck on mobile!

https://termux.dev/en/

This use of termux gets all the great touchscreen controls for terminal interaction (like swipe to scroll, pinch to "zoom"/change text size, esc ctrl keyboard arrows etc..) AND dodges one of the biggest issues with the way sandboxing is implemented in Android by naturally connecting both your file sharing/syncing app and your text editing/task tracking app in a way that is simple and resilient to the nonsense of Android.

...but the big elephant in the room is that emacs and spacemacs are keyboard driven right.. so... how could this not be a nightmare on a smartphone????

That is where 8vim comes in! It is a really fluid and natural touchscreen keyboard that allows precise input of the core keyboard letters in a very easy but precise fashion. Somewhat unexpectedly the modal editing and space leader key command system that Spacemacs is centered around works perfectly with a touchscreen keyboard like 8vim.

https://f-droid.org/packages/inc.flide.vi8

https://lmd-jazzededtech.gitlab.io/fdroid-website/en/packages/inc.flide.vi8/

https://github.com/8VIM/8VIM

8vim works this way, there are four lines that intersect a circle. Starting with your finger in the circle you can input a letter by drawing a line out of the circle and then passing through one of the four lines in a loop around the circle, the letter inputted is determined by how many additional lines (if any) you pass through before returning to inside the circle. In the following example to make an "r" is just the same as to make a "c" but in reverse.

Above is an example of inputting a "c", if you wanted to keep typing "cat" as opposed to "c " instead of lifting your finger after finishing the "c" keep drawing an "a" and then "t" in one continuous motion as below image illustrates.

Other essential Spacemacs keys are accessible in one tap from the main 8vim letter input screen

8vims style of input is decidedly strange at first glance, but once you understand the basic way you input letters, consider a couple of basic spacemacs evil commands like "file save" "quit", "org-insert-heading", "org-narrow-to-subtree" and "widen" or any number of routine operations and most of them map out quite naturally to 8vim. Far more than you might expect given neither tool was designed for the other.

spacemacs running in termux

editing spacemacs dotfile "spc f e d"

editing and viewing an org mode file

browsing spacemacs documentation, full terminal height can be given to termux/emacs without sacrificing a big uncramped keyboard

The square shape of 8vim naturally works well in termux in landscape orientation too.

Pinch to zoom in an org mode file works great in termux, a natural view for indepth editing can be quickly transformed into an extremely clear color coded pocket-note style task list to glance at while working.

basic example

ranger file manager inside emacs termux session

This is in conjunction with the spacemacs ranger layer and is opened with...

spc a t r r

...another surprisingly natural and easy to remember input sequence with the 8vim touchscreen keyboard.

Of course, if I am going to type a lot I use a bluetooth keyboard and transition to typing with a hardware keyboard, but for simple todo list and task tracking type uses of org mode (what I almost exclusively use it for) 8vim works great.


The reason I suggest Syncthing is that both Syncthing and Termux can so easily access the same folder locations on Android that it makes file syncing a breeze compared to how much of a silo'd corporate "somebody else's computer" headache it is for other solutions that work for Android or iOS for that matter.

https://syncthing.net/

https://f-droid.org/packages/com.github.catfriend1.syncthingandroid/

Edit I realize I didn't explicitly explain but you can install git with termux in two seconds...

pkg install git

...and then just install spacemacs with git like normal.

git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d

https://www.spacemacs.org/


Edit 2 Note pandoc can be installed with termux so emacs and spacemacs integration also works right out of the box with pandoc which is kind of mindblowing even though I guess it is obvious given both emacs and pandoc can be installed with termux. If you aren't aware, pandoc integration with emacs lets you export an org mode document to pretty much any format you want... webpage html.. word document.. slideshow.. what would you like? It is a VERY powerful way to take org notes and turn them into things other people can interact with and view in a variety of contexts.

https://pandoc.org/

https://www.spacemacs.org/layers/+tools/pandoc/README.html

Pandoc running in emacs in termux with the spacemacs pandoc layer


*Cross-post from !spacemacs@lemmy.ml

16
 
 

In SLIME/Sly when compiling a file with 'slime-compile-and-load-file' (C-c C-k) I can navigate between notes with M-n and M-p. Is there also something like that for compiling #asdf systems or do I have to compile files manually?

#lisp #commonlisp #emacs
@emacs

17
 
 

Recently found about tramp-mode. I'm trying to use it as primary way to work. My previous workflow was: VNC to VM, open emacs for editing and shell-pop for issuing run commands etc. My shell-pop config is: '(shell-pop-full-span t) '(shell-pop-shell-type '("eshell" "*eshell*" (lambda nil (eshell shell-pop-term-shell)))) '(shell-pop-universal-key "C-t") '(shell-pop-window-position "bottom") '(shell-pop-window-size 30)

With tramp-mode I would like to follow similar approach. I can get shell-pop to come up with ctrl-t and it opens current working directory. However .cshrc related to VM is not loaded and I don't have access to correct VM shell commands / tools.

is there way to source RC file (from VM) before invoking eshell?

18
19
14
Emacs: Org mode basics (www.youtube.com)
submitted 4 months ago* (last edited 4 months ago) by paequ2@lemmy.today to c/emacs@lemmy.ml
 
 

I'm trying to learn Emacs again. This time it's going better! I'm starting to learn the nitty gritty details about Org mode. This video is great!

Previously, my only experience with Org mode was watching my coworker do cool magic stuff with it.

Also this video on TODO: https://www.youtube.com/watch?v=L0EJeN1fCYw

20
 
 

I've always been curious about Emacs, but haven't been able to learn it.

This playlist looks promising, but ufff each video is like 1 hour and most of the video is just random chatting because it's a live stream...

Does anyone know any better video series? Something structured and to the point?

21
 
 

I explain what I dislike about which-key and what I think people should use instead.

22
23
 
 

Charles Choi (of Casual fame) explains how he came around to appreciate Eshell.

24
25
 
 

I keep finding it in my code, in areas I am not working in or in areas I just completed. Is there some sort of autocomplete or spell checker that thinks it knows better than me?

I tried searching for : space = but it found := (no space)

view more: next ›