M-,
: go back M-\
: delete-horizontal-space
. when ranting about how C-
kills too much, just use M-\
instead! M-q
: fill-paragraph
: make stuff 80 column, at least in text. so this is not that bad. C-u C-space
: go back to where you were in the file. C-x r t
: string-rectangle
. insert new text in a rectangle ergoemacs ascii art . I bind this to C-x r i
for insert
. C-x r k
: delete column of text. For kill
. C-x space
: rectangle-mark-mode
to select rectangles. C-space
to lay down mark. I bind it to C-x r r
. C-x tab
( indent-rigidly
): move the indent of a region left or right with arrow keys. C-c C-c
: org-capture into code snippet. C-c C-d
: open org-capture list. C-c C-o
: follow a link. C-c C-a
: compile file. C-c backtick
: go to error. C-c C-v
: view file. M-x TeX-error-overview
: see all errors C-c C-s
: enter section C-c C-e
: enter environment (stuff in between \begin{}...\end{}
) M-g n
: goto next error. M-g p
: goto previous error. C-x g
: pop up magit (define-key lsp-mode-map (kbd "C-c l") lsp-command-map)
C-c l g r
: goto ref C-c l g g
: goto definition C-c C-r
: go to output. C-u C-c C-r
: narrow to output. cd =
gives a list to go do. C-c =
gives a completion list. dired-jump
: open current file in dired. markdown-mode
lags when I open a paren [for a link
. text-mode
.
ctrl-backspace
/ backward-kill-word
kills far too much. ctrl-backspace
does. However, as a non-expert, it's hard
to say what redefining this will mean. Will it still interact
with history the same way?
C-o
(go back to where I came from). (autoload 'View-scroll-half-page-forward "view")
(autoload 'View-scroll-half-page-backward "view")
(global-set-key (kbd "C-d") 'View-scroll-half-page-forward)
(global-set-key (kbd "C-u") 'View-scroll-half-page-backward)
However, this does not work well. On press C-u
to go to
the top of the file, it does not move the cursor to the
top completely; once the first line is in view
(with my cursor still on line 30),
emacs obstinately refuses to scroll up with a 'beginning of buffer'
message. I'm sure there's more elisp
I can write to fix this,
but the fact that something like moving-half-a-page
is rocket science just rubs me the wrong way.
This code that is given in emacswiki
also
has the exact same issue, I don't understand
how the poster says they come from vim and
did not notice this inconsistency.
(defun zz-scroll-half-page (direction)
"Scrolls half page up if `direction' is non-nil, otherwise will scroll half page down."
(let ((opos (cdr (nth 6 (posn-at-point)))))
;; opos = original position line relative to window
(move-to-window-line nil) ;; Move cursor to middle line
(if direction
(recenter-top-bottom -1) ;; Current line becomes last
(recenter-top-bottom 0)) ;; Current line becomes first
(move-to-window-line opos))) ;; Restore cursor/point position
(defun zz-scroll-half-page-down ()
"Scrolls exactly half page down keeping cursor/point position."
(interactive)
(zz-scroll-half-page nil))
(defun zz-scroll-half-page-up ()
"Scrolls exactly half page up keeping cursor/point position."
(interactive)
(zz-scroll-half-page t))
(global-set-key (kbd "C-d") 'zz-scroll-half-page-down)
(global-set-key (kbd "C-u") 'zz-scroll-half-page-up)
chinese-iso-8bit
utf-8
being the
sanest of them all; this is a nice spherical cow of
the problems with emacs: too much stuff, too like sanity.
The spell is:
(set-language-environment "UTF-8")
global-linum-mode
lags on very long files.
emacs
lags given very long lines.
A comment by eli-zaretskli
on reddit
says:
That is true, but the "fix" part misses the point. There's nothing wrong with the current algorithms, they just cannot handle these situations better than they already do. The main problem that makes redisplay slow in these cases is that, given a cursor motion command, such asSo there's a fundamental problem. He continues:C-n
orM-v
, the display engine needs first to find where in the buffer that command puts point. And that is non-trivial when variable-size fonts are supported and variable-size characters (or images) can be anywhere on display.
... we are talking about one of the following two alternatives: Add new members to the data structures used by the display engine, that would allow it to find good approximations for buffer positions corresponding to given screen coordinates, then augment the algorithms to generate and use this additional data. edesign the display code to use a model that is entirely different from the current simple 2D canvas.
emacs --version
says:
╰─$ emacs --version
GNU Emacs 26.2
Copyright (C) 2019 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GNU Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
I ran it with emacs -q
. The bactrace points at a segfault in ImageMagick
:
Fatal error 11: Segmentation fault
Backtrace:
emacs[0x50fdc9]
emacs[0x4f61f7]
emacs[0x50e77e]
emacs[0x50ea83]
emacs[0x50eac0]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7f213756b390]
/usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/modules-Q16/coders/svg.so(+0xb8b8)[0x7f211676e8b8]
/usr/lib/x86_64-linux-gnu/libMagickCore-6.Q16.so.2(ReadImage+0x198)[0x7f213d439a18]
/usr/lib/x86_64-linux-gnu/libMagickWand-6.Q16.so.2(MagickReadImage+0x6a)[0x7f213d90ba3a]
emacs[0x5e65fc]
emacs[0x5eed1d]
emacs[0x5ef1a0]
emacs[0x56cf26]
emacs[0x5a5ff8]
emacs[0x56ce93]
emacs[0x5a5ff8]
emacs[0x56ce93]
emacs[0x5a5ff8]
emacs[0x56ce93]
emacs[0x5a5ff8]
emacs[0x56ce93]
emacs[0x5a5ff8]
emacs[0x56ce93]
emacs[0x5a5ff8]
emacs[0x56ce93]
emacs[0x5a5ff8]
emacs[0x56ce93]
emacs[0x5a5ff8]
emacs[0x56ce93]
emacs[0x5a5ff8]
emacs[0x56ce93]
emacs[0x5a5ff8]
emacs[0x56ce93]
emacs[0x5a5ff8]
emacs[0x56ce93]
emacs[0x5a5ff8]
emacs[0x56ce93]
emacs[0x568c9d]
emacs[0x56cf26]
emacs[0x56eb24]
emacs[0x56904e]
...
[3] 7224 segmentation fault (core dumped) emacs -q ~/work/IIIT-H-Code/softwarefoundations/project
This is tagged as "not a bug" --- because
"if imagemagick crashes, there is no recourse".