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: Sat, 29 Apr 2017 14:24:04 +0200

Hi!

Finally, I start to understand what you are trying to do. Here is a recipe on how to enable it:

- In System Preferences > Keyboard > Shortcuts > Services, select Text > Open Selected File

- Restart Emacs. (I didn't, which caused Aquamacs to be launched)

I did test your patch from within gmail in Chrome. One this that I realized was that when typing a space, it sometimes came out as a plain space, sometimes as a non-breakable space. I'm not sure this is specific to the edit field in gmail, but I think it would ba good idea to trim both kind of spaces.


Regarding 3) and Anders' comment "If all you do is to place the call inside a dolist, you should be ok. Introducing additional functions (only used in one location) isn't 100% clean either." I'm not sure I want to change the cond block because it is very elegant as it is. Please advise.

I'm find with how the code looks now. It's less cluttered than when two functions were used.

However, I'm not 100% comfortable to use `subr-x' since it is somewhat experimental (e.g. the functions in the file is not documented in the Emacs lisp manual). Besides, it doesn't trim non-breakable spaces. You could use something like the following:

(save-match-data
  (string-match "\\`[ \u00A0]*\\(.*?\\)[ \u00A0]*\\'" path-string)
  (match-string 1 path-string))
Some small things:

- When sending a patch, it's better to do it against the latest Emacs archive, rather than against the Aquamacs archive. In this case, I had to manually edit the files to apply the patch. Also, for future reference, it's better to attach it than to supply a link.

- In a doc string, the first line should be a full sentence with a summary of what the function does. The reason is that when using "apropos", only the first line of the doc string is shown.

    -- Anders

reply via email to

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