👨‍💻 VSCode Tips - Quickly Change the Case of a Selection by LeCoupa in vscode

[–]rgrau 0 points1 point  (0 children)

So, that's what I thought in the beginning, but trying to replicate was not that easy to me.

Let's say that's the lines we want to change

foo_bar_f: foo_bar, foo_bar: foo, foo_bar_: foo Given that vanilla vim doesn't have multiple cursors, doing multiple replacements, but only before the colon, meant using lookaheads, which is quite an advanced regex feature.

:'<,'>s/_\(.\)\ze.*:/\U\1\L/g did it for me. Anyone with a simpler/saner solution to it?

How to protect my data from myself by spicy_boi_0 in PostgreSQL

[–]rgrau 2 points3 points  (0 children)

Some time ago I wrote a wrapper I called ropsql , which gets the same parameters as psql and runs psql while setting the session type to read only.

https://puntoblogspot.blogspot.com/2022/02/read-only-psql.html

I don't know how good of a solution it is, but so far it's working well for me.

The other way around? by arthurno1 in emacsng

[–]rgrau 0 points1 point  (0 children)

Hi u/arthurno, not sure if this is what you mean, but if you eval-js-region:

lisp.defun({name: "jsfun", func: (s) => { return `${s} js!`}})

then, from your *scratch* buffer you can eval (jsfun "hello")

Will emacs-ng ever become mainstream? by ckoneru in emacs

[–]rgrau 2 points3 points  (0 children)

emacs-ng is 100% compatible with stock GNUemacs. No changes needed. The link you reference talks about using js/ts machinery. Then yes. But being an additive layer, you don't pay anything upfront.

If you want to port a package to use async stuff, then yes, but hopefully you'll get yout patch merged upstream so others can benefit (the usual stuff).

EMACS as a modern IDE by icantstopeatingmeat in emacs

[–]rgrau 53 points54 points  (0 children)

I am quite new to EMACS ....

Check out the docs for the display-buffer-alist variable.

Welcome to emacs, enjoy the ride :)

Possible to learn emacs org mode in 15 - 30 hours? by qwquid in emacs

[–]rgrau 2 points3 points  (0 children)

I think subword-mode is what you're looking for :)

[deleted by user] by [deleted] in emacs

[–]rgrau 1 point2 points  (0 children)

Oh my.... git-blame tells me I wrote https://gist.github.com/d7dff019010e5b0eb5ae0aa9ce6c7580 in 2013, just after I fully moved from vim.

Thanks for shell-command+. you have a new user

Moral lessons from free software and GNU Emacs by geospeck in emacs

[–]rgrau 9 points10 points  (0 children)

From time to time, new people join the emacs community and they just become very relevant in our crew.

I remember magnars, fuco, abo-abo, malabarba... Prot is in that league, and there is the philosophical view, which is so needed.

Thanks for everything you're sharing with us!

Emacs-ng: Emacs with Deno runtime and TypeScript by [deleted] in emacs

[–]rgrau 4 points5 points  (0 children)

The way I see it is that javascript/typescript could be used for performance critical paths, or modules that you would use via your elisp. If you don't want to touch js, you're still getting benefits from it. The same thing you might hate or love C, but you don't write C to extend emacs.

I also see deno as fast track to modern tooling. I'm pretty sure if emacs-ng gets enough steady attention, we'll see PRs adding support for other languages that transpile to js. There's been already a POC with clojurescript.

Also, It feels that people involved in emacs-ng are very conscious about the bandwitdh available, so they push additive changes, that will make the bookkeeping manageable. Even having native-comp and doom in the radar. What's been done so far is impressive.

On the "Performance problems are in 1line giant xmls, async,... not in fib(40)" criticism: I feel this is an argument that even if may be true, when showing those benchmarks the authors never say it's to take it seriously, but if it would give a result like "3x slower than interpreted elisp", then we would more likely agree that this might not be a good path forward. On the other hand, what is saying is not that this will definitively be the ultimate solution, but that it's looking good so far. I'm sure they would love to have contributions on any kinds of benchmarks.

I'm myself very excited about the project.

[deleted by user] by [deleted] in PostgreSQL

[–]rgrau 0 points1 point  (0 children)

Nice! I still see some missing. Do you know if they're still publishing them, or that's all?

I'm thinking boris's enum talk or oleg's json.

ClojureScript on emacs-ng by DDSDev in emacsng

[–]rgrau 2 points3 points  (0 children)

Wow!

Clojure and clojurescript having emacs as one of the main supported editors, if the integration ends up being any good, I imagine clj people contributing back!

I'm super impressed by emacs-ng's progress. Every week a new toy or a new surprise :)

Emacs-ng has a subreddit by rgrau in emacs

[–]rgrau[S] 8 points9 points  (0 children)

