3 ms·
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
by wodenokoto 7y ago
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 on coworkers machines.
I’m not saying it’s better than a stored procedure or a macro but once you’re into it, it’s easy to regex your way out of all sorts of adhoc problems :)
- spectramax 7y agoI 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.
- wbl 7y agoAnd then you write some more elisp
- adrianN 7y agoThat's the whole point of a system like emacs: it enables the users to easily write solutions to their specific problems. It doesn't have to be general, it has to be easy to solve the problem at hand. It's the same with bash and unix tools. Writing general bash scripts is a nightmare, but datamunging particular problems works really well.
- sufyanadam 7y agoarrayify will also work on co-workers machines. You can open files on remote machines with tramp mode, and screenshare via zoom or something