* Open URLs with # using cygstart.exe @ 2012-07-13 12:06 Alexander Konovalov 2012-07-13 12:27 ` Csaba Raduly ` (2 more replies) 0 siblings, 3 replies; 13+ messages in thread From: Alexander Konovalov @ 2012-07-13 12:06 UTC (permalink / raw) To: cygwin Dear Cygwin experts, I am trying to open the exact location in the html file using my default browser with the command of the form cygstart.exe file:///C:/somepath/doc/ref/chap31.html#X84F59A2687C62763 However, the anchor is ignored, so instead of going to the exact location it opens the file and stays on the top of the page. I didn't manage to find anything on Web, except the discussion about handling '?' in URL on March 30-31 this year, but it doesn't help. Is there any workaround to handle '#' in URLs? Thanks, Alexander -- 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] 13+ messages in thread
* Re: Open URLs with # using cygstart.exe 2012-07-13 12:06 Open URLs with # using cygstart.exe Alexander Konovalov @ 2012-07-13 12:27 ` Csaba Raduly 2012-07-13 12:38 ` Dima Pasechnik 2012-07-13 13:14 ` Adam Dinwoodie 2012-07-13 15:33 ` Earnie Boyd 2 siblings, 1 reply; 13+ messages in thread From: Csaba Raduly @ 2012-07-13 12:27 UTC (permalink / raw) To: cygwin On Fri, Jul 13, 2012 at 2:06 PM, Alexander Konovalov wrote: > Dear Cygwin experts, > > I am trying to open the exact location in the html file using my default > browser with the command of the form > > cygstart.exe file:///C:/somepath/doc/ref/chap31.html#X84F59A2687C62763 > > However, the anchor is ignored, so instead of going to the exact location > it opens the file and stays on the top of the page. Hi Alexander, You are doing better than me. For me, cygstart interprets the anchor as part of the filename. $ cygstart file:///www/pages/html401/sgml/dtd.html#inline Unable to start 'C:\cygwin17\www\pages\html401\sgml\dtd.html#inline': The specified file was not found. Have you tried cygstart.exe 'file:///C:/somepath/doc/ref/chap31.html#X84F59A2687C62763' (note the single quotes) ? Csaba -- GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++ The Tao of math: The numbers you can count are not the real numbers. Life is complex, with real and imaginary parts. "Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds "People disagree with me. I just ignore them." -- Linus Torvalds -- 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] 13+ messages in thread
* Re: Open URLs with # using cygstart.exe 2012-07-13 12:27 ` Csaba Raduly @ 2012-07-13 12:38 ` Dima Pasechnik 2012-07-13 13:03 ` Alexander Konovalov 0 siblings, 1 reply; 13+ messages in thread From: Dima Pasechnik @ 2012-07-13 12:38 UTC (permalink / raw) To: cygwin; +Cc: Alexander Konovalov Hi Alex, On 13 July 2012 20:26, Csaba Raduly <rcsaba@gmail.com> wrote: > On Fri, Jul 13, 2012 at 2:06 PM, Alexander Konovalov wrote: >> Dear Cygwin experts, >> >> I am trying to open the exact location in the html file using my default >> browser with the command of the form >> >> cygstart.exe file:///C:/somepath/doc/ref/chap31.html#X84F59A2687C62763 >> >> However, the anchor is ignored, so instead of going to the exact location >> it opens the file and stays on the top of the page. > > Hi Alexander, > > You are doing better than me. For me, cygstart interprets the anchor > as part of the filename. > > $ cygstart file:///www/pages/html401/sgml/dtd.html#inline > Unable to start 'C:\cygwin17\www\pages\html401\sgml\dtd.html#inline': > The specified file was not found. > Same here. Interestingly, it works just fine with the remote URL - it brings up the page in the right place. (OK, so here it's Windows 7 (32-bit) running Cygwin 1.7.15, and the default browser is Firefox) > Have you tried > > cygstart.exe 'file:///C:/somepath/doc/ref/chap31.html#X84F59A2687C62763' > > (note the single quotes) ? this does not help in my case. Dima > > > Csaba > -- > GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++ > The Tao of math: The numbers you can count are not the real numbers. > Life is complex, with real and imaginary parts. > "Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds > "People disagree with me. I just ignore them." -- Linus Torvalds > > -- > 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 > -- 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] 13+ messages in thread
* Re: Open URLs with # using cygstart.exe 2012-07-13 12:38 ` Dima Pasechnik @ 2012-07-13 13:03 ` Alexander Konovalov 2012-07-13 13:19 ` Ryan Johnson ` (3 more replies) 0 siblings, 4 replies; 13+ messages in thread From: Alexander Konovalov @ 2012-07-13 13:03 UTC (permalink / raw) To: Dima Pasechnik, rcsaba; +Cc: cygwin Hi Dima, Csaba, Thanks for replies. I am running 64-bit Windows 7, Cygwin 1.7.11 (2012-02-24). The default browser is Chrome, but I've tried with Firefox and InternetExplorer - same result whenever I'm using single quotes or not with each of the three browsers. Remote URLs indeed work fine. With the local URL address line of the browser contains truncated URL without '#...' part so maybe cygstart parses its argument differently dependently whether it starts with file:// or http://? Thanks, Alex On 13 Jul 2012, at 13:38, Dima Pasechnik wrote: > Hi Alex, > > On 13 July 2012 20:26, Csaba Raduly <rcsaba@gmail.com> wrote: >> On Fri, Jul 13, 2012 at 2:06 PM, Alexander Konovalov wrote: >>> Dear Cygwin experts, >>> >>> I am trying to open the exact location in the html file using my default >>> browser with the command of the form >>> >>> cygstart.exe file:///C:/somepath/doc/ref/chap31.html#X84F59A2687C62763 >>> >>> However, the anchor is ignored, so instead of going to the exact location >>> it opens the file and stays on the top of the page. >> >> Hi Alexander, >> >> You are doing better than me. For me, cygstart interprets the anchor >> as part of the filename. >> >> $ cygstart file:///www/pages/html401/sgml/dtd.html#inline >> Unable to start 'C:\cygwin17\www\pages\html401\sgml\dtd.html#inline': >> The specified file was not found. >> > > Same here. > Interestingly, it works just fine with the remote URL - it brings up > the page in the right place. > (OK, so here it's Windows 7 (32-bit) running Cygwin 1.7.15, and the > default browser is Firefox) > > >> Have you tried >> >> cygstart.exe 'file:///C:/somepath/doc/ref/chap31.html#X84F59A2687C62763' >> >> (note the single quotes) ? > > this does not help in my case. > > Dima > >> >> >> Csaba >> -- >> GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++ >> The Tao of math: The numbers you can count are not the real numbers. >> Life is complex, with real and imaginary parts. >> "Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds >> "People disagree with me. I just ignore them." -- Linus Torvalds >> >> -- >> 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 >> -- 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] 13+ messages in thread
* Re: Open URLs with # using cygstart.exe 2012-07-13 13:03 ` Alexander Konovalov @ 2012-07-13 13:19 ` Ryan Johnson 2012-07-13 13:21 ` Ryan Johnson 2012-07-13 14:45 ` Dima Pasechnik ` (2 subsequent siblings) 3 siblings, 1 reply; 13+ messages in thread From: Ryan Johnson @ 2012-07-13 13:19 UTC (permalink / raw) To: cygwin On 13/07/2012 9:02 AM, Alexander Konovalov wrote: > Thanks for replies. I am running 64-bit Windows 7, Cygwin 1.7.11 (2012-02-24). > The default browser is Chrome, but I've tried with Firefox and InternetExplorer - > same result whenever I'm using single quotes or not with each of the three > browsers. Remote URLs indeed work fine. With the local URL address line of the > browser contains truncated URL without '#...' part so maybe cygstart parses > its argument differently dependently whether it starts with file:// or http://? Just say no to http://cygwin.com/acronyms/#TOFU Also, you've got a fairly old version of cygwin there... Cygstart does not actually parse general URIs. For a long time it had a special case that tested explicitly for `http:', and recently added `mailto:' after a similar issue arose [1]. Ironically, most URIs seem to work precisely because cygstart *doesn't* know what to do with them and passes them along as-is, giving Windows a chance to do the right thing. [1] http://cygwin.com/ml/cygwin/2012-03/msg00810.html Ryan -- 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] 13+ messages in thread
* Re: Open URLs with # using cygstart.exe 2012-07-13 13:19 ` Ryan Johnson @ 2012-07-13 13:21 ` Ryan Johnson 2012-07-14 7:25 ` Dima Pasechnik 0 siblings, 1 reply; 13+ messages in thread From: Ryan Johnson @ 2012-07-13 13:21 UTC (permalink / raw) To: cygwin On 13/07/2012 9:19 AM, Ryan Johnson wrote: > Cygstart does not actually parse general URIs. For a long time it had > a special case that tested explicitly for `http:', and recently added > `mailto:' after a similar issue arose [1]. Ironically, most URIs seem > to work precisely because cygstart *doesn't* know what to do with them > and passes them along as-is, giving Windows a chance to do the right > thing. Actually, you can probably ignore this and go with what Adam posted... Ryan -- 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] 13+ messages in thread
* Re: Open URLs with # using cygstart.exe 2012-07-13 13:21 ` Ryan Johnson @ 2012-07-14 7:25 ` Dima Pasechnik 0 siblings, 0 replies; 13+ messages in thread From: Dima Pasechnik @ 2012-07-14 7:25 UTC (permalink / raw) To: cygwin, Alexander Konovalov Alex, On 13 July 2012 21:21, Ryan Johnson <ryan.johnson@cs.utoronto.ca> wrote: > On 13/07/2012 9:19 AM, Ryan Johnson wrote: >> >> Cygstart does not actually parse general URIs. For a long time it had a >> special case that tested explicitly for `http:', and recently added >> `mailto:' after a similar issue arose [1]. Ironically, most URIs seem to >> work precisely because cygstart *doesn't* know what to do with them and >> passes them along as-is, giving Windows a chance to do the right thing. > > Actually, you can probably ignore this and go with what Adam posted... At least you can use cygwin do find out the default browser to launch $ cat /proc/registry/HKEY_CURRENT_USER/Software/Classes/http/shell/open/command/@ "C:\Program Files\Mozilla Firefox\firefox.exe" -requestPending -osint -url "%1" $ You can use this info to create a script that would launch the browser with the argument file:///C:/somepath/doc/ref/chap31.htm#X84F59A2687C62763 (note that you might need to rename the files from .html to .htm) It should be doable, as at Windows command prompt the following works: C:\>"C:\Program Files\Mozilla Firefox\firefox.exe" file://C:/tmp/chap39.htm#X79C44528864044C5 HTH, Dima -- 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] 13+ messages in thread
* Re: Open URLs with # using cygstart.exe 2012-07-13 13:03 ` Alexander Konovalov 2012-07-13 13:19 ` Ryan Johnson @ 2012-07-13 14:45 ` Dima Pasechnik 2012-07-14 2:05 ` Andrey Repin 2012-07-14 2:38 ` Ken Brown 3 siblings, 0 replies; 13+ messages in thread From: Dima Pasechnik @ 2012-07-13 14:45 UTC (permalink / raw) To: Alexander Konovalov; +Cc: cygwin On 13 July 2012 21:02, Alexander Konovalov <alexk@mcs.st-and.ac.uk> wrote: > Hi Dima, Csaba, > > Thanks for replies. I am running 64-bit Windows 7, Cygwin 1.7.11 (2012-02-24). > The default browser is Chrome, but I've tried with Firefox and InternetExplorer - > same result whenever I'm using single quotes or not with each of the three > browsers. Remote URLs indeed work fine. With the local URL address line of the > browser contains truncated URL without '#...' part so maybe cygstart parses > its argument differently dependently whether it starts with file:// or http://? One can run a local webserver and talk to it via http. Given that the webserver might be a very lightweight one, it would not be much of an overhead. (Of course I know it would add a bit to the complexity of running GAP on Windows :)) Dima > > Thanks, > Alex > > > > On 13 Jul 2012, at 13:38, Dima Pasechnik wrote: > >> Hi Alex, >> >> On 13 July 2012 20:26, Csaba Raduly <rcsaba@gmail.com> wrote: >>> On Fri, Jul 13, 2012 at 2:06 PM, Alexander Konovalov wrote: >>>> Dear Cygwin experts, >>>> >>>> I am trying to open the exact location in the html file using my default >>>> browser with the command of the form >>>> >>>> cygstart.exe file:///C:/somepath/doc/ref/chap31.html#X84F59A2687C62763 >>>> >>>> However, the anchor is ignored, so instead of going to the exact location >>>> it opens the file and stays on the top of the page. >>> >>> Hi Alexander, >>> >>> You are doing better than me. For me, cygstart interprets the anchor >>> as part of the filename. >>> >>> $ cygstart file:///www/pages/html401/sgml/dtd.html#inline >>> Unable to start 'C:\cygwin17\www\pages\html401\sgml\dtd.html#inline': >>> The specified file was not found. >>> >> >> Same here. >> Interestingly, it works just fine with the remote URL - it brings up >> the page in the right place. >> (OK, so here it's Windows 7 (32-bit) running Cygwin 1.7.15, and the >> default browser is Firefox) >> >> >>> Have you tried >>> >>> cygstart.exe 'file:///C:/somepath/doc/ref/chap31.html#X84F59A2687C62763' >>> >>> (note the single quotes) ? >> >> this does not help in my case. >> >> Dima >> >>> >>> >>> Csaba >>> -- >>> GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++ >>> The Tao of math: The numbers you can count are not the real numbers. >>> Life is complex, with real and imaginary parts. >>> "Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds >>> "People disagree with me. I just ignore them." -- Linus Torvalds >>> >>> -- >>> 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 >>> > -- 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] 13+ messages in thread
* Re: Open URLs with # using cygstart.exe 2012-07-13 13:03 ` Alexander Konovalov 2012-07-13 13:19 ` Ryan Johnson 2012-07-13 14:45 ` Dima Pasechnik @ 2012-07-14 2:05 ` Andrey Repin 2012-07-14 2:38 ` Ken Brown 3 siblings, 0 replies; 13+ messages in thread From: Andrey Repin @ 2012-07-14 2:05 UTC (permalink / raw) To: Alexander Konovalov, cygwin Greetings, Alexander Konovalov! > Thanks for replies. I am running 64-bit Windows 7, Cygwin 1.7.11 (2012-02-24). > The default browser is Chrome, but I've tried with Firefox and InternetExplorer - > same result whenever I'm using single quotes or not with each of the three > browsers. Remote URLs indeed work fine. With the local URL address line of the > browser contains truncated URL without '#...' part so maybe cygstart parses > its argument differently dependently whether it starts with file:// or http://? Just check the command like the browser was started with to narrow down the possible source root of issue. Also, please don't top-post. -- WBR, Andrey Repin (anrdaemon@freemail.ru) 14.07.2012, <05:52> 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] 13+ messages in thread
* Re: Open URLs with # using cygstart.exe 2012-07-13 13:03 ` Alexander Konovalov ` (2 preceding siblings ...) 2012-07-14 2:05 ` Andrey Repin @ 2012-07-14 2:38 ` Ken Brown 3 siblings, 0 replies; 13+ messages in thread From: Ken Brown @ 2012-07-14 2:38 UTC (permalink / raw) To: cygwin On 7/13/2012 9:02 AM, Alexander Konovalov wrote: > so maybe cygstart parses > its argument differently dependently whether it starts with file:// or http://? That's correct. And before you waste too much time on this, you should make sure that you have the latest cygutils package installed. The behavior of cygstart with respect to file:// URLs changed starting with cygutils-1.4.10-1. See http://cygwin.com/ml/cygwin-announce/2012-04/msg00021.html and http://cygwin.com/ml/cygwin-apps/2012-03/msg00246.html . Ken -- 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] 13+ messages in thread
* RE: Open URLs with # using cygstart.exe 2012-07-13 12:06 Open URLs with # using cygstart.exe Alexander Konovalov 2012-07-13 12:27 ` Csaba Raduly @ 2012-07-13 13:14 ` Adam Dinwoodie 2012-07-13 15:33 ` Earnie Boyd 2 siblings, 0 replies; 13+ messages in thread From: Adam Dinwoodie @ 2012-07-13 13:14 UTC (permalink / raw) To: cygwin Alexander Konovalov wrote: >I am trying to open the exact location in the html file using my default- >browser with the command of the form > >cygstart.exe file:///C:/somepath/doc/ref/chap31.html#X84F59A2687C62763 > >However, the anchor is ignored, so instead of going to the exact location >it opens the file and stays on the top of the page. This is entirely a Windows issue. You'll get the same behaviour if you drop that string into a Windows Run dialog. I've no idea what the solution will be, but I very much doubt it'll be Cygwin- specific. Adam -- 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] 13+ messages in thread
* Re: Open URLs with # using cygstart.exe 2012-07-13 12:06 Open URLs with # using cygstart.exe Alexander Konovalov 2012-07-13 12:27 ` Csaba Raduly 2012-07-13 13:14 ` Adam Dinwoodie @ 2012-07-13 15:33 ` Earnie Boyd 2012-07-13 15:37 ` Eric Blake 2 siblings, 1 reply; 13+ messages in thread From: Earnie Boyd @ 2012-07-13 15:33 UTC (permalink / raw) To: cygwin On Fri, Jul 13, 2012 at 8:06 AM, Alexander Konovalov <alexk@mcs.st-and.ac.uk> wrote: > Dear Cygwin experts, > > I am trying to open the exact location in the html file using my default > browser with the command of the form > > cygstart.exe file:///C:/somepath/doc/ref/chap31.html#X84F59A2687C62763 > In POSIX shells # indicates to ignore the following as a comment. Quote the # as in \# to avoid it. -- Earnie -- https://sites.google.com/site/earnieboyd -- 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] 13+ messages in thread
* Re: Open URLs with # using cygstart.exe 2012-07-13 15:33 ` Earnie Boyd @ 2012-07-13 15:37 ` Eric Blake 0 siblings, 0 replies; 13+ messages in thread From: Eric Blake @ 2012-07-13 15:37 UTC (permalink / raw) To: cygwin [-- Attachment #1: Type: text/plain, Size: 738 bytes --] On 07/13/2012 09:33 AM, Earnie Boyd wrote: > On Fri, Jul 13, 2012 at 8:06 AM, Alexander Konovalov > <alexk@mcs.st-and.ac.uk> wrote: >> Dear Cygwin experts, >> >> I am trying to open the exact location in the html file using my default >> browser with the command of the form >> >> cygstart.exe file:///C:/somepath/doc/ref/chap31.html#X84F59A2687C62763 >> > > In POSIX shells # indicates to ignore the following as a comment. Only if it is the first character of a shell word. $ echo a#b #c a#b > Quote the # as in \# to avoid it. Won't help here; as # isn't the first character of the shell word. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 620 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2012-07-14 7:25 UTC | newest] Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2012-07-13 12:06 Open URLs with # using cygstart.exe Alexander Konovalov 2012-07-13 12:27 ` Csaba Raduly 2012-07-13 12:38 ` Dima Pasechnik 2012-07-13 13:03 ` Alexander Konovalov 2012-07-13 13:19 ` Ryan Johnson 2012-07-13 13:21 ` Ryan Johnson 2012-07-14 7:25 ` Dima Pasechnik 2012-07-13 14:45 ` Dima Pasechnik 2012-07-14 2:05 ` Andrey Repin 2012-07-14 2:38 ` Ken Brown 2012-07-13 13:14 ` Adam Dinwoodie 2012-07-13 15:33 ` Earnie Boyd 2012-07-13 15:37 ` Eric Blake
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).