Startec

Startec

Emacs xref stopped working on Macs with dumb-jump

Mai 19, às 16:48

·

2 min de leitura

·

0 leituras

Recently I found that xref in Emacs had stopped working for me on my mac laptop. Today I finally tried to figure out what went wrong. xref is just a front-end, all the work is done by backends. It took a...
Emacs xref stopped working on Macs with dumb-jump

Recently I found that xref in Emacs had stopped working for me on my mac laptop. Today I finally tried to figure out what went wrong. xref is just a front-end, all the work is done by backends. It took a while for me to realize (ie remember) that I was using the excellent dumb-jump package as the backend. dumb-jump uses a range of fast search commands (such as ag and ripgrep) to detect references without using the awkward tags tables that Emacs used to rely on.

The command flow between xref and dumb-jump is difficult to follow, but looking at the dumb-jump customization page alerted me to dumb-jump having a debug option. With this enabled, I could see what command dumb-jump was sending to the operating system. By default it uses git grep while in a git repo (almost everything I do is in a git repo). Its git grep command is quite complex, using regexps to (I assume) get more sensible results. I tried out the command it issued in my own terminal and it failed to find anything, while a simple git grep worked fine.

Armed with a better knowledge of what was failing, I dug into dumb-jump’s issues and found Issue with git-grep. Reading that, I discovered that a change to git grep means that how git grep processes regexes differs depending on the operating system. This would mean that dumb-jump would need to detect git-grep’s version and the underlying OS to pick the right regexes for its search.

The fix for me is to force dumb-jump to use another searcher with (setq dumb-jump-force-searcher 'rg). With that my xref commands worked again.


Continue lendo

DEV

"From Occupational Therapy to Code": CodeNewbie Podcast S24E4
In S24E4 of the CodeNewbie Podcast, @saronyitbarek talks about building inclusive web applications with Africa Mincey, Accessibility Engineer! Africa Mincey is a Software Engineer and accessibility...

Hoje, às 15:34

DEV

How to make your own simple translator in HTML & JavaScript
DESCRIPTION: In this tutorial, I will teach you how to make a website that translates one language into another using HTML, CSS, and JavaScript. Part One [Choosing a Language]: When choosing a...

Hoje, às 15:23

Tech Crunch

Cortex raises $35M Series B for its internal developer portal
Cortex, a startup building an internal developer portal that helps engineering teams build better software at scale, today announced a $35 million Series B funding round led by IVP. Craft Ventures, along with...

Hoje, às 15:01

Tech Crunch

Okay, which analyzes engineers’ productivity, sells to Stripe
Fintech giant Stripe has acquired Okay, a startup that developed a low-code analytics software to help engineering leaders better understand how their teams are performing, the companies told TechCrunch...

Hoje, às 15:00

DEV

Next.js 13 and React Suspense: Create a loading component
Written by Suraj Vishwakarma✏️ It has been some time since Next.js 13 was launched in October 2022. In the beta, we learned of some major changes coming to Next.js, like support for Suspense, a React feature...

Hoje, às 14:29

DEV

AWS Lambda Use Cases: When You Should Use It?
Lambda, and Serverless in general, is rather “in” right now in the world of cloud computing. If you listened to all the marketing coming out from the big names about it (and yes, I’m guilty of this too);...

Hoje, às 14:13

Tech Crunch

Hyro secures $30M for its AI-powered, healthcare-focused conversational platform
Israel Krush and Rom Cohen first met in an AI course at Cornell Tech, where they bonded over a shared desire to apply AI voice technologies to the healthcare sector. Specifically, they sought to automate the...

Hoje, às 14:00

Tech Crunch

SecureSave's secret weapon: Suze Orman
Hello, and welcome back to Equity, a podcast about the business of startups, where we unpack the numbers and nuance behind the headlines. This is our Wednesday show, where we niche down to a single person,...

Hoje, às 13:59

DEV

Welcome Thread - v227
Leave a comment below to introduce yourself! You can talk about what brought you here, what you're learning, or just a fun fact about yourself. Reply to someone's comment, either with a question or just a...

Hoje, às 13:51

AI | Techcrunch

Just how hard is it for startups to raise capital today?
Hello, friends! If you are a founder looking to raise your first external capital or your startup is a bit farther down the line, you need to know what’s going on in the world of venture capital. Don’t worry, the TechCrunch+ crew has your back. Building off TechCrunch’s rapid-fire coverage of individual startup funding rounds, […]

Hoje, às 13:33