Thread View: news.software.readers
8 messages
8 total messages
Started by Marcus Houlden
Mon, 24 Jan 2005 00:25
slrn - replacing ampersand on XP
Author: Marcus Houlden
Date: Mon, 24 Jan 2005 00:25
Date: Mon, 24 Jan 2005 00:25
18 lines
1801 bytes
1801 bytes
Bit of a fiddly one. I'm using slrn 0.9.7.0 on WinXP. If I press "U" in article mode to load a URL from the command line all works well provided the URL contains no ampersand characters (&). However, if a URL *does* contain ampersands, it doesn't work. The command interpreter on XP (CMD.EXE) treats ampersands as command separators and I have to escape them with ^ to tell it otherwise. The lines I have covering URLs in my slrn.rc are as follows: set non_Xbrowser "start %s" set Xbrowser "start %s" While I can enter the ^s manually, it can be easy to miss one & if it's a long URL. I'm guessing what I need is an S-Lang macro to replace all the & characters with ^& ones but my S-Lang isn't up to much. mh. -- Reply-to address *is* valid. "From" address is a blackhole.
Re: slrn - replacing ampersand on XP
Author: W. Citoan
Date: Mon, 24 Jan 2005 02:57
Date: Mon, 24 Jan 2005 02:57
23 lines
1920 bytes
1920 bytes
Marcus Houlden wrote: > Bit of a fiddly one. I'm using slrn 0.9.7.0 on WinXP. If I press "U" in > article mode to load a URL from the command line all works well provided the > URL contains no ampersand characters (&). However, if a URL *does* contain > ampersands, it doesn't work. The command interpreter on XP (CMD.EXE) treats > ampersands as command separators and I have to escape them with ^ to tell it > otherwise. The lines I have covering URLs in my slrn.rc are as follows: > > set non_Xbrowser "start %s" > set Xbrowser "start %s" > > While I can enter the ^s manually, it can be easy to miss one & if it's a > long URL. I'm guessing what I need is an S-Lang macro to replace all the & > characters with ^& ones but my S-Lang isn't up to much. set non_Xbrowser "start \"title\" \"%s\"" - W. Citoan -- ...the bravest are surely those who have the clearest vision of what is before them, glory and danger alike, and yet notwithstanding go out to meet it. -- Thucydides
Re: slrn - replacing ampersand on XP
Author: Blinky the Shark
Date: Mon, 24 Jan 2005 03:27
Date: Mon, 24 Jan 2005 03:27
25 lines
2092 bytes
2092 bytes
W. Citoan wrote: > Marcus Houlden wrote: >> Bit of a fiddly one. I'm using slrn 0.9.7.0 on WinXP. If I press "U" in >> article mode to load a URL from the command line all works well provided the >> URL contains no ampersand characters (&). However, if a URL *does* contain >> ampersands, it doesn't work. The command interpreter on XP (CMD.EXE) treats >> ampersands as command separators and I have to escape them with ^ to tell it >> otherwise. The lines I have covering URLs in my slrn.rc are as follows: >> set non_Xbrowser "start %s" >> set Xbrowser "start %s" >> While I can enter the ^s manually, it can be easy to miss one & if it's a >> long URL. I'm guessing what I need is an S-Lang macro to replace all the & >> characters with ^& ones but my S-Lang isn't up to much. > set non_Xbrowser "start \"title\" \"%s\"" How does that work, WRT the ampersand issue? -- Blinky Linux Registered User 297263 Upgrading From IE http://blinkynet.net/comp/upgrade.html Mozilla Firefox http://www.mozilla.org/products/firefox/
Re: slrn - replacing ampersand on XP
Author: Marcus Houlden
Date: Mon, 24 Jan 2005 17:32
Date: Mon, 24 Jan 2005 17:32
28 lines
2349 bytes
2349 bytes
On Mon, 24 Jan 2005 02:57:47 -0000, W. Citoan <wcitoan@NOSPAM-yahoo.com> wrote the following to news.software.readers: > Marcus Houlden wrote: >> Bit of a fiddly one. I'm using slrn 0.9.7.0 on WinXP. If I press "U" in >> article mode to load a URL from the command line all works well provided the >> URL contains no ampersand characters (&). However, if a URL *does* contain >> ampersands, it doesn't work. The command interpreter on XP (CMD.EXE) treats >> ampersands as command separators and I have to escape them with ^ to tell it >> otherwise. The lines I have covering URLs in my slrn.rc are as follows: >> >> set non_Xbrowser "start %s" >> set Xbrowser "start %s" >> >> While I can enter the ^s manually, it can be easy to miss one & if it's a >> long URL. I'm guessing what I need is an S-Lang macro to replace all the & >> characters with ^& ones but my S-Lang isn't up to much. > > set non_Xbrowser "start \"title\" \"%s\"" That's certainly a lot easier than the way I had in mind. Thanks for that. I found I needed to have \"title"\ otherwise XP just loads up a command prompt with the URL as the window title. mh. -- Reply-to address *is* valid. "From" address is a blackhole.
Re: slrn - replacing ampersand on XP
Author: W. Citoan
Date: Mon, 24 Jan 2005 21:53
Date: Mon, 24 Jan 2005 21:53
15 lines
1316 bytes
1316 bytes
Blinky the Shark wrote: > W. Citoan wrote: > > > set non_Xbrowser "start \"title\" \"%s\"" > > How does that work, WRT the ampersand issue? Perfectly... - W. Citoan -- ...the bravest are surely those who have the clearest vision of what is before them, glory and danger alike, and yet notwithstanding go out to meet it. -- Thucydides
Re: slrn - replacing ampersand on XP
Author: W. Citoan
Date: Mon, 24 Jan 2005 22:03
Date: Mon, 24 Jan 2005 22:03
21 lines
1745 bytes
1745 bytes
Marcus Houlden wrote: > On Mon, 24 Jan 2005 02:57:47 -0000, W. Citoan > <wcitoan@NOSPAM-yahoo.com> wrote the following to > news.software.readers: > > > > set non_Xbrowser "start \"title\" \"%s\"" > > That's certainly a lot easier than the way I had in mind. Thanks for > that. I found I needed to have \"title"\ otherwise XP just loads up a > command prompt with the URL as the window title. Yes, the \"title"\ part took me a while to figure out when I was first setting it up myself. The actual word doesn't matter, but it needs to have the title field there. - W. Citoan -- ...the bravest are surely those who have the clearest vision of what is before them, glory and danger alike, and yet notwithstanding go out to meet it. -- Thucydides
Re: slrn - replacing ampersand on XP
Author: Blinky the Shark
Date: Tue, 25 Jan 2005 04:03
Date: Tue, 25 Jan 2005 04:03
19 lines
1559 bytes
1559 bytes
W. Citoan wrote: > Blinky the Shark wrote: >> W. Citoan wrote: >> > set non_Xbrowser "start \"title\" \"%s\"" >> How does that work, WRT the ampersand issue? > Perfectly... Thanks for explaining it. -- Blinky Linux Registered User 297263 Upgrading From IE http://blinkynet.net/comp/upgrade.html Mozilla Firefox http://www.mozilla.org/products/firefox/
Re: slrn - replacing ampersand on XP
Author: W. Citoan
Date: Tue, 25 Jan 2005 12:19
Date: Tue, 25 Jan 2005 12:19
35 lines
2220 bytes
2220 bytes
Blinky the Shark wrote: > W. Citoan wrote: > > > Blinky the Shark wrote: > > >> W. Citoan wrote: > > >> > set non_Xbrowser "start \"title\" \"%s\"" > > >> How does that work, WRT the ampersand issue? > > > Perfectly... > > Thanks for explaining it. Eh? I thought you were asking "how" in the sense of "does that actually fix the problem the OP was describing." The quotes around %s cause start to pass the whole URL to the browser and not break it up at an ampersand. However, start will apparently interpret the first quotes it sees as text for the window title bar so you have to supply a title field first. The actually value there doesn't matter as it's not used. I use "title" simply as a reminder why that's there. The quotes are escaped (\") so that slrn will not think they are the end of the non_Xbrowser command and will instead pass them on to the start command. For more than that, see: help start in a command window. - W. Citoan -- We don't know one millionth of one percent about anything. -- Thomas A. Edison
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads