[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Experimentally unbind M-o on the trunk
From: |
andrés ramírez |
Subject: |
Re: Experimentally unbind M-o on the trunk |
Date: |
Wed, 10 Feb 2021 18:02:49 +0000 |
Hi. Guys.
>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:
Eli> I doubt it. Because the keybindings which are being discussed as
candidates for usurpation
Eli> are those most newbies don't know about and many never will.
Indeed. I have never will.
I spent 99% of my emacs time on the tty. I have never used any of the
commands on the M-o set. I have just tried:
--8<---------------cut here---------------start------------->8---
1 center-line
2 center paragraph
--8<---------------cut here---------------end--------------->8---
On my opinion those commands seem to be useful for quotation or for
writing prose (I could be wrong).
But on my personal case when I wan to quote something I use:
--8<---------------cut here---------------start------------->8---
1 mark the region
2 C-u shell-command-on-region and feeding at the prompt with "boxes -d boxquote
-i box"
--8<---------------cut here---------------end--------------->8---
see the result below (on this particular case fill-paragraph was applied
before invoking shell-command-on-region):
,---- [ ]
| Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
| tempor incididunt ut labore et dolore magna aliqua. Ut enimad minim
| veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
| commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
| velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
| occaecat cupidatat non proident, sunt in culpa qui officia deserunt
| mollit anim id est laborum.
`----
That's the reason I have never used M-o all this long time. But YMMV.
On the contrary. What I have used when checking email from my phone
(using the phone as a mobile terminal 800x480) and for very long subjects is the
function "horizontal-recenter-derived" (which was based on
gnus-horizontal-recenter) .
I have an alias:
(defalias 'hr 'horizontal-recenter-derived)
--8<---------------cut here---------------start------------->8---
(defun horizontal-recenter-derived ()
"Recenter the current buffer horizontally. based on gnus-horizontal-recenter"
(interactive)
(if (< (current-column) (/ (window-width) 2))
(set-window-hscroll (get-buffer-window (current-buffer) t) 0)
(let* ((orig (point))
(end (window-end (get-buffer-window (current-buffer) t)))
(max 0))
(when end
;; Find the longest line currently displayed in the window.
(goto-char (window-start))
(while (and (not (eobp))
(< (point) end))
(end-of-line)
(setq max (max max (current-column)))
(forward-line 1))
(goto-char orig)
;; Scroll horizontally to center (sort of) the point.
(if (> max (window-width))
(set-window-hscroll
(get-buffer-window (current-buffer) t)
(min (- (current-column) (/ (window-width) 3))
(+ 2 (- max (window-width)))))
(set-window-hscroll (get-buffer-window (current-buffer) t) 0))
max))))
--8<---------------cut here---------------end--------------->8---
Hope it helps. Best Regards
ps: probably we the tty-frame-guys have a lot of bindings that just apply for
the X-frames that we never use.
- Re: Experimentally unbind M-o on the trunk, (continued)
- Re: Experimentally unbind M-o on the trunk, Alfred M. Szmidt, 2021/02/10
- Re: Experimentally unbind M-o on the trunk, Tassilo Horn, 2021/02/10
- Re: Experimentally unbind M-o on the trunk, Jean Louis, 2021/02/10
- Re: Experimentally unbind M-o on the trunk, Alfred M. Szmidt, 2021/02/10
- Re: Experimentally unbind M-o on the trunk, Eli Zaretskii, 2021/02/10
- Re: Experimentally unbind M-o on the trunk, Alfred M. Szmidt, 2021/02/10
- Re: Experimentally unbind M-o on the trunk, Eli Zaretskii, 2021/02/10
- Re: Experimentally unbind M-o on the trunk, Matt Armstrong, 2021/02/10
- Re: Experimentally unbind M-o on the trunk, Alan Mackenzie, 2021/02/10
- Re: Experimentally unbind M-o on the trunk, Eli Zaretskii, 2021/02/10
- Re: Experimentally unbind M-o on the trunk,
andrés ramírez <=
- RE: [External] : Re: Experimentally unbind M-o on the trunk, Drew Adams, 2021/02/10
- Re: Experimentally unbind M-o on the trunk, Jean Louis, 2021/02/11
- Re: Experimentally unbind M-o on the trunk, Matt Armstrong, 2021/02/10
- Re: Experimentally unbind M-o on the trunk, Lars Ingebrigtsen, 2021/02/10
- Smarter M-x that filters on major-mode, Stefan Kangas, 2021/02/10
- Re: Smarter M-x that filters on major-mode, Stefan Monnier, 2021/02/10
- Re: Smarter M-x that filters on major-mode, Yuan Fu, 2021/02/11
- RE: [External] : Re: Smarter M-x that filters on major-mode, Drew Adams, 2021/02/11
- RE: [External] : Re: Smarter M-x that filters on major-mode, Drew Adams, 2021/02/11
- Re: Smarter M-x that filters on major-mode, Lars Ingebrigtsen, 2021/02/11