7890yuiop

joined 1 year ago
[–] 7890yuiop@alien.top 1 points 11 months ago

A couple of simple config suggestions:

(winner-mode 1) ;; Get familiar with `winner-undo'.
(global-set-key (kbd "C-x !") 'delete-other-windows-vertically)

I get a lot of mileage out of those two.

Also consider adding bindings for these, to tell the following command where to display its buffer:

  • windmove-display-left
  • windmove-display-right
  • windmove-display-up
  • windmove-display-down
  • windmove-display-same-window

And the regular windmove commands are very convenient for moving between buffers.

The transpose-frame package available in MELPA is useful. Note that with only two windows, rotate-frame is "exchange the positions of the windows", and transpose-frame is "switch between vertical and horizontal split". I have those bound to C-c | and C-c \ respectively, and use them regularly.

[–] 7890yuiop@alien.top 1 points 11 months ago

You don't have to declare a new variable each time you want to remember an old value. You could, e.g., put a custom symbol property on the variable symbol with the old value (or list of old values) you wanted to store. Or maintain a single variable mapping all your variable symbols to their old values.

[–] 7890yuiop@alien.top 1 points 1 year ago

Ok. Mine doesn't, but I'll believe yours does. Why is that making it hard to for you to share it between machines?

[–] 7890yuiop@alien.top 1 points 1 year ago (2 children)

the configuration contains a lot of junk

What do you mean? What is the specific problem?

[–] 7890yuiop@alien.top 1 points 1 year ago

I don't know, but the initial denote release for Emacs was barely 16 months ago, so it would be fairly surprising if anyone had written support for another editor so quickly.

Maybe if you define a minimum set of features which would be adequate for collaboration purposes, you could ask in vim forums how you might go about implementing those.

[–] 7890yuiop@alien.top 1 points 1 year ago

You're matching the literal text :init|config|custom

Tip: Use M-x re-builder to test.

[–] 7890yuiop@alien.top 1 points 1 year ago

C-h f message to add to the *Messages* buffer (C-h e to jump to that).

[–] 7890yuiop@alien.top 1 points 1 year ago

I read reddit in Firefox and I make use of https://addons.mozilla.org/en-US/firefox/addon/edit-with-emacs1/ , but you can also just copy/paste between the markdown editor and emacs.

[–] 7890yuiop@alien.top 1 points 1 year ago

The display-buffer-reuse-mode-window action may be convenient for this use-case.

Many of your modes-of-interest will be derivatives of special-mode so you may (or may not) find that specifying that as a catch-all is particularly useful.

[–] 7890yuiop@alien.top 1 points 1 year ago (3 children)

Could you fix the formatting?

The only code block formatting method which works for all users of reddit is to switch the reddit editor to markdown mode* and indent the code by 4 spaces (you can use M-4 C-x C-i on a region followed by M-x untabify to achieve this in Emacs); and you need to use empty lines to separate the indented lines from the other text. Otherwise for lots of readers your message looks like this: https://old.reddit.com/r/emacs/comments/17etbx8/saveexcursion_wrong_type_argument/k685ohy/

Be sure to remove any different syntax intended for formatting (such as triple backticks) at the same time.

(*) Switching to the markdown editor may or may not still be necessary. At one time it prevented problems.

[–] 7890yuiop@alien.top 1 points 1 year ago (5 children)

M-x toggle-debug-on-error should get you a stack trace which will explain what's going on.

[–] 7890yuiop@alien.top 1 points 1 year ago

I think you'd probably write a custom command for this.

A normal way to do this in elisp is a simple while loop for your main search, and at every match you perform a second search, bounded by the desired limit, for your exclusion terms. Depending on whether or not the second search succeeds, add the original match to the results buffer.

You can leverage some of the occur machinery for presenting the results.

view more: ‹ prev next ›