public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* [ANNOUNCEMENT] Updated: mintty 2.9.5
@ 2018-12-05 10:28 Thomas Wolff
  2018-12-05 20:21 ` Achim Gratz
  2018-12-10 18:21 ` Achim Gratz
  0 siblings, 2 replies; 17+ messages in thread
From: Thomas Wolff @ 2018-12-05 10:28 UTC (permalink / raw)
  To: cygwin

I have uploaded mintty 2.9.5 with the following changes:

Window handling
   * Fixed startup directory after cloning new window after starting 
from desktop shortcut (#784, mintty/wsltty#96).
   * Avoiding stale hover indication in unfocussed window.
   * Changed default handling of resolution change to HandleDPI=2 (#824).

Tweaks to HTML clipboard/export feature
   * Flexible HTML formatting levels.
   * Configurable, also in Options dialog.
   * No more table cell container.
   * HTML escaping.
   * Apply styles individually and other tweaks for increased compatibility.
   * Font fallback 'monospace'.
   * Find relative HTML file name on Shift+"HTML Screen Dump".

Configuration
   * CopyAsHTML (#825, #811).

Other
   * Ensuring /bin in PATH for user commands.

The homepage is at http://mintty.github.io/
It also links to the issue tracker.

------
Thomas

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [ANNOUNCEMENT] Updated: mintty 2.9.5
  2018-12-05 10:28 [ANNOUNCEMENT] Updated: mintty 2.9.5 Thomas Wolff
@ 2018-12-05 20:21 ` Achim Gratz
  2018-12-05 21:46   ` Thomas Wolff
  2018-12-10 18:21 ` Achim Gratz
  1 sibling, 1 reply; 17+ messages in thread
From: Achim Gratz @ 2018-12-05 20:21 UTC (permalink / raw)
  To: cygwin

Thomas Wolff writes:
> Other
>   * Ensuring /bin in PATH for user commands.

Blindly prepending /bin to the existing PATH is asking for trouble with
certain setups.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Waldorf MIDI Implementation & additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [ANNOUNCEMENT] Updated: mintty 2.9.5
  2018-12-05 20:21 ` Achim Gratz
@ 2018-12-05 21:46   ` Thomas Wolff
  2018-12-06  0:20     ` Andrey Repin
  2018-12-06 19:39     ` Achim Gratz
  0 siblings, 2 replies; 17+ messages in thread
From: Thomas Wolff @ 2018-12-05 21:46 UTC (permalink / raw)
  To: cygwin

Am 05.12.2018 um 21:21 schrieb Achim Gratz:
> Thomas Wolff writes:
>> Other
>>    * Ensuring /bin in PATH for user commands.
> Blindly prepending /bin to the existing PATH is asking for trouble with certain setups.
Just to clarify, this is only applicable to user-defined commands added 
to the extended context menu (option UserCommands), in order to ensure 
basic tools are available. If you see problems there, please be more 
specific.
Kind regards,
Thomas

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [ANNOUNCEMENT] Updated: mintty 2.9.5
  2018-12-05 21:46   ` Thomas Wolff
@ 2018-12-06  0:20     ` Andrey Repin
  2018-12-06  7:22       ` Thomas Wolff
  2018-12-06 19:39     ` Achim Gratz
  1 sibling, 1 reply; 17+ messages in thread
From: Andrey Repin @ 2018-12-06  0:20 UTC (permalink / raw)
  To: Thomas Wolff, cygwin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 1060 bytes --]

Greetings, Thomas Wolff!

> Am 05.12.2018 um 21:21 schrieb Achim Gratz:
>> Thomas Wolff writes:
>>> Other
>>>    * Ensuring /bin in PATH for user commands.
>> Blindly prepending /bin to the existing PATH is asking for trouble with certain setups.
> Just to clarify, this is only applicable to user-defined commands added 
> to the extended context menu (option UserCommands), in order to ensure 
> basic tools are available. If you see problems there, please be more 
> specific.

Yes, I see problem there.
I have Cygwin in my regular %PATH% at the place I want it. I.e. when using
tools and commands, I expect them to behave in a certain way.
Changing it have potential to produce unexpected results.


-- 
With best regards,
Andrey Repin
Thursday, December 6, 2018 3:16:03

Sorry for my terrible english...\0ТÒÐÐ¥\a&ö&ÆVÒ\a&W\x06÷'G3¢\x02\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒ÷\a&ö&ÆV×2æ‡FÖÀФd\x15\x13¢\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒöf\x17\x12ðФFö7VÖVçF\x17F–öã¢\x02\x02\x02\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒöFö72æ‡FÖÀÐ¥Vç7V'67&–&R\x06–æfó¢\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒöÖÂò7Vç7V'67&–&R×6–×\x06ÆPРÐ

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [ANNOUNCEMENT] Updated: mintty 2.9.5
  2018-12-06  0:20     ` Andrey Repin
@ 2018-12-06  7:22       ` Thomas Wolff
  2018-12-06 16:25         ` cyg Simple
  0 siblings, 1 reply; 17+ messages in thread
From: Thomas Wolff @ 2018-12-06  7:22 UTC (permalink / raw)
  To: cygwin


Am 06.12.2018 um 01:18 schrieb Andrey Repin:
> Greetings, Thomas Wolff!
>
>> Am 05.12.2018 um 21:21 schrieb Achim Gratz:
>>> Thomas Wolff writes:
>>>> Other
>>>>     * Ensuring /bin in PATH for user commands.
>>> Blindly prepending /bin to the existing PATH is asking for trouble with certain setups.
>> Just to clarify, this is only applicable to user-defined commands added
>> to the extended context menu (option UserCommands), in order to ensure
>> basic tools are available. If you see problems there, please be more
>> specific.
> Yes, I see problem there.
> I have Cygwin in my regular %PATH% at the place I want it. I.e. when using
> tools and commands, I expect them to behave in a certain way.
> Changing it have potential to produce unexpected results.
The issue that caused me to apply this change: if you start mintty from 
a desktop shortcut, cygwin /bin is not in the PATH of mintty (unless you 
would set it globally in Windows, which is discouraged). It will be 
inside your login shell, of course, but user commands are spawned from 
mintty directly.
I could append rather than prepend /bin, but then another tool like 
`sed` might be in the path and user commands behave unexpectedly. I 
could also check whether it's in PATH already, and then prepend.
Thomas

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [ANNOUNCEMENT] Updated: mintty 2.9.5
  2018-12-06  7:22       ` Thomas Wolff
@ 2018-12-06 16:25         ` cyg Simple
  0 siblings, 0 replies; 17+ messages in thread
From: cyg Simple @ 2018-12-06 16:25 UTC (permalink / raw)
  To: cygwin

On 12/6/2018 2:22 AM, Thomas Wolff wrote:
> 
> Am 06.12.2018 um 01:18 schrieb Andrey Repin:
>> Greetings, Thomas Wolff!
>>
>>> Am 05.12.2018 um 21:21 schrieb Achim Gratz:
>>>> Thomas Wolff writes:
>>>>> Other
>>>>>     * Ensuring /bin in PATH for user commands.
>>>> Blindly prepending /bin to the existing PATH is asking for trouble 
>>>> with certain setups.
>>> Just to clarify, this is only applicable to user-defined commands added
>>> to the extended context menu (option UserCommands), in order to ensure
>>> basic tools are available. If you see problems there, please be more
>>> specific.
>> Yes, I see problem there.
>> I have Cygwin in my regular %PATH% at the place I want it. I.e. when 
>> using
>> tools and commands, I expect them to behave in a certain way.
>> Changing it have potential to produce unexpected results.
> The issue that caused me to apply this change: if you start mintty from 
> a desktop shortcut, cygwin /bin is not in the PATH of mintty (unless you 
> would set it globally in Windows, which is discouraged). It will be 
> inside your login shell, of course, but user commands are spawned from 
> mintty directly.
> I could append rather than prepend /bin, but then another tool like 
> `sed` might be in the path and user commands behave unexpectedly. I 
> could also check whether it's in PATH already, and then prepend.

Please make it optional.  And rather than prepend doing an append might 
avoid the conflicts described by Andrey.

-- 
cyg Simple

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [ANNOUNCEMENT] Updated: mintty 2.9.5
  2018-12-05 21:46   ` Thomas Wolff
  2018-12-06  0:20     ` Andrey Repin
@ 2018-12-06 19:39     ` Achim Gratz
  2018-12-06 21:35       ` Andrey Repin
  2018-12-07 13:45       ` Brian Inglis
  1 sibling, 2 replies; 17+ messages in thread
From: Achim Gratz @ 2018-12-06 19:39 UTC (permalink / raw)
  To: cygwin

Thomas Wolff writes:
> Am 05.12.2018 um 21:21 schrieb Achim Gratz:
>> Thomas Wolff writes:
>>> Other
>>>    * Ensuring /bin in PATH for user commands.
>> Blindly prepending /bin to the existing PATH is asking for trouble with certain setups.
> Just to clarify, this is only applicable to user-defined commands
> added to the extended context menu (option UserCommands), in order to
> ensure basic tools are available. If you see problems there, please be
> more specific.

I'm not using this option, so my remark was just to remind you that
second-guessing the user w.r.t. PATH will eventually find at least one
user in an unfortunate (and in this case hard to debug) situation.  So
the usual advice applies:

a) Just warn about the missing PATH component without changing the PATH.
b) Give the user an option to let the command run with a separate PATH.

Indeed there might be other things that are missing in the environment,
so instead of just fixing up PATH you might consider using a wrapper
that the user can change.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [ANNOUNCEMENT] Updated: mintty 2.9.5
  2018-12-06 19:39     ` Achim Gratz
@ 2018-12-06 21:35       ` Andrey Repin
  2018-12-07 20:12         ` Thomas Wolff
  2018-12-07 13:45       ` Brian Inglis
  1 sibling, 1 reply; 17+ messages in thread
From: Andrey Repin @ 2018-12-06 21:35 UTC (permalink / raw)
  To: Achim Gratz, cygwin

Greetings, Achim Gratz!

> a) Just warn about the missing PATH component without changing the PATH.
> b) Give the user an option to let the command run with a separate PATH.

> Indeed there might be other things that are missing in the environment,
> so instead of just fixing up PATH you might consider using a wrapper
> that the user can change.

This is an interesting point.
Probably letting the user specify custom $PATH for quick commands (and save
current %PATH% as $ORIGINAL_PATH) may be the best choice.
The default can be %Cygwin%\bin:%PATH% or %PATH%:%Cygwin%\bin, I'm not very
concerned as long as it's explicit and customizable.
If anybody need a wrapper, they may write and use it by themselves.

(I already have one, written in TCC, working quite well.)


-- 
With best regards,
Andrey Repin
Friday, December 7, 2018 0:15:56

Sorry for my terrible english...


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [ANNOUNCEMENT] Updated: mintty 2.9.5
  2018-12-06 19:39     ` Achim Gratz
  2018-12-06 21:35       ` Andrey Repin
@ 2018-12-07 13:45       ` Brian Inglis
  1 sibling, 0 replies; 17+ messages in thread
From: Brian Inglis @ 2018-12-07 13:45 UTC (permalink / raw)
  To: cygwin

On 2018-12-06 12:39, Achim Gratz wrote:
> Thomas Wolff writes:
>> Am 05.12.2018 um 21:21 schrieb Achim Gratz:
>>> Thomas Wolff writes:
>>>> Ensuring /bin in PATH for user commands.
>>> Blindly prepending /bin to the existing PATH is asking for trouble with 
>>> certain setups.

Many setups: my Windows User PATH includes Cygwin {,/usr/local}/{,s}bin and the
Windows System PATH, and my login scripts append new Cygwin paths before any
Windows paths, used to allow interop using Cygwin and Windows consoles with
Cygwin and non-Cygwin apps, which may only or also be available in MinGW/native
exes e.g. BitKeeper.

>> Just to clarify, this is only applicable to user-defined commands
>> added to the extended context menu (option UserCommands), in order to
>> ensure basic tools are available. If you see problems there, please be
>> more specific.
> 
> I'm not using this option, so my remark was just to remind you that
> second-guessing the user w.r.t. PATH will eventually find at least one
> user in an unfortunate (and in this case hard to debug) situation.  So
> the usual advice applies:
> 
> a) Just warn about the missing PATH component without changing the PATH.

after checking to see if the expected /bin is already present

> b) Give the user an option to let the command run with a separate PATH.

++

> Indeed there might be other things that are missing in the environment,
> so instead of just fixing up PATH you might consider using a wrapper
> that the user can change.

Maybe allow an env config file with comments, blank lines, env var definitions
with values including embedded single and double quotes, env var refs, and one
optional prefix command e.g. export, set, setenv, etc. which could be ignored
when used without a definition e.g. "export PATH" rather than "export PATH=...".

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [ANNOUNCEMENT] Updated: mintty 2.9.5
  2018-12-06 21:35       ` Andrey Repin
@ 2018-12-07 20:12         ` Thomas Wolff
  2018-12-07 21:50           ` Andrey Repin
  0 siblings, 1 reply; 17+ messages in thread
From: Thomas Wolff @ 2018-12-07 20:12 UTC (permalink / raw)
  To: cygwin

Am 06.12.2018 um 22:32 schrieb Andrey Repin:
> Greetings, Achim Gratz!
>
>> a) Just warn about the missing PATH component without changing the PATH.
>> b) Give the user an option to let the command run with a separate PATH.
>> Indeed there might be other things that are missing in the environment,
>> so instead of just fixing up PATH you might consider using a wrapper
>> that the user can change.
> This is an interesting point.
> Probably letting the user specify custom $PATH for quick commands (and save
> current %PATH% as $ORIGINAL_PATH) may be the best choice.
> The default can be %Cygwin%\bin:%PATH% or %PATH%:%Cygwin%\bin, I'm not very
> concerned as long as it's explicit and customizable.
I didn't expect the setup of this specific feature to be so strongly 
advocated :)
In any case, things shouldn't become too complex. What I can image is an 
option UserCommandsPATH
with one optional placeholder %s which would be replaced with the 
environment PATH;
default /bin:%s, corresponding to current behaviour.

> If anybody need a wrapper, they may write and use it by themselves.
>
> (I already have one, written in TCC, working quite well.)
Out of curiosity, what's TCC and what does your wrapper do?

Thomas

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [ANNOUNCEMENT] Updated: mintty 2.9.5
  2018-12-07 20:12         ` Thomas Wolff
@ 2018-12-07 21:50           ` Andrey Repin
  2018-12-09 23:22             ` Thomas Wolff
  0 siblings, 1 reply; 17+ messages in thread
From: Andrey Repin @ 2018-12-07 21:50 UTC (permalink / raw)
  To: Thomas Wolff, cygwin

[-- Attachment #1: Type: text/plain, Size: 2722 bytes --]

Greetings, Thomas Wolff!

> Am 06.12.2018 um 22:32 schrieb Andrey Repin:
>> Greetings, Achim Gratz!
>>
>>> a) Just warn about the missing PATH component without changing the PATH.
>>> b) Give the user an option to let the command run with a separate PATH.
>>> Indeed there might be other things that are missing in the environment,
>>> so instead of just fixing up PATH you might consider using a wrapper
>>> that the user can change.
>> This is an interesting point.
>> Probably letting the user specify custom $PATH for quick commands (and save
>> current %PATH% as $ORIGINAL_PATH) may be the best choice.
>> The default can be %Cygwin%\bin:%PATH% or %PATH%:%Cygwin%\bin, I'm not very
>> concerned as long as it's explicit and customizable.
> I didn't expect the setup of this specific feature to be so strongly 
> advocated :)
> In any case, things shouldn't become too complex. What I can image is an 
> option UserCommandsPATH
> with one optional placeholder %s which would be replaced with the 
> environment PATH;
> default /bin:%s, corresponding to current behaviour.