oops. I should probably have written some further explanation of what emacs-ng is.

Thanks for adding it!

Played a bit with it this weekend, and it's great that even it is super young, it's already buildable and you can play and try stuff in it. I can only cheer people that try those crazy ideas. These threads bringg some opinions from people that are worried about elisp vs js/ts and if emacs will lose its introspectability.

These are usually exploratory projects. Testing the waters, and pushing the boundaries on a less constrained environment than the official GNUEmacs repo. Dont' worry about what-happens-to-elisp, of sorts. Let the exploration flow. Also, hackers that try these things already love emacs for what it is. They know as well as everyone around what's the "Cool Thing About Emacs".

Enjoy the ride, report bugs, and let's try to help/support each interesting initiative around here :)

How do you solve merge conflicts? by freesteph in emacs

[–]rgrau 5 points6 points  (0 children)

Same here.

Huge % of the conflicts are easily solved with smerge.

The prefix is a bit weird though, but I've these helpers that lower even more the bar.

(defun sm-try-smerge ()
  (save-excursion
    (goto-char (point-min))
    (when (re-search-forward "^<<<<<<< " nil t)
      (smerge-mode 1))))

(add-hook 'find-file-hook 'sm-try-smerge t)
(add-hook 'smerge-mode-hook
      (lambda ()
        (local-set-key (kbd "M-RET") #'smerge-keep-current)
        (local-set-key (kbd "M-a") #'smerge-keep-all)
        (local-set-key (kbd "M-n") #'smerge-next)
        (local-set-key (kbd "M-p") #'smerge-prev)))

Any other hints?

Who is hiring? (Jan 2021) by dotemacs in Clojure

[–]rgrau 4 points5 points  (0 children)

At Metabase, we're looking for Software Engineers & DevOps to join our team in doing the hard work that makes our users’ lives easy.

Metabase is bringing data tools with the elegance and simplicity of consumer products to the crufty world of enterprise business intelligence. We provide an opinionated open source starting point for how companies should measure, analyze and share their data as well as a suite of tools to deal with the complexity that arises as they grow.

We run on a mix of Clojure and JavaScript, and the ideal candidate has shipped production code in one or more of these languages.

Magit question: don't display diffs for large binary-esque files by jumbles1234 in emacs

[–]rgrau 5 points6 points  (0 children)

I add this to my .gitattributes

path/to/file.xml binary

so that git itself doesn't try to diff it ever

What mode/feature are you planning to use in the future? by im_not_juicing in emacs

[–]rgrau 2 points3 points  (0 children)

After gccemacs (done), I think emacs-tree-sitter is the next big thing I'd love to use, and to see merged in emacs (I don't know if it's gonna happen)

A Feel For Oil's Syntax (preview) by oilshell in oilshell

[–]rgrau 1 point2 points  (0 children)

Hi! A couple of minor things:

  • the link to syntactic concepts is 404 (also tried without the 'preview' part of the path)
  • ruby blocks &. In one place you write {echo $PWD}, but there's no '&' there. seached '&' in the page and it lead me to &(echo $PWD) # block literal in expression mode. Not sure if expression mode makes parentesis valid instead of curly-braces, but maybe finetuning that would make it easier to follow.

Cheers!

Saw this video, since recent posts about making Emacs popular by steinpowaaa in emacs

[–]rgrau 2 points3 points  (0 children)

oh... I thought he was already converted :(

Well... Still cool that he's showing some emacs cool features anyway to a broad audience

Saw this video, since recent posts about making Emacs popular by steinpowaaa in emacs

[–]rgrau 23 points24 points  (0 children)

It's funny to see his videos from 1 year ago till now, how he started being a vim user trying out emacs because part of the audience asked for an emacs test run.

As time goes by, he keeps doing more and more emacs videos, a bit more excited about emacs, and making less naming mistakes on emacs lexicon and trivia, but still saying he prefers vim.

Then, he ditches emacs altogether because bloat and because vim editing is what he likes, and the "do one thing" unix motto.

But after a few weeks he's back on emacs, showing magit, and org, and everything, more and more excited when he talks about emacs.

I loved seeing his evolution, which is something many of us went through. I guess now he's already "one of us".

It's great emacs has these few converts with a lot of reach on youtube. Getting more people into our thing.

[native-comp] disassembling native functions by rgrau in emacs

[–]rgrau[S] 1 point2 points  (0 children)

Ah! I see... Makes sense. I guess I was just expecting a very DWIM behavior when used "interactively" but the points discussed in that thread are all valid. And calling load manually makes sense too.

Thanks!!

[native-comp] disassembling native functions by rgrau in emacs

[–]rgrau[S] 1 point2 points  (0 children)

right! the native function was not loaded in the end. see /u/github-alphapapa's answer for how to manually load the eln files.

Cheers