emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Max Nikulin <manikulin@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Keep the link if the command was cancelled
Date: Sun, 16 Jul 2023 08:46:09 +0000	[thread overview]
Message-ID: <87ttu4i6r2.fsf@localhost> (raw)
In-Reply-To: <u8m4ll$mjc$1@ciao.gmane.io>

Max Nikulin <manikulin@gmail.com> writes:

> On 03/07/2023 22:28, Ihor Radchenko wrote:
>> If necessary, removing stored links without inserting can be made as an
>> effect of negative prefix argument in `org-insert-link' or in
>> `org-insert-all-links'.
>
> I do not think it would be a noticeable improvement. It increases code 
> complexity, but `org-insert-link' + `undo' requires the same amount of 
> keystrokes.
>
> Maybe I just do not like prefix argument. Instead of triple C-u to keep 
> the link I would prefer to be able to activate it from the link prompt 
> (something similar to to M-s i switches for incremental search).
>
> It might be more reasonable to have some binding to cancel 
> `org-store-links' immediately after this command.

I feel like this direction is overcomplicating things.
What about trying to mimic some of the existing Emacs behaviours, like
kill ring.

What I have in mind is how M-w C-y M-y M-y ... works.
We may have a command to replace the last inserted link with previous
link in the org-stored-links when previous command was org-insert-link.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


  reply	other threads:[~2023-07-16  8:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-30 22:11 [PATCH] Keep the link if the command was cancelled Evgenii Klimov
2023-07-03 12:48 ` Ihor Radchenko
2023-07-03 15:08   ` Max Nikulin
2023-07-03 15:11     ` Ihor Radchenko
2023-07-03 15:15       ` Max Nikulin
2023-07-03 15:28         ` Ihor Radchenko
2023-07-03 16:04           ` Evgenii Klimov
2023-07-03 16:20             ` Ihor Radchenko
2023-07-12 12:00           ` Max Nikulin
2023-07-16  8:46             ` Ihor Radchenko [this message]
2023-07-03 15:53   ` Evgenii Klimov
2023-07-03 23:43   ` [PATCH v2] " Evgenii Klimov
2023-07-04 10:48     ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ttu4i6r2.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=manikulin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).