Using native paths and environment variable syntax, you can always use
ExpandEnvironmentString to get the %PATH% you need.
Cygwin DLL will then convert it to own version, avoiding you mangling it
yourself.
And I would strongly discourage from using placeholders familiar for you, but
unexpected by the end user and taken from entirely different area of knowledge.

BTW, Cygwin itself does it differently. %Cygwin%\bin is converted to /usr/bin.

>> If anybody need a wrapper, they may write and use it by themselves.
>>
>> (I already have one, written in TCC, working quite well.)
> Out of curiosity, what's TCC and what does your wrapper do?

This is an augmented CMD-like scripting platform.
https://jpsoft.com/products/tcc-cmd-prompt.html

Its "runtime" variant, TCC-RT, contains only scripting core, no interactive
functionality, and is distributed for free.

I attached the pair of scripts that I use to wrap .sh/.awk/.pl/etc. with.
In manual mode, I can use it to launch any script provided /usr/bin/env can
deal with it, as it's basically a wrapper around /usr/bin/env, which ensures
that the first argument (the script name) has Cygwin notation.
The fix-path thing is necessary to tweak startup behavior. Normal operation
environment don't have /usr/local/bin in %PATH%, as that hides some
Cygwin-specific scripts which have native counterparts in a different place.

P.S.
The %[variable] notation I use is not strictly necessary.
%var or %var% works equally well, but may be disabled in options.
I'm just playing on the safe side.


