GNU bug report logs -
#45318
28.0.50; mark-paragraph
Previous Next
Reported by: rms <at> gnu.org
Date: Sat, 19 Dec 2020 05:13:02 UTC
Severity: wishlist
Merged with 18847
Found in versions 24.4, 28.0.50
Full log
View this message in rfc822 format
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> Richard Stallman <rms <at> gnu.org> writes:
>
>> Create a buffer in Fundamental mode, insert the text
>>
>> this is
>> a test
>>
>> with no newline at the end, put point at the end, and type M-h.
>>
>> It does not set the mark.
>
> It's this bit:
>
> ;; don't activate the mark when at eob
> ((and (eobp) (> numeric-arg 0)))
I'm sorry for the mistake. Here's the correction of M-h for above
bug report:
modified lisp/textmodes/paragraphs.el
@@ -401,8 +401,9 @@ mark-paragraph
(goto-char (mark))
(forward-paragraph arg)
(point))))
- ;; don't activate the mark when at eob
- ((and (eobp) (> numeric-arg 0)))
+ ;; don't activate the mark when at eob in an empty paragraph
+ ;; with a positive ARG
+ ((and (eobp) (bolp) (> numeric-arg 0)))
(t
(unless (save-excursion
(forward-line 0)
But I would like to extend this solution for the following case: (and
(eobp) (bolp)). The current implementation of M-h is doing nothing (for
positive arguments) because - formally - the cursor sits in an "empty"
paragraph and there are no further paragraphs below.
But in this situation applying M-h clearly shows the user's intention to
mark the paragraph above the cursor (and possibly further ones above
when typing M-hhhh).
What is your opinion?
Thank you
> commit eb090f65ceb0ae8a90829e911694348583135ba5
> Now added to the Cc's.
Thank you Lars
Dieter
--
Best wishes
H. Dieter Wilhelm
Zwingenberg, Germany
This bug report was last modified 3 years and 242 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.