resources:emacs_resources
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| resources:emacs_resources [2016/01/18 19:30] – anthony | resources:emacs_resources [2019/05/22 16:08] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Emacs Resources ====== | ||
| + | |||
| + | \\ | ||
| + | |||
| ====== Regular expressions ====== | ====== Regular expressions ====== | ||
| Line 68: | Line 72: | ||
| ---- | ---- | ||
| + | ==== Add line break (RETURN) to end of all lines ==== | ||
| - | ==== Sort article lists by year using awk and sed ==== | + | [Put another way: insert spaces, insert empty line in between every line.] |
| - | [Originally from Anthony' | + | < |
| - | + | M-x replace-regexp | |
| - | Exported bibliography to clipboard in Zotero, pasted into Emacs to write new file: | + | .$[RET] |
| - | + | \&[C-q][C-j][RET] | |
| - | '' | + | |
| - | + | ||
| - | + | ||
| - | Try using awk to print column with year before whole rest of line | + | |
| - | + | ||
| - | <code bash> | + | |
| - | $ gawk ' | + | |
| </ | </ | ||
| - | Remove parens from FIRST (year) on a line: | + | " |
| - | <code bash> | + | C-q indicates something like " |
| - | sed -r 's/[(]([0-9]*[a-z]? | + | |
| - | </ | + | |
| - | Used rectangle register copy trick in Emacs to copy only first five chars (catches both 2012 and 2012b) and pasted ultimately to Excel column. | + | C-j inserts a line break (a RETURN keypress, but this might not be the most precise description). |
| \\ | \\ | ||
| ---- | ---- | ||
| - | |||
resources/emacs_resources.1453163401.txt.gz · Last modified: (external edit)