-- 
With best regards,
Andrey Repin
Saturday, December 8, 2018 0:16:49

Sorry for my terrible english...

[-- Attachment #2: cygwrap.btm --]
[-- Type: application/octet-stream, Size: 730 bytes --]

@SET PROMPT=@$S$P$_
@ECHO OFF
ON BREAK REM

IF "%~1" == "--install" GOTO :SETUP
IF "%~1" == "" GOTO :BANNER

CALL "%~dp0fix-path.btm"

SET ENV=%@PATH[%@FULL["%~0"]]env.exe
SET CMDNAME=%@EXECSTR[cygpath.exe -u "%~1"]
SHIFT

SET LANG=%@EXECSTR[locale -uU]
"%[ENV]" -- "%[CMDNAME]" %$
QUIT %?

:BANNER
ECHO Cygwin script wrapper.
ECHO Usage:
ECHO.
ECHO   %@FILENAME["%~0"] script [parameters]
ECHO   %@FILENAME["%~0"] --install [.ext ...]
ECHO.
ECHO The ".sh" extension is always registered on install.
QUIT

:SETUP

FTYPE unixshell.script="%[ComSpec]" /S /C "%@FULL["%~0"]" "%%1" %%*
SHIFT
DO EXT IN /L .sh %$
  IFF "%@LEFT[1,%[EXT]]" == "." THEN
    ASSOC %[EXT]=unixshell.script
  ENDIFF
ENDDO

[-- Attachment #3: fix-path.btm --]
[-- Type: application/octet-stream, Size: 284 bytes --]

@ECHO OFF

SET OLDPATH=%[PATH]
SET _CBIN=%@RTRIM[\,%@PATH[%@FULL["%~0"]]]
SET PATH=%@RTRIM[\,%@PATH[%[_CBIN]]]/usr/local/bin;%[_CBIN]
DO _path IN /T";" /L %[OLDPATH]
  IFF "%[_path]" != "%[_CBIN]" THEN
    SET PATH=%[PATH];%[_path]
  ENDIFF
ENDDO
UNSET OLDPATH _CBIN _path

[-- Attachment #4: Type: text/plain, Size: 219 bytes --]


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [ANNOUNCEMENT] Updated: mintty 2.9.5
  2018-12-07 21:50           ` Andrey Repin
@ 2018-12-09 23:22             ` Thomas Wolff
  2018-12-10  2:05               ` Andrey Repin
  0 siblings, 1 reply; 17+ messages in thread
From: Thomas Wolff @ 2018-12-09 23:22 UTC (permalink / raw)
  To: cygwin

Am 07.12.2018 um 22:41 schrieb Andrey Repin:
> Greetings, Thomas Wolff!
>
>> Am 06.12.2018 um 22:32 schrieb Andrey Repin:
>>> Greetings, Achim Gratz!
>>>
>>>> a) Just warn about the missing PATH component without changing the PATH.
>>>> b) Give the user an option to let the command run with a separate PATH.
>>>> Indeed there might be other things that are missing in the environment,
>>>> so instead of just fixing up PATH you might consider using a wrapper
>>>> that the user can change.
>>> This is an interesting point.
>>> Probably letting the user specify custom $PATH for quick commands (and save
>>> current %PATH% as $ORIGINAL_PATH) may be the best choice.
>>> The default can be %Cygwin%\bin:%PATH% or %PATH%:%Cygwin%\bin, I'm not very
>>> concerned as long as it's explicit and customizable.
>> I didn't expect the setup of this specific feature to be so strongly
>> advocated :)
>> In any case, things shouldn't become too complex. What I can image is an
>> option UserCommandsPATH
>> with one optional placeholder %s which would be replaced with the
>> environment PATH;
>> default /bin:%s, corresponding to current behaviour.
> Using native paths and environment variable syntax, you can always use
> ExpandEnvironmentString to get the %PATH% you need.
> Cygwin DLL will then convert it to own version, avoiding you mangling it
> yourself.
> And I would strongly discourage from using placeholders familiar for you, but
> unexpected by the end user and taken from entirely different area of knowledge.
>
> BTW, Cygwin itself does it differently. %Cygwin%\bin is converted to /usr/bin.
This setup should be handled in the Posix path domain. I've uploaded a 
patch for evaluation, to the github repository.
Thomas

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [ANNOUNCEMENT] Updated: mintty 2.9.5
  2018-12-09 23:22             ` Thomas Wolff
@ 2018-12-10  2:05               ` Andrey Repin
  2018-12-10  4:58                 ` Thomas Wolff
  0 siblings, 1 reply; 17+ messages in thread
From: Andrey Repin @ 2018-12-10  2:05 UTC (permalink / raw)
  To: Thomas Wolff, cygwin

Greetings, Thomas Wolff!

> Am 07.12.2018 um 22:41 schrieb Andrey Repin:
>> Greetings, Thomas Wolff!
>>
>>> Am 06.12.2018 um 22:32 schrieb Andrey Repin:
>>>> Greetings, Achim Gratz!
>>>>
>>>>> a) Just warn about the missing PATH component without changing the PATH.
>>>>> b) Give the user an option to let the command run with a separate PATH.
>>>>> Indeed there might be other things that are missing in the environment,
>>>>> so instead of just fixing up PATH you might consider using a wrapper
>>>>> that the user can change.
>>>> This is an interesting point.
>>>> Probably letting the user specify custom $PATH for quick commands (and save
>>>> current %PATH% as $ORIGINAL_PATH) may be the best choice.
>>>> The default can be %Cygwin%\bin:%PATH% or %PATH%:%Cygwin%\bin, I'm not very
>>>> concerned as long as it's explicit and customizable.
>>> I didn't expect the setup of this specific feature to be so strongly
>>> advocated :)
>>> In any case, things shouldn't become too complex. What I can image is an
>>> option UserCommandsPATH
>>> with one optional placeholder %s which would be replaced with the
>>> environment PATH;
>>> default /bin:%s, corresponding to current behaviour.
>> Using native paths and environment variable syntax, you can always use
>> ExpandEnvironmentString to get the %PATH% you need.
>> Cygwin DLL will then convert it to own version, avoiding you mangling it
>> yourself.
>> And I would strongly discourage from using placeholders familiar for you, but
>> unexpected by the end user and taken from entirely different area of knowledge.
>>
>> BTW, Cygwin itself does it differently. %Cygwin%\bin is converted to /usr/bin.
> This setup should be handled in the Posix path domain.

