adding typst mode to EMACS DOOM
Hi, i'm a daily doom emacs user to typeset LaTeX and ConTeXT documents, i just found this new typesetting system called typst written in Rust , i would like to play with in emacs.
https://redd.it/1ct73ef
@r_emacs
Case-insensitive consult-line: which configuration variables to tweak?
Hej fellow 'macsers,
TL;DR: my CONSULT-LINE is case-sensitive which is why I sometimes don't find stuff because of capitalisation. (How) can I change that?
I am falling in love with the capacities of CONSULT as of late (especially when combining its results with EMBARK-EXPORT, holy moly!). However, I noticed that I can't find stuff if it is capitalised or in allcaps. This is not good, because I thus overlook stuff I'd want to find in a buffer.
I tried tweaking ISEARCH-related variables, but to no apparent avail. I also tried delving into the source code, but I did not really understand how CONSULT-LINE produces its results.
Can you tell me which variables I need to tweak for consult-line to be case-insensitive when searching?
Have a good day, fellows :)
https://redd.it/1ct8x8l
@r_emacs
Question regarding weird behavior of (minibuffer-complete) in minibuffer using vertico
Recently I tried to configure <tab>
keybinding to have different behavior in different scenarios. In order to do this I wrote my custom function|
(defun vd/tab-indent-or-complete ()
"Function to choose correct TAB action."
(interactive)
(cond
((derived-mode-p 'org-mode) (org-cycle))
((derived-mode-p 'minibuffer-mode) (minibuffer-complete))
(t (progn
(when (fboundp 'tempel-complete)
(tempel-expand))
(indent-for-tab-command)))))
(define-key global-map (kbd "<tab>") 'vd/tab-indent-or-complete)
Completion
appiers instead of M-x and until I press C-g it "override" M-x minibuffer. If I press <tab> again it creates more Completion buffers(in picture Completion 2 change to Completion 4) and I need to close them with C-g.Installing SLIME on emacs on Mac
I’m trying to install SLIME for Common Lisp on my Mac. I’m using instructions from this site : https://lisp-lang.org/learn/getting-started/
Under “Installing Emacs and SLIME” I dont understand
“…add this to your ~/.emacs.d/init.el:
(load (expand-file-name "~/.quicklisp/slime-helper.el”))
(setq inferior-lisp-program "sbcl”)
I dont know where or how to add that.
My emacs folder has 2 items: a file called “Portfile” and a folder called “file”. In the “file” folder are 3 files:
patch-Info.plist.in.diff
patch-src_dbusbind.c.diff
site-start.el
There is no “d” folder or ” init" file
https://redd.it/1ct3jpf
@r_emacs
If Hamlet were an Emacs Tramp user
to ssh or not to ssh,
whether tis nobler in the mind to ssh to a remote, projecting an emacs back through a tunnel,
or to browse the files remotely via nfs or use tramp-ssh to edit them.
To browse, to view, to view, perhaps to edit, aye, there's the rub.
For if when editing remotely, when one also edits locally,
when we have lost track of what we're doing, or indeed what user we are,
when we have lost efficiency for the sake of convenience,
must give us pause.
https://redd.it/1csz6nn
@r_emacs
plain bibliography in org mode
how do i create a plain numbered bibliography in org mode, I have tried this: #+BIBLIOGRAPHY: ref
#+CITE_EXPORT: biblatex plain
<contents>
#+PRINT_BIBLIOGRAPHY:
but it generates this:
https://preview.redd.it/ve6kspbxtn0d1.png?width=667&format=png&auto=webp&s=851fb853be2521d608d3c61ede5f6012b55c5904
https://redd.it/1cswly4
@r_emacs
Alternatives in GNU Emacs - Wheel of time
https://preview.redd.it/es46lc8g2m0d1.png?width=1280&format=png&auto=webp&s=9fe9587733cfed91871f931af000cbe5836189da
Chronological view for files.
Demo: https://youtu.be/npjRR5HYLHI
Details: https://lifeofpenguin.blogspot.com/2024/05/alternatives-in-gnu-emacs-wheel-of-time.html
https://redd.it/1cso1vz
@r_emacs
Eglot, pylsp and Poetry (or Pipenv or venvwrapper or pyenv)
I'm a bit lost of how this things interact. I will describe what I want to make first
- Use pylsp through eglot,
- Have a virtual enviroment for each python project,
- Be able to manage the enviroments through emacs (tried poetry and pipenv),
- Have the linting, lsp, jedi, black, flake8, ruff, etc installed out of my project venvs, as some of these are shared with others.
- Have it easy to change, or automatic between enviroments when I change projects.
I have tried some things (pipenv, virtualenvwrapper and poetry), but it ends up breaking when I try to isolate projects. It sort of worked when I had everything installed directly on debian, when I tested things with a fresh install, but not if I try to leave the system packages alone, as one should do with python and have venvs for each project.
What happend most often is that eglot/pylsp did not recognize the installed packages in the venvs, I tried to install pylsp in one "general" venv, I it worked well, untill I realized that I did not have the projects in enviroments (I had created several accidentally with poetry and venvwrapper at the same time, and neither of those where active when developing), and the dependencies where a mess as result.
So I ask in general what would be the best practice to keep things clean?, and in more detail:
1. where to install the lsp and other IDE packages,
2. how to make emacs aware of the enviroments to manage them,
- know what enviroment I'm in,
- be able to change enviroment,
- install packages to the enviroment.
3. How to make eglot understand that the project has its own enviroment and should recognise the installed packages in the enviroment?
https://redd.it/1csov0a
@r_emacs
Weekly Tips, Tricks, &c. Thread
This is a thread for smaller, miscellaneous items that might not warrant a full post on their own.
See this search for previous "Weekly Tips, Tricks, &c." Threads.
Don't feel constrained in regards to what you post, just keep your post vaguely, generally on the topic of emacs.
https://redd.it/1csfnki
@r_emacs
New Home for Rustic
https://psibi.in/posts/rustic.html
https://redd.it/1csa4wv
@r_emacs
Andrea Corallo appointed as new Emacs co-maintainer
https://lists.gnu.org/archive/html/emacs-devel/2024-05/msg00789.html
https://redd.it/1cs3ztj
@r_emacs
Multiple Emacs shortcuts in Ubuntu 24.04 (GNOME search screen)
I recently installed Emacs on Ubuntu 24.04, and when I typed "emacs" on the GNOME search screen, I could see
* Emacs
* Emacs (Client)
That's fine, I understand why they're there. But since then, I installed the algebraic geometry software [Macaulay2](https://macaulay2.com/) with
sudo add-apt-repository ppa:macaulay2/macaulay2
sudo apt install macaulay2
I noticed that some stuff related to Emacs seemed to be installed along with this program. Now, when I type "emacs" in the search, I see
* Emacs
* Emacs (Client)
* Emacs (GUI)
* Emacs (Terminal)
* Emacs (Client)
I don't like that. I've been learning how to use Emacs for the past week and I want to keep it as simple as possible. What's going on, do I have multiple Emacs versions installed in my system? When I do `apt list -a emacs` it only returns
emacs/noble,now 1:29.3+1-1ubuntu2 all [installed,automatic]
How do I go back to how it was before?
Any help is appreciated.
https://redd.it/1crz4jc
@r_emacs
How do I use elisp to grab a number of my todos for a script.
Hi,
I frequently use Emacs org-mode for my schedule and deadlines, but frequently forget to check my agenda. I would like to include my TODO inside polybar and I was investigating using `org-batch-agenda-csv` but I'm not sure if the return is a string or how to correctly count or split it using emacs-lisp. Any suggestions?
https://redd.it/1crs8sj
@r_emacs
Font size issue with emacsclient and dashboard
When I open emacsclient the agenda section of the dashboard looks like this:
https://preview.redd.it/loo5264fbvxc1.png?width=449&format=png&auto=webp&s=fc8c677aaf9542208dc80742bfa9a38715c99cee
If I use revert-buffer
it works normally and looks like this:
https://preview.redd.it/f2godxi5jwxc1.png?width=522&format=png&auto=webp&s=fdbe40861dccc15c674f1ab60db15414183e3ecf
Does anyone know how to fix this so the font is normal instead of tiny?
https://redd.it/1chv5vg
@r_emacs
Org-Mode agenda window size
I use Org-Mode and the agenda quite heavily. My agenda is displayed in a horizontal pane.
The default window size increases as I add more stuff to the agenda. I work on a laptop with limited display real estate and, at times, the agenda window consumes virtually the entire Org-Mode view, covering virtually all of the tasks I'm working on.
I manually resize it when I need to. However, it would be better if the agenda consumed no more than 50% of the available Org-Mode real estate.
I've been trying to find a setting to configure to limit the agenda's vertical height to no more than 50% of the available window space. That is, the top half of the Org window would contain my tasks, and the bottom half would contain my agenda.
Is this possible?
https://redd.it/1chrt48
@r_emacs
Company mode show whitespace's dots in completion
Good morning everyone, I would like to ask for your help to not let whitespace-mode interfere with company-mode.
Company-mode is very slow since I enabled whitespace-mode, I would like to ask for your help to optimize it.
This is the code for whitespace-mode:
(use-feature whitespace
:defer 2
:diminish (global-whitespace-mode)
:custom
(whitespace-line-column 80)
(whitespace-global-modes
'(not shell-mode
eshell-mode
help-mode
magit-mode
magit-diff-mode
ibuffer-mode
dired-mode
occur-mode))
(whitespace-action
'(cleanup auto-cleanup))
(whitespace-style
'(face trailing tabs spaces newline missing-newline-at-eof empty indentation
space-after-tab space-before-tab space-mark tab-mark newline-mark))
:config
(global-whitespace-mode +1))
This is the code for company-mode:
(use-package company
:diminish (company-mode)
:defer 2
:preface
(setq tab-always-indent 'complete
completion-cycle-threshold 3)
:custom
(company-idle-delay 0.5)
(company-show-quick-access t)
(company-minimum-prefix-length 2)
(company-tooltip-limit 10)
(company-tooltip-flip-when-above t)
(company-tooltip-align-annotations t)
;; EXP
(company-require-match nil)
(company-global-modes '(not erc-mode message-mode eshell-mode))
;; (company-tooltip-annotation-padding 1)
;; (company-format-margin-function 'company-text-icons-margin)
;; (company-text-icons-add-background t)
(company-files-exclusions '(".git/" ".DSStore" "nodemodules/"))
(company-dabbrev-other-buffers 'all)
(company-dabbrev-downcase nil)
(company-dabbrev-minimum-length 2)
;; (company-transformers '(delete-consecutive-dups
;; company-sort-by-occurrence))
:config
(global-company-mode +1))
Thanks in advance to everyone.
https://redd.it/1ctcd92
@r_emacs
Make dirvish a bit more like ranger
I generally like dirvish for quick file stuff, but I haven't managed to stick to it for two main reasons. The first one is that if I quit dirvish with q
and then call it again, it forgets what folder I was last at. Is it possible to make it stay "in the background" in the folder I have it.
The second issue is I'd like something like ranger's tabs you can switch with <TAB>. This is particularly useful when copying from one folder to another.
Thanks!
https://redd.it/1ct9kxn
@r_emacs
if you use hammerspoon, summon emacs wherever you are
hi everybody,
Not exactly an emacs post, but one that can be useful to those running emacs under OS X.
if you use hammerspoon, I wrote a function that might be useful to others to quickly go to emacs wherever you are.
The idea is that I whenever I press my own prefix (C-M-c):
If I am in emacs, things happen as usual.
If I am not in emacs, the pressed keys are never seen by the current app, instead, the last active window of emacs gets raised, and the sequence gets sent to emacs.
For example, my prefix has (sub)commands for org-agenda, org-capture, mu4e, etc.
The code is here, if anybody is interested:
https://github.com/dmgerman/hs_dmg/blob/ea3c24a685a59981533256081510399a37edc40c/init.lua#L349
(the code is sufficiently generic that you can bind any key to any apps; for example, you could use C-x)
https://redd.it/1ct6w5d
@r_emacs
tramp & setopt
Hi all!
I'm trying to shopt -s nocaseglob
and a bunch of others for tramp, and my attempts have failed.
has anybody tried this? remote shell is /bin/sh, which means it should use ~/.profile
, but nothing I change there affects tramp (PATH or setopt).
I tried using bash as remote shell, but that didn't help.
Any tips welcome.
https://redd.it/1cstcce
@r_emacs
EmacsWiki: Emacs Stories
https://www.emacswiki.org/emacs/EmacsStories
https://redd.it/1csx10v
@r_emacs
#keywords - find with consult-grep ??
Hi, i have created my own keywords in emacs notes like #handy , or #smart, or #bad
Just to not need a header in the text but just in plain text.
Now if i want to find those keywords with consult-grep, i can not seem to find lines with for instance
#smart as the keywords.
I tried \\#smart but that does not work.
How can i find words starting with a # ?
https://redd.it/1csncm3
@r_emacs
Vterm $INSIDE_EMACS variable in Tmux
I am using a custom vterm-specific configuration in bash. As described in the README - https://github.com/akermu/emacs-libvterm, my ~/.bashrc contains:
if [[ "$INSIDE_EMACS" = "vterm" ]]; then
echo "WE ARE INSIDE OF EMACS"
# some custom functions follow
fi
When I run `M-x vterm RET`, the text appears, and custom functions work, which is great. However, and quite obviously, when I run `tmux attach`, the $INSIDE_EMACS variable is not defined, and therefore none of the configurations works.
Does anyone have a good solution for this, please?
https://redd.it/1csqalk
@r_emacs
Elisp list from tabulated list
Is there a function built into Emacs that will create an elisp list from a tabulated list in a buffer? I would like to put two such lists into variables and run a set difference function on them. Thanks.
https://redd.it/1cslxgs
@r_emacs
holiday-sexp for a holiday on either the first Monday OR Friday the 1st
I'm trying to add Irish public holidays to my org-agenda, but I'm having trouble figuring out how to handle Imbolc. Its rules are slightly more complicated than normal:
"First Monday in February, or 1 February if the date falls on a Friday"
Does anyone have any suggestions on how I could use holiday-sexp to add this to my org-agenda? I'm very inexperienced with elisp, and there aren't many examples of holiday-sexp so I haven't found something similar enough to modify.
https://redd.it/1cs8nkt
@r_emacs
adding snakefmt and snakemake linting support to snakemake-mode
It doesn`t look like `snakemake-mode` supports `snakefmt` or `snakemake --lint` out the box — before I dive down the rabbit hole of trying to figure out how to make them work nicely, I was wondering if anybody else had already done this and had configs they could share?
https://redd.it/1cry1lj
@r_emacs
Texinfo is superior
Texinfo is better than any documentation system (sphinx, mkdocs, doxygen, ...). The ability to search quickly in terminal or in emacs is much better than the switching back and forth in the browser. The index search is amazing unlike the other documentations system which are painfully slow. The question left is why it didn't take off? why it's not popular? very few projects use it!
https://redd.it/1cs35xp
@r_emacs
sluggish with eglot
I'm a /very/ long time happy user of eight megs and constantly swapping, but recenty, I wonder if there has been a trend upward in latency.
I use it exclusively for programming python, so jedi-LSP. or pyright with eglot, with minimal fancy extensions.
But it just feels sluggish; this on a modern Intel MBP and also M2 MBP.
I wonder if I am imagining things, or if folks are tracking latency and have numbers to back me up / shoot me down.
By latency, I mean simple scrolling, cursor movement; when I invoke cross-ref operations I expect some latency just to open new buffer, so that isn't important.
As an eaxmple, I think my C-n move-next-line speed is +- 5 lines per second, and Zed on the same machine, same codebase is +- 20.
https://redd.it/1crtk5g
@r_emacs
Can Emacs Org combine Notion's top-down structure Obsidian's bottom-up approach?
I see value in Obsidian's bottom-approach for brainstorming and drafting things. But as things are finalized, I need them to be categorized into specific groupings as part of a comprehensive life operating system.
https://redd.it/1ci0v82
@r_emacs
Mathing in Emacs with Casual
http://yummymelon.com/devnull/mathing-in-emacs-with-casual.html
https://redd.it/1ci1ly6
@r_emacs
Any way to search music online dbs with emacs
I am building my own review of jazz albums using org-roam and I'd like to access online databases like Allmusic or discorg...
does anyone allready have such a function in emacs?
I'd love to be shown a direction if you know of such existing tools or attemps...
thanks in advance
https://redd.it/1chmo5m
@r_emacs