|
From: | Jean-Christophe Helary |
Subject: | Re: lisp/term/ns-win.el modification |
Date: | Thu, 27 Apr 2017 19:13:46 +0900 |
Anders, Thank you very much for the feedback.
Ok, but such a trimming function is trivial and I don't see how my rewriting it to make it different from that code would add to it. What should I do?
I'll do. Thank you very much.
Services are called from the Services menu, not by drag-and-dropping. The "Open Selected File" service takes a string as its argument, tries to parse that as a path on the file system and if a file corresponds to that path opens it, otherwise creates a buffer with the file name as its name. The service is basically used on text files, not in the Finder.
You mean `ns_input_spi_arg', right? The line above (defvar ns-input-spi-name) refers to a `nsterm.m' file where it seems to be defined the following way: ns_input_spi_arg = build_string ([arg UTF8String]);
I don't want to modify the ns-spi-service-call block more than necessary.
Yes, but we're not talking about file names but file paths in a text file here. The problem with not trimming is that when a legit file is tripple-clicked, the whole line is selected, including trailing spaces. The way the service is currently implemented considers that spaces a belonging to the file name and since that file does not exist just opens a blank buffer. So I guess I could add a test to check wether the trimmed file exist and if not add the selected white space until I get an existing file (but then we'd hit cases where 2 files ending with different sorts of white space could be confused for each other).
Thank me when I have something that's acceptable :) Jean-Christophe
|
[Prev in Thread] | Current Thread | [Next in Thread] |