Give me a good reason why should you second-guess Cygwin's own functionality?

> I've uploaded a
> patch for evaluation, to the github repository.
> Thomas


-- 
With best regards,
Andrey Repin
Monday, December 10, 2018 5:01:12

Sorry for my terrible english...


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [ANNOUNCEMENT] Updated: mintty 2.9.5
  2018-12-10  2:05               ` Andrey Repin
@ 2018-12-10  4:58                 ` Thomas Wolff
  2018-12-10 13:20                   ` Andrey Repin
  0 siblings, 1 reply; 17+ messages in thread
From: Thomas Wolff @ 2018-12-10  4:58 UTC (permalink / raw)
  To: cygwin

Am 10.12.2018 um 03:01 schrieb Andrey Repin:
> Greetings, Thomas Wolff!
>
>> Am 07.12.2018 um 22:41 schrieb Andrey Repin:
>>> Greetings, Thomas Wolff!
>>>
>>>> Am 06.12.2018 um 22:32 schrieb Andrey Repin:
>>>>> Greetings, Achim Gratz!
>>>>>
>>>>>> a) Just warn about the missing PATH component without changing the PATH.
>>>>>> b) Give the user an option to let the command run with a separate PATH.
>>>>>> Indeed there might be other things that are missing in the environment,
>>>>>> so instead of just fixing up PATH you might consider using a wrapper
>>>>>> that the user can change.
>>>>> This is an interesting point.
>>>>> Probably letting the user specify custom $PATH for quick commands (and save
>>>>> current %PATH% as $ORIGINAL_PATH) may be the best choice.
>>>>> The default can be %Cygwin%\bin:%PATH% or %PATH%:%Cygwin%\bin, I'm not very
>>>>> concerned as long as it's explicit and customizable.
>>>> I didn't expect the setup of this specific feature to be so strongly
>>>> advocated :)
>>>> In any case, things shouldn't become too complex. What I can image is an
>>>> option UserCommandsPATH
>>>> with one optional placeholder %s which would be replaced with the
>>>> environment PATH;
>>>> default /bin:%s, corresponding to current behaviour.
>>> Using native paths and environment variable syntax, you can always use
>>> ExpandEnvironmentString to get the %PATH% you need.
>>> Cygwin DLL will then convert it to own version, avoiding you mangling it
>>> yourself.
>>> And I would strongly discourage from using placeholders familiar for you, but
>>> unexpected by the end user and taken from entirely different area of knowledge.
>>>
>>> BTW, Cygwin itself does it differently. %Cygwin%\bin is converted to /usr/bin.
>> This setup should be handled in the Posix path domain.
> Give me a good reason why should you second-guess Cygwin's own functionality?
You have apparently set up some cmd scripts as mintty user commands, so 
you're thinking in Windows terms here. However, the idea is more to use 
cygwin tools for such purposes. In either case, the path is handled 
within a cygwin session (mintty) and cygwin does the conversion both 
ways, so it should be fine for you.
Thomas

>
>> I've uploaded a
>> patch for evaluation, to the github repository.
>> Thomas

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [ANNOUNCEMENT] Updated: mintty 2.9.5
  2018-12-10  4:58                 ` Thomas Wolff
