emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lisp/term/ns-win.el modification


From: Anders Lindgren
Subject: Re: lisp/term/ns-win.el modification
Date: Thu, 27 Apr 2017 11:02:15 +0200

Hi Jean-Christophe!

Thanks for submitting the patch!

First a bit of formalia:

* All authors of a patch much assign the copyright to FSF in order for it to be included in Emacs. This mean that you can't include a random piece of code from the internet (in this case the `trim-spaces' function).

* You must follow the coding standards. First, every function should be prefixed with a module name, normally this corresponds the name of the name of the file they are defined in. However, in this case, ns-win, use "ns-". Secondly, there are hanging parentheses in the code, indentation isn't correct, and there are lines longer than 79 characters.

Comments on the patch itself:

* I'm not exactly sure which problem you were trying to solve. I just tested to select a number of files in the Finder on macOS (10.10.5) and dragged then to Emacs (25.1), and they open just fine. Please include a description in the source code for the situation your code handle.

* I miss a description, or link to a description, of the format of `ns-input-spi-argument'. Without it it's hard to tell what the code is trying to do, and whether or not it does it correctly.

* The code will be smaller, and more easy to read, if you would use `dolist' instead of `while'. Also, if you do this change, I see no need to break out the code into a separate function, as it will only be two or three lines long.

* File names in macOS may start or end with spaces. It's probably not a good idea to trim spaces. (Again, it's hard to tell without a description of the format.)

Again, thanks for submitting the patch.

    -- Anders


On Thu, Apr 27, 2017 at 6:50 AM, Jean-Christophe Helary <address@hidden> wrote:
I've noticed that the system service provided by NS-Emacs (and Aquamacs) did not allow multiple strings to be selected for opening them in emacs since the function called (dnd-open-file) accepts only one argument.

A few days ago I've written a patch to the aquamacs/ns-win.el that was accepted today by David.

https://github.com/davidswelt/aquamacs-emacs/pull/128/files

Since the issue exists also in NS-Emacs I was wondering what could be done to have the patch (or an adaptation) applied to the original lisp/term/ns-win.el file.

Jean-Christophe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]