unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#17603: Emacs enhancement request
@ 2014-05-26 19:44 Danny Nguyen
  2014-05-28  1:10 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Danny Nguyen @ 2014-05-26 19:44 UTC (permalink / raw)
  To: 17603

[-- Attachment #1: Type: text/plain, Size: 1110 bytes --]

Hi Emacs support team,

I am an avid user of GNU Emacs and I love using Tex mode to write my
documents. However one of the features that I find lacking in Emacs is
*auto-complete*. By that I don't mean the common feature found in other IDE
for programmers but the following. Suppose I already typed up a formula

*\int_{\mathbb{R}} e^{2 \pi i x^2} dx = 1*

And after paragraph or so I want to repeat the same thing all over again
(and maybe modify *x* to *y*). Of course I can search+save region+yank but
that's too manual. What I wish to have is if I typed *\int* and then
invoked the *auto-complete *command, Emacs would move the point to the
previous instance of *\int* and allow me to mark a region around it. After
marking I could hit *Enter* and Emacs would copy the highlighted part and
put it to the partially completed *\int* below. I also want to be able to
cycle through previous instances of *\int* with the up and down arrow keys,
much like using *isearch*.

This could be also useful outside the scope of Tex mode. I realize this
sounds more like a minor mode rather than a macro.

Thanks,
Danny

[-- Attachment #2: Type: text/html, Size: 2001 bytes --]

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

* bug#17603: Emacs enhancement request
  2014-05-26 19:44 bug#17603: Emacs enhancement request Danny Nguyen
@ 2014-05-28  1:10 ` Stefan Monnier
  2021-07-14 15:06   ` bug#17603: completion of previous input Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2014-05-28  1:10 UTC (permalink / raw)
  To: Danny Nguyen; +Cc: 17603

> I am an avid user of GNU Emacs and I love using Tex mode to write my
> documents. However one of the features that I find lacking in Emacs is
> *auto-complete*. By that I don't mean the common feature found in other IDE
> for programmers but the following. Suppose I already typed up a formula

> *\int_{\mathbb{R}} e^{2 \pi i x^2} dx = 1*

> And after paragraph or so I want to repeat the same thing all over again
> (and maybe modify *x* to *y*). Of course I can search+save region+yank but
> that's too manual. What I wish to have is if I typed *\int* and then
> invoked the *auto-complete *command, Emacs would move the point to the
> previous instance of *\int* and allow me to mark a region around it. After
> marking I could hit *Enter* and Emacs would copy the highlighted part and
> put it to the partially completed *\int* below. I also want to be able to
> cycle through previous instances of *\int* with the up and down arrow keys,
> much like using *isearch*.

What you describe (including letting you mark the region around the
previous match) sounds sufficiently complex (UI-wise) that using

  C-SPC C-r *\int ..copy text.. C-u C-SPC C-y

wouldn't be noticeably more complex.
So I think it only makes sense to provide such a feature if the choice
of the amount to copy can be made somewhat automatic.

Maybe hippie-expand's try-expand-line would work for you?


        Stefan





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

* bug#17603: completion of previous input
  2014-05-28  1:10 ` Stefan Monnier
@ 2021-07-14 15:06   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 3+ messages in thread
From: Lars Ingebrigtsen @ 2021-07-14 15:06 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Danny Nguyen, 17603

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> What you describe (including letting you mark the region around the
> previous match) sounds sufficiently complex (UI-wise) that using
>
>   C-SPC C-r *\int ..copy text.. C-u C-SPC C-y
>
> wouldn't be noticeably more complex.
> So I think it only makes sense to provide such a feature if the choice
> of the amount to copy can be made somewhat automatic.
>
> Maybe hippie-expand's try-expand-line would work for you?

Emacs (now) has a number of different completion libraries and
frameworks, so I don't think there's anything specific to be done in
this bug report, and I'm closing it.

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





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

end of thread, other threads:[~2021-07-14 15:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-26 19:44 bug#17603: Emacs enhancement request Danny Nguyen
2014-05-28  1:10 ` Stefan Monnier
2021-07-14 15:06   ` bug#17603: completion of previous input 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).