@ 2018-12-10 13:20                   ` Andrey Repin
  2018-12-10 13:54                     ` Thomas Wolff
  0 siblings, 1 reply; 17+ messages in thread
From: Andrey Repin @ 2018-12-10 13:20 UTC (permalink / raw)
  To: Thomas Wolff, cygwin

Greetings, Thomas Wolff!

>>>> BTW, Cygwin itself does it differently. %Cygwin%\bin is converted to /usr/bin.
>>> This setup should be handled in the Posix path domain.
>> Give me a good reason why should you second-guess Cygwin's own functionality?
> You have apparently set up some cmd scripts as mintty user commands, so 
> you're thinking in Windows terms here.

One is very distantly related to another.
I set up programs to work as user commands, it's not actually relevant, if
they are cmd scripts, or perl, both, or neither.

> However, the idea is more to use cygwin tools for such purposes. In either
> case, the path is handled within a cygwin session (mintty) and cygwin does
> the conversion both ways, so it should be fine for you.

The path is handled within a **cygwin** session, but mintty is not it.
And you don't have to second-guess cygwin behavior, if you do it the way I
propose. And you would be safe if behavior would one day change (though I do
not foresee it in this case).

P.S.
I've tried to do it "your way" for tests.
Had enough of an issue starting Cygwin itself and rolled it back.
Cygwin already quite capable of path conversion, no need to deny it this
ability.


