Bastien Guerry writes:
> Ihor Radchenko writes:
>
>> Before I proceed with installing it; Bastien, may you please confirm
>> Visuwesh's copyright assignment status?
>
> Confirmed and added to Worg. Thanks Visuwesh for contributing!
Thanks for checking!
Applied, onto main.
https://git.savannah.g
Ihor Radchenko writes:
> Before I proceed with installing it; Bastien, may you please confirm
> Visuwesh's copyright assignment status?
Confirmed and added to Worg. Thanks Visuwesh for contributing!
--
Bastien Guerry
Visuwesh writes:
>> Visuwesh, do you want to update your patch accordingly?
>
> I have now adjusted the patch to insert a space between links when the
> Emacs version in <30, and when more than one file is dropped.
Thanks!
I have no comments on the patch.
Before I proceed with installing it; Ba
[ஞாயிறு நவம்பர் 05, 2023] Ihor Radchenko wrote:
> Po Lu writes:
>
>> 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.
>
> Thanks!
>
> [...]
>
> Visuwesh, do you want to update your pat
[ஞாயிறு நவம்பர் 05, 2023] Ihor Radchenko wrote:
> Po Lu writes:
>
>> 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.
> [...]
> Visuwesh, do you want to update your patch accordingly?
Po Lu writes:
> 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.
Thanks!
AFAIU, the relevant paragraph is
@cindex dnd-multiple-handler, a symbol property
If a handler function
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.
[திங்கள் அக்டோபர் 23, 2023] Ihor Radchenko wrote:
>>> Also, we might want to add a subsection describing the new customization to
>>> 17 Miscellaneous section of the manual. Otherwise, users might have
>>> difficulties discovering relevant settings to customize dnd and yank
>>> behavior.
>>
>> I h
Visuwesh writes:
>> Is there any particular reason why you insert a newline after the image
>> link?
>
> I think this can stay here until Po Lu writes the platform-agnostic code
> that you requested further down this thread?
Sure.
>> Also, we might want to add a subsection describing the new cu
[திங்கள் அக்டோபர் 09, 2023] Ihor Radchenko wrote:
> Thanks!
>
>> +(defun org--dnd-attach-file (url action)
>> ...
>> +(insert
>> + (org-link-make-string
>> + (concat (if separatep
>> + "file:"
>> +"attachment:")
>> + (if separatep
>> +
[வெள்ளி அக்டோபர் 20, 2023] Ihor Radchenko wrote:
> Po Lu 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
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 shou
Po Lu 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 with
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 w
Po Lu writes:
> 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 c
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 ha
Visuwesh writes:
>>> Is there any particular reason why you insert a newline after the image
>>> link?
>>
>> It is for when you drop multiple files onto a frame. AFAIU/AFAICT
>> there's no way to know beforehand if multiple files will be dropped or
>> not. I will look into it in bit more detail
[திங்கள் அக்டோபர் 09, 2023] Visuwesh wrote:
> [திங்கள் அக்டோபர் 09, 2023] Ihor Radchenko wrote:
>
>> Thanks!
>>
>>> +(defun org--dnd-attach-file (url action)
>>> ...
>>> +(insert
>>> + (org-link-make-string
>>> + (concat (if separatep
>>> + "file:"
>>> +
Visuwesh 于2023年10月11日周三 23:36写道:
> >> + (caddr (read-multiple-choice
> >> + "What to do with dropped file?"
> >> + '((?a "attach" attach)
> >> + (?o "open" open)
> >> + (?f "insert file: link" file-link
> >
> > The dialog box is shown in the center of frame and I find it a little
> > inconven
[புதன் அக்டோபர் 11, 2023] Liu Hui wrote:
> Hi,
>
> Thanks for your work. I have two minor suggestions about the patch.
>
>> + (`file-link
>> + (let ((filename (dnd-get-local-file-name url)))
>> + (insert (org-link-make-string (concat "file:" filename
>
> I think it is better to abbreviate
Hi,
Thanks for your work. I have two minor suggestions about the patch.
> + (`file-link
> + (let ((filename (dnd-get-local-file-name url)))
> + (insert (org-link-make-string (concat "file:" filename
I think it is better to abbreviate the file name for file-link, so it
would be consistent
[திங்கள் அக்டோபர் 09, 2023] Ihor Radchenko wrote:
> Thanks!
>
>> +(defun org--dnd-attach-file (url action)
>> ...
>> +(insert
>> + (org-link-make-string
>> + (concat (if separatep
>> + "file:"
>> +"attachment:")
>> + (if separatep
>> +
Thanks!
> +(defun org--dnd-attach-file (url action)
> ...
> +(insert
> + (org-link-make-string
> + (concat (if separatep
> + "file:"
> +"attachment:")
> + (if separatep
> + (expand-file-name (file-name-nondirectory filenam
[ஞாயிறு அக்டோபர் 08, 2023] Ihor Radchenko wrote:
> Visuwesh writes:
>
>> This was far easier than I initially thought. Patch attached.
>
> Thanks!
> I tried to install the patch and I have two more comments.
>
>> +(defun org-yank-image-autogen-filename ()
>> + "Autogenerate filename for image i
Visuwesh writes:
> This was far easier than I initially thought. Patch attached.
Thanks!
I tried to install the patch and I have two more comments.
> +(defun org-yank-image-autogen-filename ()
> + "Autogenerate filename for image in clipboard."
> + (format-time-string "clipboard-%Y-%m-%d-%H:
[சனி அக்டோபர் 07, 2023] Visuwesh wrote:
> [சனி அக்டோபர் 07, 2023] Ihor Radchenko wrote:
>
>> Visuwesh writes:
>>
>>> Attached patch considers your review and also another defcustom to tell
>>> how to generate the filename which by default autogenerates a filename
>>> based on current time.
>>
>>
Visuwesh writes:
> What do you think about adding a defcustom as requested by Liu Hui in
> https://yhetil.org/orgmode/caoqtw-p6_w3heepjftkcfey2rpfgjfouhwmseoe2ajnpoi+...@mail.gmail.com/
Looks reasonable. I have no objections.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more abou
[சனி அக்டோபர் 07, 2023] Ihor Radchenko wrote:
> Visuwesh writes:
>
>> Attached patch considers your review and also another defcustom to tell
>> how to generate the filename which by default autogenerates a filename
>> based on current time.
>
> Thanks!
> I still disagree about :safe, but I can c
Visuwesh writes:
> Attached patch considers your review and also another defcustom to tell
> how to generate the filename which by default autogenerates a filename
> based on current time.
Thanks!
I still disagree about :safe, but I can change it myself to something
more restrictive like :safe (
Max Nikulin writes:
> ... Current action is to open text files in the
> widow under cursor and it is what users may expect.
This is not always true. For example, dropping to dired buffers will
copy to the opened fired directory. Dropping to message buffers will add
an attachment to the email be
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
>
Visuwesh 于2023年10月1日周日 22:28写道:
> Do you think asking during the time of drop
> would be a viable option too? I'm thinking of adding the defcustom
> org-dnd-default-method with options such as
>
> . attach -- as implemented here
> . open -- open file
> . file-link -- insert file lin
[வெள்ளி செப்டம்பர் 29, 2023] Liu Hui wrote:
> Hi,
>
> 在 2023/9/27 16:29, Visuwesh 写道:
>
>> +*** Files and images can be attached by dropping onto Emacs
>> +
>> +Attachment method other than ~org-attach-method~ for dropped files can
>> +be specified using ~org-dnd-default-attach-method~.
>
>> +(def
Hi,
在 2023/9/27 16:29, Visuwesh 写道:
> +*** Files and images can be attached by dropping onto Emacs
> +
> +Attachment method other than ~org-attach-method~ for dropped files can
> +be specified using ~org-dnd-default-attach-method~.
> +(defcustom org-dnd-default-attach-method nil
> + "Default at
On 27/09/2023 15:29, Visuwesh wrote:
Ihor Radchenko wrote:
We can just say :safe nil (omit the keyword). Then, users will be >> prompted and can decide which directories are truly safe for them.>
That would be quite annoying IMO. I say we let the user shoot>
themselves in the foot.
The patch
[செவ்வாய் செப்டம்பர் 26, 2023] Max Nikulin wrote:
> On 25/09/2023 20:14, Visuwesh wrote:
>> + (setq-local dnd-protocol-alist
>> + (cons '("^file:///" . org--dnd-local-file-handler)
>> +dnd-protocol-alist))
>
> Does it mean that `org--dnd-local-file-handler' is unc
[செவ்வாய் செப்டம்பர் 26, 2023] Ihor Radchenko wrote:
> Visuwesh writes:
>
>>> Please, use `make-temp-file' to create files in the temporary
>>> directory that may be world writable. Predictable file names there are
>>> undesired from security point of view.
>>
>> What harm does it cause?
>
> /tmp
On 25/09/2023 20:14, Visuwesh wrote:
+ (setq-local dnd-protocol-alist
+ (cons '("^file:///" . org--dnd-local-file-handler)
+dnd-protocol-alist))
Does it mean that `org--dnd-local-file-handler' is unconditionally
called for Org buffers? Current action is to ope
Visuwesh writes:
>> Please, use `make-temp-file' to create files in the temporary
>> directory that may be world writable. Predictable file names there are
>> undesired from security point of view.
>
> What harm does it cause?
/tmp directory can be written by any program and the file, while kept
[ Please keep me in the CC as I don't follow the list. ]
[ஞாயிறு செப்டம்பர் 24, 2023] Max Nikulin wrote:
> On 23/09/2023 17:28, Ihor Radchenko wrote:
>> Visuwesh writes:
>>
>>> + (let* ((ext (symbol-name (mailcap-mime-type-to-extension mimetype)))
>>> + (iname (read-string "Insert file
[சனி செப்டம்பர் 23, 2023] Visuwesh wrote:
>>> +(defun org--image-yank-media-handler (mimetype data)
>>> + "Save image DATA of mime-type MIMETYPE and insert link at point.
>>> +It is saved as per `org-media-image-save-type'. The name for the
>>> +image is prompted and the extension is automatical
On 23/09/2023 17:28, Ihor Radchenko wrote:
Visuwesh writes:
+ (let* ((ext (symbol-name (mailcap-mime-type-to-extension mimetype)))
+ (iname (read-string "Insert filename for image: "))
It would be nice if we auto-generate the file name here by default. It
is what I would expect from
On 22/09/2023 21:52, Visuwesh wrote:
Attached patch adds yank-media and DND handler to attach files in the
clipboard and dropped onto an Emacs frame respectively.
Please, use `make-temp-file' to create files in the temporary directory
that may be world writable. Predictable file names there ar
On 23/09/2023 00:29, Visuwesh wrote:
[வெள்ளி செப்டம்பர் 22, 2023] Max Nikulin wrote:
When a file is dropped into an Org buffer I would consider inserting a
link or storing it in addition to attachment options.
The current code already inserts a link to the dropped files.
I mean just insert
[சனி செப்டம்பர் 23, 2023] Ihor Radchenko wrote:
>> +*** Images and files in clipboard can be attached
>> +
>> +Org can now attach images in clipboard and files copied/cut to the
>> +clipboard from file managers using the ~yank-media~ command which also
>> +inserts a link to the attached file.
>> +
Visuwesh writes:
> 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 for the patch!
See my comments below.
> +*** Images and files in clipboard can be attached
> +
> +Org can now attach images
[வெள்ளி செப்டம்பர் 22, 2023] Max Nikulin wrote:
> On 22/09/2023 21:52, Visuwesh wrote:
>> Attached patch adds yank-media and DND handler to attach files in the
>> clipboard and dropped onto an Emacs frame respectively.
>
> Thank you for your work in this area.
>
> I am not an active DND user, I am
On 22/09/2023 21:52, Visuwesh wrote:
Attached patch adds yank-media and DND handler to attach files in the
clipboard and dropped onto an Emacs frame respectively.
Thank you for your work in this area.
I am not an active DND user, I am just curious what cases are supported:
- X11
- Wayland
- S
48 matches
Mail list logo