Re: [BUG] [PATCH] Add yank-media and DND handler [9.6.7 (9.6.7-g6eb773 @ /home/viz/lib/emacs/straight/build/org/)]

2023-10-26 Thread Po Lu
I have now installed an interface to this end into Emacs 30.  The
pertinent documentation is under the ``Drag and Drop'' node in the Lisp
reference manual.



Re: [BUG] [PATCH] Add yank-media and DND handler [9.6.7 (9.6.7-g6eb773 @ /home/viz/lib/emacs/straight/build/org/)]

2023-10-20 Thread Po Lu
Ihor Radchenko  writes:

> Instead of passing dnd data as is from the OS, Emacs can convert it into
> a standardized format, independent of the OS. Then,
> `dnd-protocol-alist' can allow handlers for such standardized dnd type.
>
> In our scenario, the dnd data will be dropped file list. Emacs should
> internally detect such file lists for GNU/Linux / Windows / other
> platforms with dnd support and then convert them into the same format.
> Then, dnd users can add (file-list . FUNCTION) into `dnd-protocol-alist'
> and the FUNCTION will be passed with the converted data that will always
> be the same for all the OSes.
>
> Does it make sense?

Yes, that is scrutable.  I will write this.



Re: [BUG] [PATCH] Add yank-media and DND handler [9.6.7 (9.6.7-g6eb773 @ /home/viz/lib/emacs/straight/build/org/)]

2023-10-20 Thread Po Lu
Ihor Radchenko  writes:

> Because nobody added you manually to the CC in this branch of the
> discussion. You would only be automatically in the CC in the replies to
> your message (87bkdccihf@yahoo.com), but not the earlier branches.

The follow-up I mentioned lists 87bkdccihf@yahoo.com within
In-Reply-To.

> Do you mean something like a standardized entry in `dnd-protocol-alist'
> that is independent on OS? Instead of (REGEXP . FUNCTION),
> (SYMBOL . FUNCTION) with SYMBOL = 'file-list or so.

I'm sorry, but I don't understand what you're proposing.  Would you
please couch it differently?



Re: [BUG] [PATCH] Add yank-media and DND handler [9.6.7 (9.6.7-g6eb773 @ /home/viz/lib/emacs/straight/build/org/)]

2023-10-19 Thread Po Lu
Ihor Radchenko  writes:

> Ideally, we should ask Emacs devs to provide OS-independent interface
> for uri-list handling. I am not a big fan of adding special OS handling
> to Org mode, unless absolutely necessary.

Inasmuch as I had previously interposed myself into this conversation,
it should have been clear that its subject is of interest to me.  So
herein lies the question: why was I removed from its carbon copy list,
from nothing less than a follow-up to my reply itself?  It is common
courtesy for some advance notice to be given to a participant who is
about to be subject to such treatment; and was I not, I would have be
made aware of your plight earlier -- but I digress.

How about enabling programs to receive drops of multiple files instead?
Since not all window systems supply drops of multiple files in the form
of text/uri-lists, I account that a more robust and versatile interface.



Re: [BUG] [PATCH] Add yank-media and DND handler [9.6.7 (9.6.7-g6eb773 @ /home/viz/lib/emacs/straight/build/org/)]

2023-10-06 Thread Po Lu
Visuwesh  writes:


> Attached patch adds yank-media and DND handler to attach files in the
> clipboard and dropped onto an Emacs frame respectively.
>
> The yank-media handler for images is well tested, I use it frequently
> however, rest of the stuff aren't really tested since I don't use a GUI
> file manager.  I tested enough to make sure the logic is right so I
> don't know if they are ergonomic enough.  As noted in the comments,
> files copied/cut to clipboard doesn't seem to have a solid spec and most
> of the code was written with pcmanfm as the file manager, testing with
> other file managers are highly welcome.
>
> Better names for the newly added defcustoms are highly welcome since I
> don't find them to be clear enough from their name.
>
> The patch compiles cleanly without warnings but I haven't tested _this_
> patch yet, I have these functions in my init.el and have tested those.

Thanks.  You have only implemented handlers for one of the two protocols
employed by X programs to perform drag-and-drop.

Lisp code receiving dropped files must also implement an XDS handler,
absent which files dropped from web browsers such as Firefox will merely
be saved into the default-directory.  XDS is distinct from the regular
drag-and-drop system in that Emacs is enjoined by the drag source to
provide a file name under which the file should be saved, whereas
regular drag-and-drop transpires once it has already been saved by the
drag source.  Refer to (elisp)Drag and Drop.



Re: Missing changes

2023-09-06 Thread Po Lu
Kyle Meyer  writes:

> Those commits are on Emacs's master branch.  We're up to date with the
> emacs-29 branch, but I've yet to port any of the Emacs's master-specific
> Org changes to Org's main branch.  I started working on it last weekend,
> so it should happen soon-ish.  In any case, all the currently unported
> master-specific changes would of course be ported to Org's main before
> we start syncing that to Emacs's master.
>
> You can find all of these commits listed at
>
>   https://git.kyleam.com/orgmode-backport-notes/tree/orgmode-backports.org
>
> It's not in your list above, but there's also your 9082b4e6ee2 (Make
> binaries distributed with Emacs work on Android, 2023-01-24).  That, by
> the way, will need to be adjusted to stay compatible with previous Emacs
> versions that don't have a ctags-program-name variable defined.

OK, thanks.  As an aside, which versions of Emacs does Org presently
support?



Missing changes

2023-09-06 Thread Po Lu
These changes made to lisp/org within the Emacs repository are absent
from orgmode.git:

* | 73b24a41412..: Po Lu 2023-08-23 Make org-mouse compatible with touch screen 
event emulation
* | 4f714dc0813..: Po Lu 2023-08-20 Support desktop notifications on Android
* | 5856ea5e4e8..: Po Lu 2023-08-17 Introduce support for Desktop Notifications 
on Haiku

Would anyone care to see to it that they are transferred into the Org
repository?