-- 
With best regards,
Andrey Repin
Monday, December 10, 2018 15:54:44

Sorry for my terrible english...


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [ANNOUNCEMENT] Updated: mintty 2.9.5
  2018-12-10 13:20                   ` Andrey Repin
@ 2018-12-10 13:54                     ` Thomas Wolff
  0 siblings, 0 replies; 17+ messages in thread
From: Thomas Wolff @ 2018-12-10 13:54 UTC (permalink / raw)
  To: cygwin

Hello Andrey,

On 10.12.2018 14:08, Andrey Repin wrote:
> Greetings, Thomas Wolff!
>
>>>>> BTW, Cygwin itself does it differently. %Cygwin%\bin is converted to /usr/bin.
>>>> This setup should be handled in the Posix path domain.
>>> Give me a good reason why should you second-guess Cygwin's own functionality?
>> You have apparently set up some cmd scripts as mintty user commands, so
>> you're thinking in Windows terms here.
> One is very distantly related to another.
> I set up programs to work as user commands, it's not actually relevant, if
> they are cmd scripts, or perl, both, or neither.
Acknowledged.

>> However, the idea is more to use cygwin tools for such purposes. In either
>> case, the path is handled within a cygwin session (mintty) and cygwin does
>> the conversion both ways, so it should be fine for you.
> The path is handled within a **cygwin** session, but mintty is not it.
Sure mintty is a cygwin program, linked with cygwin and thus starting a 
cygwin session.

