Live data from Hacker News

My Emacs Productivity Tricks/Hacks

mycpu.org

131–140 of 210 posts

Re: My Emacs Productivity Tricks/Hacks

#133

Earlier quoted context omitted.

@rntski, I will be happy to. I feel I get a bigger bang for buck for Work Email on Outlook Exchange since Email on mu4e makes me less distracted.

This sentence is either missing a negation or correlates "bang" with "distraction", which is wrong since "bang" is positive and "distraction" negative.

You are right, scratch that and I will try this again. I meant to say:

I have configured and used mu4e on a GMail account and another account hosted on Microsoft Exchange Server (MSE).

The Linux based email client I had tried before mu4e for MSE account are: * WebMail (Outlook's less capable younger cousin on a browser) * a slew of Linux UI email clients like Thunderbird etc.

I disliked all of them equally. However, using mu4e for emails with Outlook/MSE account makes doing emails less painful and less distracting. However, using mu4e as a mail client for Google accounts may not be preferable if you have bought heavily into the Google ecosystem. I have had trouble with things like Google API authentication on Emacs.

Re: My Emacs Productivity Tricks/Hacks

#134
post #82

Earlier quoted context omitted.

Doesn't sound crazy at all to me! I do this all the time using multiline editing in Sublime Text. It's the one part of a more modern IDE I have a hard time giving up (transitioning to Spacemacs currently). Will have to try out this script and see if it helps bridge the gap!

I tend to do it in sublime with a regex: Find/replace all: ^(.*)$\n with "$1",

That also works well in Emacs:

    C-M-% runs the command query-replace-regexp (found in global-map),
    which is an interactive compiled Lisp function in ‘replace.el’.

    It is bound to C-M-%,   
    .

    (query-replace-regexp REGEXP TO-STRING &optional DELIMITED START END
    BACKWARD REGION-NONCONTIGUOUS-P)

    Replace some things after point matching REGEXP with TO-STRING.
    As each match is found, the user must type a character saying
    what to do with it.  For directions, type  at that time.

Re: My Emacs Productivity Tricks/Hacks

#135
post #43

Earlier quoted context omitted.

I completely agree. I used vanilla Emacs for about a decade before finding list-packages. (I know, I know. I was really behind.) But stuff like org-mode never clicked for me. I had to sit down with the manual and read it to finally get a handle on what it is. I'm currently drafting an essay on what makes org-mode compelling, rather than how to use it. I think I'll do the same for other tools I use.

> I completely agree. I used vanilla Emacs for about a decade before finding list-packages I think it helps to think of Emacs as just another platform - and a nice stable one. You may or may not use, or know about, all the "applications" available for it. New stuff comes along that you haven't heard about; you might occasionally want to review things; and it doesn't really matter if you don't. I've been using it for…

> I think it helps to think of Emacs as just another platform - and a nice stable one. You may or may not use, or know about, all the "applications" available for it. New stuff comes along that you haven't heard about; you might occasionally want to review things; and it doesn't really matter if you don't.

That's one of the best explanations I've heard. Thanks.

Re: My Emacs Productivity Tricks/Hacks

#136
post #89

Whenever I hear about or see the .vimrc and .emacs files people create, maintain and constantly modify to me this just looks like the perfect example of a sunk cost fallacy. IDEs are usually dismissed by many such people since you can (allegedly) do the same in vim/emacs but to me this seemed crazy as I'd see people spend hours configuring plugins, writing Lisp and whatever to save them on some task they'd get for fr…

It's not an example of sunk cost fallacy, much less a "perfect" one. If you insist on shoehorning it, then the fallacy argues against you since the future value of emacs is no longer diminished by the sunk cost of configuring it.

Re: My Emacs Productivity Tricks/Hacks

#137
post #35
post #17

I've used Emacs for decades and still feel like I'm barely scratching the surface. What would really help me with articles like this one is more narrative on _why_ these particular modes are so useful. For example, it took me a long time to learn org-mode because I just didn't know what to do with it! I feel like Helm is similar, I've tried it briefly, but I'm not sure if or how it would fit into my workflow.

> For example, it took me a long time to learn org-mode because I just didn't know what to do with it! Carsten Dominik's Google Tech Talk is probably still the best intro: https://orgmode.org/worg/org-tutorials/org-screencasts/org-m...

See as well this video for more recent demos (2019) by John Wiegley (the Emacs maintainer) and John Kitchin (a CMU chemistry professor who uses Org extensively):

https://www.youtube.com/watch?v=31gwvApo8zg

Re: My Emacs Productivity Tricks/Hacks

#138
post #99
post #89

Whenever I hear about or see the .vimrc and .emacs files people create, maintain and constantly modify to me this just looks like the perfect example of a sunk cost fallacy. IDEs are usually dismissed by many such people since you can (allegedly) do the same in vim/emacs but to me this seemed crazy as I'd see people spend hours configuring plugins, writing Lisp and whatever to save them on some task they'd get for fr…

You might as well make this point about all software. Can't people just use Excel? Why write something bespoke?

What’s Excel? apt search is not showing anything...

Re: My Emacs Productivity Tricks/Hacks

#139

The one thing I consistently do in emacs that shocks my coworkers -- is running this (custom) function, that I call "arrayify": (defun arrayify (start end quote) "Turn strings on newlines into a QUOTEd, comma-separated one-liner." (interactive "r\nMQuote: ") (let ((insertion (mapconcat (lambda (x) (format "%s%s%s" quote x quote)) (split-string (buffer-substring start end)) ", "))) (delete-region start end) (insert in…

I achieve the same by running two consecutive regex search and replace and a single backspace click s/^/"/ s/\n/“, / (Change all beginning of line to double pling. Change all new lines to double pling, comma, space) I don’t even store this as a procedure, I just ctr-f and do it from whatever text editor I’m in (I’m not an Emacs user) The nice thing about search and replacing your way out of problems is that it works…

I also prefer a more universal method. Arrayify is the equivalent of those useless specialized vegetable cutters and carvers in the kitchen that Alton Brown so hates. Search/Replace with Regex is universal.

Arrayify breaks down with the slightest change in requirements.

Post reply on HN