Forgot to "reply to all". Sorry! Adding the mailing list now.
On 2022-04-10, 22:11 +0300, Protesilaos Stavrou <info@protesilaos.com> wrote:
> On 2022-04-10, 12:08 -0400, "Jeremy Friesen" <jeremy@jeremyfriesen.com> wrote:>>>> You mean to pulse without an active region, right?>>>> Yes.>>>> The function I scratched up is as follows:>>>> ```emacs-lisp>> (defun jf/pulse (parg)>> "Pulse the current line.>>>> If PARG (given as universal prefix), pulse between `point' and `mark'.">> (interactive "P")>> (if (car parg)>> (pulsar--pulse nil nil (point) (mark))>> (pulsar-pulse-line)))>> ```>> Good idea! Do you think we should use it with a prefix arg or perhaps> implement a do-what-I-mean behaviour? In the latter case, it would> pulse the point+mark if there is a mark, else pulse the line:>> (defun pulsar-pulse-point-mark-dwim ()> "Pulse between `point' and `mark'.> If no mark exists, use `pulsar-pulse-line'."> (interactive)> (if mark-ring> (pulsar--pulse nil nil (point) (mark))> (pulsar-pulse-line)))>>> In a way this is similar to `M-x exchange-mark-and-point` except that>> instead of making an active region (and changing mark and point) it>> pulses that non-active region. This gives me a quick reminder of>> where my mark is without jumping to the mark.>> I like it!>> By the way, have you assigned copyright to the FSF? If yes, you can> send a patch of any length. Otherwise your contribution has to be> limited to ~15 lines.
--
Protesilaos Stavrou
https://protesilaos.com
Re: Feature request: Pulse region between mark and point
> By the way, have you assigned copyright to the FSF? If yes, you can> send a patch of any length. Otherwise your contribution has to be> limited to ~15 lines.
For assigning copyright, I absolutely would like to and prefer to but am uncertain how to do so.
> Good idea! Do you think we should use it with a prefix arg or perhaps
> implement a do-what-I-mean behaviour? In the latter case, it would
For the dwim behavior, I am often leaving marks without fully thinking about them. So my preference is to not try to determine dwim but to default to line and allow for "over-loading" that method to do region. It's far more rare that I want the "pulse" the region.
On Sun, Apr 10, 2022, at 3:13 PM, Protesilaos Stavrou wrote:
> Forgot to "reply to all". Sorry! Adding the mailing list now.> > On 2022-04-10, 22:11 +0300, Protesilaos Stavrou <info@protesilaos.com> wrote:> > > On 2022-04-10, 12:08 -0400, "Jeremy Friesen" <jeremy@jeremyfriesen.com> wrote:> >> >>> You mean to pulse without an active region, right?> >>> >> Yes.> >>> >> The function I scratched up is as follows:> >>> >> ```emacs-lisp> >> (defun jf/pulse (parg)> >> "Pulse the current line.> >>> >> If PARG (given as universal prefix), pulse between `point' and `mark'."> >> (interactive "P")> >> (if (car parg)> >> (pulsar--pulse nil nil (point) (mark))> >> (pulsar-pulse-line)))> >> ```> >> > Good idea! Do you think we should use it with a prefix arg or perhaps> > implement a do-what-I-mean behaviour? In the latter case, it would> > pulse the point+mark if there is a mark, else pulse the line:> >> > (defun pulsar-pulse-point-mark-dwim ()> > "Pulse between `point' and `mark'.> > If no mark exists, use `pulsar-pulse-line'."> > (interactive)> > (if mark-ring> > (pulsar--pulse nil nil (point) (mark))> > (pulsar-pulse-line)))> >> >> In a way this is similar to `M-x exchange-mark-and-point` except that> >> instead of making an active region (and changing mark and point) it> >> pulses that non-active region. This gives me a quick reminder of> >> where my mark is without jumping to the mark.> >> > I like it!> >> > By the way, have you assigned copyright to the FSF? If yes, you can> > send a patch of any length. Otherwise your contribution has to be> > limited to ~15 lines.> > -- > Protesilaos Stavrou> https://protesilaos.com>
Sincerely,
Jeremy Friesen (he/him)
https://takeonrules.com
Re: Feature request: Pulse region between mark and point
On 2022-04-10, 16:33 -0400, "Jeremy Friesen" <jeremy@jeremyfriesen.com> wrote:
>> By the way, have you assigned copyright to the FSF? If yes, you can>> send a patch of any length. Otherwise your contribution has to be>> limited to ~15 lines.>> For assigning copyright, I absolutely would like to and prefer to but am uncertain how to do so.
Below is the form. Please fill in the remaining fields and send it to
the specified address. When I did it, I used the subject line
"Copyright assignment for Emacs". For our purposes, the program you
will be contributing to is Emacs. I also specified the file you have
edited. The FSF will follow up on your request with an email. The
process should take about a week to complete. Good luck!
Please email the following information to assign@gnu.org, and we
will send you the assignment form for your past and future changes.
Please use your full legal name (in ASCII characters) as the subject
line of the message.
REQUEST: SEND FORM FOR PAST AND FUTURE CHANGES
[What is the name of the program or package you're contributing to?]
GNU Emacs
[Did you copy any files or text written by someone else in these changes?
Even if that material is free software, we need to know about it.]
[Do you have an employer who might have a basis to claim to own
your changes? Do you attend a school which might make such a claim?]
[For the copyright registration, what country are you a citizen of?]
[What year were you born?]
[Please write your email address here.]
[Please write your postal address here.]
[Which files have you changed so far, and which new files have you written
so far?]
pulsar.el (from Emacs' official GNU ELPA archive)
> > Good idea! Do you think we should use it with a prefix arg or perhaps> > implement a do-what-I-mean behaviour? In the latter case, it would>> For the dwim behavior, I am often leaving marks without fully thinking> about them. So my preference is to not try to determine dwim but to> default to line and allow for "over-loading" that method to do region.> It's far more rare that I want the "pulse" the region.
I see. Then the 'pulsar-pulse-line' can be revised to accept an
'&optional arg'. Additionally, if the 'mark-ring' is empty (e.g. when
creating a new buffer), it will throw a 'user-error' about the absence
of a mark.
What do you think?
Since this patch will be small, you do not need to wait for the FSF
paperwork to be processed. Don't worry about updating the README.org: I
can do that and will also include your name in the "Acknowledgements"
section.
Thank you!
--
Protesilaos Stavrou
https://protesilaos.com