> And you don't have to second-guess cygwin behavior, if you do it the way I
> propose. And you would be safe if behavior would one day change (though I do
> not foresee it in this case).
I'm not tampering with cygwin behaviour in any way, just changing PATH, 
so that a tool subsequently invoked by `popen` can use it.

> P.S.
> I've tried to do it "your way" for tests.
> Had enough of an issue starting Cygwin itself and rolled it back.
> Cygwin already quite capable of path conversion, no need to deny it this ability.
Not sure whether you're having a problem with your mintty command 
scripts. I've tested this thoroughly, everything works fine in these 
configuration combinations, with a test script D:\bin\test.cmd that 
echoes %MINTTY_SELECT% attached to keyboard shortcut Ctrl+Shift+t:

KeyFunctions=t:`test.cmd`
UserCommandsPath=D:\bin:%s

KeyFunctions=t:`test.cmd`
UserCommandsPath=/cygdrive/d/bin:%s

KeyFunctions=t:`D:/bin/test.cmd`
#UserCommandsPath=

KeyFunctions=t:`/cygdrive/d/bin/test.cmd`
#UserCommandsPath=

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [ANNOUNCEMENT] Updated: mintty 2.9.5
  2018-12-05 10:28 [ANNOUNCEMENT] Updated: mintty 2.9.5 Thomas Wolff
  2018-12-05 20:21 ` Achim Gratz
@ 2018-12-10 18:21 ` Achim Gratz
  1 sibling, 0 replies; 17+ messages in thread
