For what is GNU Emacs Useful?
I just downloaded some old sources from the Internet Archive (see my other post), and found an interesting text about why you want to use Emacs (I see that question often asked here). Written back in **1991** (and still rocking):
____________________________________________________________________
We at the Applied Research Information Communications team have been working
with the GNU Emacs environment for the last several years to produce an
integrated productivity environment for information intensive tasks. (We now
refer to this as InfoDock.) It is available today on Paging Products
Sun and NeXT networks.
The only technical support available for the environment right now is our own
informal team answers to questions and documentation which you can find in
the Boynton Beach library (ask for the InfoComm file cabinet). We are
working on a full commercial support contract for the whole environment, if
we develop a significant user base locally.
This document gives you an overview of why you should consider using the
Emacs environment to improve your productivity.
For What is GNU Emacs Useful?
Bob Weiner
Brown University
1/6/91
Written at Brown University with Motorola support.
Localized for Motorola PWDG use: 10/05/92
V1.1
Available for unrestricted use and distribution with attribution.
* Introduction
==============
Although many people in business, technical and academic fields have
heard about or even used GNU Emacs in recent years, there remain many
misconceptions about what it is and for what tasks it may be used. This
document is meant as a brief outline of the salient points that
distinguish GNU Emacs from many other related tools available. It does
not explain what GNU Emacs is to the wholly uninitiated. For that,
you should see the GNU Emacs Manual published by the Free Software
Foundation of Cambridge, Massachusetts, USA.
GNU Emacs is at heart a framework rather than a single tool. The
original emacs idea began as a way to support efficient text editing, but
it has grown into much more than that, while still retaining its
original goals of efficiency. It can be readily customized to support
any number of tasks. GNU Emacs is available for free use and distribution.
It is portable to virtually every UNIX platform and OS/2.
As part of our productivity improvement, information delivery and application
research work, we in Motorola PWDG Applied Research have extended the Emacs
environment with a number of significant tools and have customized it to help
you achieve high performance results in your work. We hope you take
advantage of this work, which is available for free use throughout Motorola.
Staffers are available to assist teams who wish to integrate the Emacs
framework into their knowledge work processes.
Below is a high-level summary of Emacs features. The list of items preceded
by plus signs offer a good two page synopsis for management that suggests how
Emacs can improve your work environment. All tools share a common editing
framework more capable than any commercially available tools. Commercial
support is available for GNU Emacs and a number of major corporations rely
upon such support.
GNU Emacs tools include:
+ Calendar/Appointment Manager - for personal use, no group scheduling
+ Command Shell - provides convenient, editable access to
operating system commands, even from a
terminal
+ Compilation Interface - jumps to source line of any errors
+ Electronic Mail - reader and composer, 3 different readers
from which to choose
+ Editor - for text, programming, documentation
languages;
Expand directory names (C-x, C-f)
I saw someone in a video search for files in the minibuffer using C-x C-f
. He only typed the first letter of the directory name followed by a slash and it expanded to the full directory on pressing Tab
(I think). I can't find the video anymore. Does anyone know the package or setting that accomplishes this behaviour?
https://redd.it/1ccphp5
@r_emacs
Keybinds or M-x?
I'm interested in how the workflow for many of you is. I'm realizing that i'm doing more and more things inside emacs and struggle to find a balance of what i want keybinds for. Some stuff is super obvious, like `project-find-file` or Window navigation. But with Org-Mode, Roam/Denote, Magit, Dired and Terminal things, i'm not sure how many functions i want to bind to keybinds.
Thing is, keybinds are only quicker, if you remember them. If you need to search through which-key, just `M-x` and searching is faster. So, do you tend to create keybinds for most things in the packages you use? Or just for the one or two things you use multiple times a day and search for the rest?
Additionally, maybe someone can give me a hint if this is possible: Can i come up with a sort of "custom Command Palette"? So, like `M-x` but it should only contain commands is specifiy? I find that with things like consult or other packages, searching `M-x` can be hard, when a package provides tens of interactive commands.
https://redd.it/1ccmwhm
@r_emacs
Custom expand-region mode expansions not working
Can someone please help me tame expand-region
?
You know, the package that lets you mark, expand and contract the expansion?
This is what I want, I want it to start expanding in this order:
- First select the word
- Then select until the end of line
- Then if the cursor initially was not at the beginning of the line, I want it to mark the whole line,
- then paragraph, etc. etc.
The way how it's usually achieved is by setting "mode expansions", i.e.,:
(defun er/add-mode-expansions ()
(setq-local er/try-expand-list
'(er/mark-word
er/mark-eol
er/mark-bol
er/mark-paragraph
....
)))
(er/enable-mode-expansions 'text-mode 'er/add-mode-expansions)
What I see is happening is that it often skips the first step, immediately proceeding to the selection until the end of line.
Ideally (I think), I'd like it to mark the word, then next adjacent word right after, then to the end of line, and so forth. But first, I need to figure out the simple one.
Why is it skipping the first step?
------------------
Additional notes:er/mark-word
and er/mark-paragraph
are defined in expand-region code.er/mark-eol
and er/mark-bol
are my custom functions, and they seem to be working just fine, at least when they are called directly, and not via er/expand-region
. Interestingly, er/mark-word
is also doing what you expect, when called independently. But when it's called as a mode-expansion, expand-region often skips it (unless the cursor initially is at the exact beginning of the word).
https://redd.it/1cca9m9
@r_emacs
Need Opinions on My Org-Roam and Denote Setup Design
Hi all,
I am a new emacs user so please bear with me. I was setting up org-roam so I can have all my files from different categories linked if there is a relationship. For example, if I have a journal entry that talked about a philosophical topic in application to my life, I want it to link to one of my studies of that topic that is part of the philosophy category. Essentially, I want to map my brain.
In order to keep my files organized, I was planning on keeping my files for each topic in a completely separate directories from the Org-roam directory. I would have an org file in the Org-roam directory that links to that particular file and if there is a relationship, I would just link the org files in the Org-roam directory. In other words, the org files in the Org-roam directory simply contains links to the actual files in my file system and serves as the linker.
To organize my files in my file system, I plan on using the denote package for its file naming scheme.
How does this setup sound? Are there any better setup designs that you can recommend? I was thinking about just using denote, but I like the org-roam-ui and I would like to keep everything in separate dirs. However, if this setup is not feasible then I might do that instead.
Thanks!
https://redd.it/1cc0pio
@r_emacs
The Evolution of Lisp
https://dreamsongs.com/Files/HOPL2-Uncut.pdf
https://redd.it/1cbxtat
@r_emacs
How can I get a few IDE features into my Emacs? Such as auto-complete, symbol renaming, and debugging with breakpoints
I'm learning Clojure, starting with the book Clojure for the Brave and True
That book recommends Emacs for Clojure, and I decided to give it a spin. It also provides some config files for Emacs, here: https://nostarch.com/clojure
It's looking good so far - I vastly prefer keybindings and typing commands than clicking on GUIs (and I sort of already do that with my current "IDE" of choice, VSCode), but there are a few features that I'm missing
Auto-complete, for example: how do I get that?
Also symbol renaming is so very useful - by symbol renaming I mean how in VSCode you can press F2 on a function or variable name, type in a new name, then the variable/function will be renamed everywhere within the project, in a context-sensitive way - so, for example, if I have a poorly name function named, idk, getVars
, I can F2 that function, type in getUserPreferences
and everywhere that function is used in any other file within the project will be renamed
Is that something that Emacs can do in a reasonable way? (e.g. without me having to write a lengthy program)
EDIT: What an awesome community! Thanks for answers, folks!
https://redd.it/1cbvlkk
@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/1cbsvxd
@r_emacs
Alternatives in GNU Emacs: Stock Heatmap
​
https://preview.redd.it/fxu3et9mkdwc1.png?width=1776&format=png&auto=webp&s=d3b44c6567a6f990a08226251c69bbf7402e75a3
The radius is proportional to the weight of the stock in the index. The color is a range between green, white and red based on the price movement. This uses circle packing.
Details: https://lifeofpenguin.blogspot.com/2024/04/alternatives-in-gnu-emacs.html
https://redd.it/1cbrspz
@r_emacs
A new GC method (MPS) is WIP
https://mail.gnu.org/archive/html/emacs-devel/2024-04/msg00434.html
https://redd.it/1cblokb
@r_emacs
'org-roam-capture-templates
`("g" "Daily todo 2" plain
"Just plain text to be added %?"
:target (node "222128A8-9E0C-4F20-B640-5685E0FE3E1A")
:empty-lines 3
:unnarrowed t))
(add-to-list 'org-roam-capture-templates
`("h" "Daily todo 3" plain
"Just plain text to be added %?"
:target (node+olp nil ("Tasks"))
:create-file no
:empty-lines 3
:unnarrowed t))
Hopefully this info is helpful to others. I'll update it based on feedback and potential changes.
https://redd.it/1cbgjdh
@r_emacs
On importing markdown files (e.g., from Obsidian) to org files
I'm in the process of switching from Obsidian to Emacs org mode (with org roam). Just wanted to share the shell and Elisp commands I used to achieve this for future Emacs users. Credits to chatGPT.
This shell command will....
1. Copy all files in your specific original\_dir to a new\_dir to preserve your Obsidian .md files in case of an error.
2. Add PROPERTIES, ID, END, title, and filetags at the very start of the file.
1. If you plan on using #+filetags, you'll need to run this separately for each tag(s) you want to add.
3. Rename an .md file "Text1 Text2 [Text3.md](https://Text3.md)" to "text1\_text2\_text3-lastModifiedTimestamp.org."
1. Note that the title added to the file is separated from the renaming process after removing the .md extension, so it stays as e.g., "Text1 Text2 Text3."
find [../Obsidian Vault/Directory of Interest] -type f -name '*.md' -exec sh -c '
for file; do
original_dir="[../Obsidian Vault/Directory of Interest]"
new_dir="[Export Directory]"
# Modify file content and preserve original modification time
filename="${file##*/}" # Extract full file name
cleanedFilename="${filename%.*}" # Ignore the current file extension. Use new variable so cleaned form excluding modification in the following line can be used when adding #+title to the org file.
filename=$(echo "$cleanedFilename" | tr "[:upper:]" "[:lower:]" | tr " " "_") # Convert filename to lowercase and replace spaces with underscores (default org note format)
modified_time=$(stat -c %Y "$file") # Get the original file modification time in seconds since Epoch
timestamp=$(date -d @"$modified_time" +"%Y%m%d%H%M%S") # Convert modification time to timestamp
new_name="${filename}-${timestamp}.org" # Append timestamp to filename
{
echo ":PROPERTIES:"
echo ":ID:"
echo ":END:"
echo "#+title: ${cleanedFilename}"
#echo "#+filetags: :tag:\n" # Remove/modify as needed. In format :tag: or :tag:tag: etc.
cat "${file}"
} > "${new_dir}/${new_name}"
# Preserve original modification time
touch -r "$file" "${new_dir}/${new_name}"
done
' sh {} +
For formatting, here's what I've used, but it'll depend on the specific Obsidian addons you used.
find [Export Directory/] -type f -name "*.org" -exec sed -i '/^#+/!{
s/<u>\(.*\)<\/u>/_\1_/g; # Replace <u>...</u> with _..._ (underline)
s/\*\([^*]*\)\*/\/\1\//g; # Replace *...* with /.../ (italics)
s/--\([^-]*\)--/+\1+/g; # Replace --...-- with +...+ (strike through)
s/#/*/g; # Replace markdown headings (#) to org headings (*)
s/\t/ /g; # Replace tabs with two white spaces
}' {} +
Finally, you can add this to your Org/Org Roam directory and mark the new files with dired.
Evaluate this Elisp block and use 'C-c i' at the dired buffer to add Org IDs to the selected files.
(defun my/org-id-get-create-on-marked-files ()
"Call `org-id-get-create` on marked files in Dired."
(interactive)
(let ((files (dired-get-marked-files)))
(dolist (file files)
(with-current-buffer (find-file-noselect file)
(org-id-get-create)
(save-buffer)
(kill-buffer)))))
(define-key dired-mode-map (kbd "C-c i") 'my/org-id-get-create-on-marked-files)
https://redd.it/1cbcwrr
@r_emacs
Failed to download ‘elpa’ archive
during site build in GitHub workflow
Starting yesterday, when I try to build my personal site via GitHub actions, I get a `Failed to download ‘elpa’ archive.` message, with the net result that attempting to install the `webfeeder` package fails and, ultimately, the site build fails. I'm finding this one a bit of a head scratcher!
I have made no changes to the build script that might have impacted this (aside from various since-reverted attempts to fix it)
The build environment doesn't appear to have changed between the last successful build and the first failure (same emacs version, same ubuntu version, etc)
It works fine locally
I get the same warning when attempting to use elpa-mirror.
I would greatly appreciate any thoughts/suggestions! If nothing works I can just clone and manually install the necessary package but I would much prefer to solve this issue.
https://redd.it/1cb5hr8
@r_emacs
Restclient archived
Do you know why restclient is archived on GitHub?
https://redd.it/1cb218p
@r_emacs
What keyboard prefix do you use for your keybindings as a non-evil user?
I am loving Emacs without the Evil mode. I feel that the keybindings are more natural that way. No, I don't have the Emacs pinky. Jokes aside, What prefix should I use for my user-defined keybindings.
I have considered several options like C-SPC (it fucks with marking region), M-SPC (opens up the window menu), M-u (fucks with uppercase, which I use), SPC is not even an option, C-d (extremely important), M-d (again, I use it, it is very important to me)
Almost all the keys seems to be occupied. So, what are the options left?
https://redd.it/1cav5n7
@r_emacs
Looking at the past and seeing the future
https://www.youtube.com/watch?v=yLZwLSzkH3E
https://redd.it/1ccqily
@r_emacs
Stock Heatmap in GNU Emacs
https://youtu.be/4ljvsHPBD5g
https://redd.it/1ccnmuq
@r_emacs
Denied rights to my documents folder on W10
This is a real puzzler. I'm experimenting with emacs on my W10 machine, and it runs ok. But I can't get into My Documents. Not sure if it's because I have that folder "paired with" OneDrive, or if there is some other mysterious process at work. Any suggestions?
https://redd.it/1cc4a35
@r_emacs
Comment character only if it's the first non-blank character
In this language, the quote character, ', begins a comment, but only if it's the first non-blank character. Otherwise, the quote character is just a regular quote. How can this be implemented in a new major mode?
I have set:
(set (make-local-variable 'comment-start-skip) "^[[:blank:]]*'")
' This is a comment
But thi's is not
Failed to download ‘gnu’ archive in emacs 28
Hi guys,
So I stoped using emacs for about a month and for some reason now every time I start emacs I got the following error
```
Importing package-keyring.gpg...
Importing package-keyring.gpg...done
Contacting host: elpa.gnu.org:443
Contacting host: elpa.gnu.org:443
Failed to download ‘gnu’ archive.
Contacting host: elpa.nongnu.org:443
Failed to download ‘nongnu’ archive.
Contacting host: melpa.org:443
Contacting host: melpa.org:443
Package refresh done
Error (use-package): Failed to install eglot: Package ‘eglot-’ is unavailable Disable showing Disable logging
Importing package-keyring.gpg...
Importing package-keyring.gpg...done
Contacting host: elpa.gnu.org:443
Contacting host: elpa.gnu.org:443
Failed to download ‘gnu’ archive.
Contacting host: elpa.nongnu.org:443
Failed to download ‘nongnu’ archive.
Contacting host: melpa.org:443
```
After intializing emacs I did `package-refresh-contents` and got the following
```
Failed to verify signature archive-contents.sig:
No public key for 645357D2883A0966 created at 2024-04-24T10:10:08+0100 using EDDSA
Command output:
gpg: Signature made Wed 24 Apr 2024 10:10:08 AM WEST
gpg: using EDDSA key 0327BE68D64D9A1A66859F15645357D2883A0966
gpg: Can't check signature: No public key
```
This is my init.el about melpa, and thats it, everything else its not related to melpa
```
;; add melpa repo
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(package-initialize)
;; install use-package
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
```
https://redd.it/1cc2205
@r_emacs
Treemacs breaking Spacemacs
I just upgraded my Emacs to 29.3 and now, when I start Treemacs my Spacemacs leader key (A-m) stops working and it does not go back to working once I stop Treemacs.
The change affects all the frames I have up at the time and both, GUI and terminal Emacs.
I don't remember this happening before - how do I go finding what is going on? I am sure it is possible but I do not know where to start.
OK, it seems that the keys work but the menu that shows all the kebindings no longer works - in case this helps anybody.
Thanks
https://redd.it/1cbt112
@r_emacs
Elisp: Modifying lists from within functions
I found out the hard way (and thanks to this reddit thread) that Elisp uses Call by Sharing.
ELISP> (defvar ls '())
ls
ELISP> ls
nil
ELISP> (push 10 ls)
(10)
ELISP> ls
(10)
ELISP> (defun my-push (list item)
(push item list))
my-push
ELISP> (my-push ls 20)
(20 10)
ELISP> ls
(10)
What are the workarounds here? Using macros works, but I was curious if there is anything else that can be done?
https://redd.it/1cbs8e5
@r_emacs
Q: SVG Image Map
An SVG element can be enclosed in <a> tag to mark it as an activated image map area. This facilitates click and tooltip behavior. However, the calculation gets a bit complicated with viewBox where we need to maintain the aspect ratio while simultaneously displaying the full image. Has anybody worked on it before? Or you may suggest improvement to the following code.
(defun svg-image-map (image)
(let* ((j 0)
(x 0)
(y 0)
(factor 1)
(view (dom-attr image 'viewBox))
title bbox map w h w1 h1 l l1 diff)
(when view
(setq origin (svg-parse-viewBox image)
w (dom-attr image 'width)
h (dom-attr image 'height)
w1 (nth 2 origin)
h1 (nth 3 origin)
l (if (< w h) w h)
l1 (if (> w1 h1) w1 h1)
factor (min (/ w w1 1.0) (/ h h1 1.0))
diff (- l l1)
x (car origin)
y (cadr origin)
;; y axis is inverted
x (+ (if (> w h) (* .5 (- w w1)) 0) (* x factor))
y (+ (if (< w h) (* .5 (- h h1)) 0) (* y factor))
))
(dolist (i (dom-by-tag image 'a))
(setq bbox (svg-bbox (dom-children i))
j (1+ j)
title (xml-substitute-special
(or (dom-attr i 'text)
(dom-attr i 'xlink:title))))
(when bbox
(push `((rect . ,(read (format "((%d . %d) . (%d . %d))"
(- (* (nth 0 bbox) factor) x)
(- (* (nth 1 bbox) factor) y)
(- (* (nth 2 bbox) factor) x)
(- (* (nth 3 bbox) factor) y))))
,(intern-soft (format "area%d" j))
(pointer hand help-echo ,(format "%s" title)))
map)))
map))
The latest version is available here [https://gitlab.com/atamariya/emacs/-/blob/dev/lisp/svg.el#L3188](https://gitlab.com/atamariya/emacs/-/blob/dev/lisp/svg.el#L3188)
https://redd.it/1cbq6cx
@r_emacs
Key issues on vanilla Emacs running under WSL2
I'm running terminal Emacs 29.3 under WSL2 on Windows 11, and the Insert, Home, PageUp, PageDown, Del, and End keys are unusable. Instead of the expected behaviours I get output like [2~[6~]]
, etc. What could the underlying issue here be? This happens even with emacs -Q
.
https://redd.it/1cbjz6i
@r_emacs
Explaining how org-roam templates work, how to debug them, and some improvements
Hi everybody,
I was going to post this in the org-roam forum, but its readership is very limited. So I thought it was better to do it here.
I have been a devoted user of org-roam. It just works. There has been some discussion that development has stalled. Nonetheless, it works and it works well.
What I want to do in this post is to document a bit better how templates work.
First of all, a bit of context. Templates in org roam piggyback on org templates. Let us use the example from the org-roam manual:
(("d" "default" plain "%?"
:target (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
"#+title: ${title}\n")
:unnarrowed t))
This template, when executed, does 2 steps:
1. Asks the user for a org-roam node title destination (potentially a new one). If the node title does not exist,
2. The template is expanded and inserted (in this case, its type is plain, contents ""%?")
Step 1 is done by org-roam. Note that even if the template specifies a destination, the user will be asked for a node (this is an annoyance). This is because templates are used when a user is looking for a node and the title does not exist (e.g org-roam-node-find)
Step 2 is done by org.
How this is done is interesting. When the user calls org-roam-capture, the org-roam-templates are rewritten to org-templates. In this case, the template above is rewritten as:
(("d" "default" plain
#'org-roam-capture--prepare-buffer "%?"
:unnarrowed t
:immediate-finish nil
:org-roam (:target (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}")
))
This means that step 1 above is triggered by org-template system by calling org-roam-capture--prepare-buffer which uses the information found inside the template under the field org-roam (the target).
The main result of this processing is that it is makes it difficult to debug org-roam-templates, because the errors might come from org-roam or org.
**Suggestions to debug templates:**
* enable toggle-debug-on-error to see some info about where the error happens
* if it is in org-capture, create an org-capture template first that is similar to the org-roam-capture one.
Here is an example: this template will fail with the error:
org-capture: Capture template ‘d’: Template is not a valid Org entry or tree
(("d" "default"
entry
"%?"
:target (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
"#+title: ${title}\\n")
:unnarrowed t))
This is confusing. The cause of the error is not org-roam. It is because a template of type entry should have as its template a valid header (change "%?" to "\* Something %?" and it will work.
To debug it you can create an equivalent org template like below, and you will see the same error.
("d" "default"
entry
(file+headline "\~/org/todo.org" "Tasks")
"%?"
))
# my improvements to org-roam's template system
I have improved org-roam's template system and created a pull request. The main features of this pull request are:
[https://github.com/org-roam/org-roam/compare/main...dmgerman:org-roam:main](https://github.com/org-roam/org-roam/compare/main...dmgerman:org-roam:main)
1. Ask the user for node-id only when necessary
2. Add some keywords to the template system:
* Add node and node+olp to target. node uses id or title (first matching title found). If it is nil, ask user for new or existing node title.
* create-file. Only applies when node does not exist. if no, no new file will be created (i.e. node must exist). Particularly useful if you want a template not to create a new file.
​
(add-to-list 'org-roam-capture-templates
`("f" "Daily todo" plain
"Just plain text to be added %?"
:target (node+olp "222128A8-9E0C-4F20-B640-5685E0FE3E1A" ("Tasks"))
:empty-lines 3
:unnarrowed t))
(add-to-list
Re: Emacs: Roaming Roam
In http://gem.librehacker.com/gemlog/starlog/20240418-0.gmi Christopher Howard talks about segregating Roam nodes into different areas, perhaps by project. He provides some code to select different Roam setups. I'm responding here as Christopher doesn't provide a way to reply or comment.
I have segregated my Roam data into two areas, work and personal. My Roam settings on my work laptop are for the work Roam data:
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
.
.
.
'(org-roam-directory "/home/davemarq/org/roam/" nil nil "Customized with use-package org-roam")
My personal Roam data is in a directory pers
I synch between work and home via Github. I use this personal Roam database at work too. To set my roam directory for this area, I use directory local settings in pers/.dir-locals.el
:
((nil . ((org-roam-db-location . "~/pers/org-roam/org-roam.db")
(org-roam-directory . "~/pers/org-roam"))))
I'm not a user of project or projectile, but I suspect one could also set these variables per project using mechanisms provided by project or projectile.
https://redd.it/1cb523e
@r_emacs
Sorting branches by "least recently used" in Magit
Although I use Emacs for quite some time, I don't usually go very deep into how everything works and connects together (lazy Doom Emacs user here).
And I miss this feature: when I checkout a local branch in Magit by pressing b l
, I am presented with a list of branches to choose from. And this list is sorted alphabetically (it seems). I wish it was sorted in the LRU manner instead.
How would I approach this? Must this be done by Magit? Or is it the feature of either vertico
or embark
which I use? But I still would need to supply them a branch modification time somehow...
Any pointers on where to go from here?
https://redd.it/1cb56ch
@r_emacs
Academic writing using Emacs, Zotero, and Gnuplot
https://youtube.com/watch?v=SUdlOpKLZdA&si=OoVu8ErUPm6rKSjd
https://redd.it/1cazsiz
@r_emacs
Line height changing with ligature
I'm using PragamataPro Mono Liga font, using the ligature.el library by Mickey Petersen to display ligatures. The double pipe ||
ligature causes the current line height to increase and causes the next line to move down slightly as shown in this gif:
https://cdn.zappy.app/87bee52262a7d88cc60b5a596339cca1.gif
It does not happen with other ligatures, nor with other fonts I've tried. So it could be a problem with this font, although the ligature displays correctly in VS Code. The combination of Emacs, this font, and this ligature causes the problem.
Although as mentioned I'm using ligature.el, I reproduced the above gif more simply using emacs -q
and this elisp:
(set-char-table-range composition-function-table t '("||" 0 font-shape-gstring))
(set-face-attribute 'default nil :family "PragmataPro Mono Liga")
Increasing `line-spacing` does not help.
Any ideas as to a workaround? Visually it's a little annoying. Thanks!
https://redd.it/1cap99m
@r_emacs