unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: pinmacs@cas.cat, rpluim@gmail.com, 75116@debbugs.gnu.org,
	visuweshm@gmail.com
Subject: bug#75116: [PATCH] Make 'yank-media' autoselect the best media type
Date: Mon, 06 Jan 2025 19:05:20 +0000	[thread overview]
Message-ID: <8734hvhifj.fsf@localhost> (raw)
In-Reply-To: <868qrn6alg.fsf@gnu.org>

Eli Zaretskii <eliz@gnu.org> writes:

>> >>>     User asks to autoselect:
>> >>>       1. autoselect-function (a-s-f) returns one media type: we yank it.
>> >>
>> >> Yes.
>> >>
>> >>>       2. a-s-f returns multiple media types: we ask the user which one
>> >>>          to yank.
>> >>
>> >> No, we use the first one.
> ...
> That's what I mean by "ask": use the default behavior of the command.
>
> Conceptually, it's the same as the paste operation in other
> applications: by default, the application decides which of the formats
> to use, and if the user wants to choose, he/she needs to pop up a menu
> of available formats in some way and select from there.

I see the logic.

I still find returning a list of mimetypes useful though - if user wants
to implement an additional filter on top of a-s-f provided by major
mode, having a list of mimetypes as input is more flexible.

But we need to document that the final choice will be taken as the first
element from what a-s-f (possibly adviced) returns.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
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:[~2025-01-06 19:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-26 12:27 bug#75116: [PATCH] Make 'yank-media' autoselect the best media type Visuwesh
2024-12-26 15:49 ` Eli Zaretskii
2024-12-27  8:58   ` Visuwesh
2024-12-28 12:24     ` Eli Zaretskii
2025-01-06  4:37       ` Visuwesh
2025-01-06 14:10         ` Eli Zaretskii
2025-01-06 18:33         ` Ihor Radchenko
2025-01-06 18:50           ` Eli Zaretskii
2025-01-06 19:05             ` Ihor Radchenko [this message]
2025-01-06 19:15               ` Eli Zaretskii

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.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=8734hvhifj.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=75116@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=pinmacs@cas.cat \
    --cc=rpluim@gmail.com \
    --cc=visuweshm@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.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).