unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#46167: 28.0.50; [Feature Request] Handle goto-map digit as goto-line
@ 2021-01-29  3:16 Michael Welsh Duggan
  2021-01-29  5:34 ` Lars Ingebrigtsen
  2021-01-29  8:47 ` Juri Linkov
  0 siblings, 2 replies; 4+ messages in thread
From: Michael Welsh Duggan @ 2021-01-29  3:16 UTC (permalink / raw)
  To: 46167

I recommend that the ten decimal digits be bound in `goto-map' to a
function that calls `goto-line', bringing up a prompt with the given
digit as the default value.  For example:

`M-g 4' should result in the following prompt:

  Goto line: 4!

where ! represents the location of the point.  I've implemented this in
my init file, but as I have had difficulty getting a legal disclaimer
from my employer in the past (they want to have every single change go
to the lawyers separately), I'm holding back on sending any
implementation.

-- 
Michael Welsh Duggan
(md5i@md5i.com)





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#46167: 28.0.50; [Feature Request] Handle goto-map digit as goto-line
  2021-01-29  3:16 bug#46167: 28.0.50; [Feature Request] Handle goto-map digit as goto-line Michael Welsh Duggan
@ 2021-01-29  5:34 ` Lars Ingebrigtsen
  2021-01-29  8:47 ` Juri Linkov
  1 sibling, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2021-01-29  5:34 UTC (permalink / raw)
  To: Michael Welsh Duggan; +Cc: 46167

Michael Welsh Duggan <mwd@md5i.com> writes:

> I recommend that the ten decimal digits be bound in `goto-map' to a
> function that calls `goto-line', bringing up a prompt with the given
> digit as the default value.  For example:
>
> `M-g 4' should result in the following prompt:
>
>   Goto line: 4!
>
> where ! represents the location of the point.

We've recently had a long discussion about `goto-line' vs
`goto-line-relative', and some people prefer the one and some people the
other.  `M-g 4' (etc) would have to choose one or the other.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#46167: 28.0.50; [Feature Request] Handle goto-map digit as goto-line
  2021-01-29  3:16 bug#46167: 28.0.50; [Feature Request] Handle goto-map digit as goto-line Michael Welsh Duggan
  2021-01-29  5:34 ` Lars Ingebrigtsen
@ 2021-01-29  8:47 ` Juri Linkov
  2021-02-01  9:24   ` Lars Ingebrigtsen
  1 sibling, 1 reply; 4+ messages in thread
From: Juri Linkov @ 2021-01-29  8:47 UTC (permalink / raw)
  To: Michael Welsh Duggan; +Cc: 46167

> I recommend that the ten decimal digits be bound in `goto-map' to a
> function that calls `goto-line', bringing up a prompt with the given
> digit as the default value.  For example:
>
> `M-g 4' should result in the following prompt:
>
>   Goto line: 4!
>
> where ! represents the location of the point.  I've implemented this in
> my init file, but as I have had difficulty getting a legal disclaimer
> from my employer in the past (they want to have every single change go
> to the lawyers separately), I'm holding back on sending any
> implementation.

Fortunately, it's already easy to go to e.g. line 42 by typing just

  42gg

while holding the Meta key, i.e. M-4 M-2 M-g M-g.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#46167: 28.0.50; [Feature Request] Handle goto-map digit as goto-line
  2021-01-29  8:47 ` Juri Linkov
@ 2021-02-01  9:24   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2021-02-01  9:24 UTC (permalink / raw)
  To: Juri Linkov; +Cc: Michael Welsh Duggan, 46167

Juri Linkov <juri@linkov.net> writes:

> Fortunately, it's already easy to go to e.g. line 42 by typing just
>
>   42gg
>
> while holding the Meta key, i.e. M-4 M-2 M-g M-g.

Yeah, I guess there's no reason to add yet another way to enter the line
number.  And this is a more general way, because it also works for
`goto-line-relative', which some people prefer.

So I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-02-01  9:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-29  3:16 bug#46167: 28.0.50; [Feature Request] Handle goto-map digit as goto-line Michael Welsh Duggan
2021-01-29  5:34 ` Lars Ingebrigtsen
2021-01-29  8:47 ` Juri Linkov
2021-02-01  9:24   ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).