From: Achim Gratz @ 2018-12-10 18:21 UTC (permalink / raw)
  To: cygwin

Thomas Wolff writes:
> Tweaks to HTML clipboard/export feature
>   * Flexible HTML formatting levels.
>   * Configurable, also in Options dialog.
>   * No more table cell container.
>   * HTML escaping.
>   * Apply styles individually and other tweaks for increased compatibility.
>   * Font fallback 'monospace'.
>   * Find relative HTML file name on Shift+"HTML Screen Dump".
>
> Configuration
>   * CopyAsHTML (#825, #811).

I could only test this today, so here is my belated confirmation that
copy&paste is working again for my use-case.  Thanks!


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Waldorf MIDI Implementation & additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2018-12-10 18:21 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-05 10:28 [ANNOUNCEMENT] Updated: mintty 2.9.5 Thomas Wolff
2018-12-05 20:21 ` Achim Gratz
2018-12-05 21:46   ` Thomas Wolff
2018-12-06  0:20     ` Andrey Repin
2018-12-06  7:22       ` Thomas Wolff
2018-12-06 16:25         ` cyg Simple
2018-12-06 19:39     ` Achim Gratz
2018-12-06 21:35       ` Andrey Repin
2018-12-07 20:12         ` Thomas Wolff
2018-12-07 21:50           ` Andrey Repin
2018-12-09 23:22             ` Thomas Wolff
2018-12-10  2:05               ` Andrey Repin
2018-12-10  4:58                 ` Thomas Wolff
2018-12-10 13:20                   ` Andrey Repin
2018-12-10 13:54                     ` Thomas Wolff
2018-12-07 13:45       ` Brian Inglis
2018-12-10 18:21 ` Achim Gratz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).