Re: [Lynx-dev] copy URL to clipboard shortcut

2020-04-21 Thread Mouse
> I note that you used `xclip -i` and not `xclip -i -selection clipboard`. By $

It's not restricted to Linux (GNU or not) and BSD; that's true of X in
general.  See the ICCCM - PRIMARY and CLIPBOARD are entirely distinct
selections.

/~\ The ASCII Mouse
\ / Ribbon Campaign
 X  Against HTMLmo...@rodents-montreal.org
/ \ Email!   7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

___
Lynx-dev mailing list
Lynx-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lynx-dev


[Lynx-dev] copy URL to clipboard shortcut

2020-04-21 Thread russellbell

' since i'm often copy/paste URL for documention reason i need
them in the citation kontext and therefore bookmark page would be soon
overcrowed.'
Choose multiple bookmarks, make your clipboard one of them.

russell bell

___
Lynx-dev mailing list
Lynx-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lynx-dev


Re: [Lynx-dev] copy URL to clipboard shortcut

2020-04-21 Thread Fadi Barbàra
Hi s18,
On Tue, Apr 21, 2020 at 04:20:42AM +0530, s...@stof999.ch wrote:
> 
> choosing
> echo -n https://cmdt.ch/|xclip -i
> 
> is doing nothing (at least nothing in clipboard).
> wget for example is working.
> ???

I also saw your other email so I know you already installed `xclip`. 

I note that you used `xclip -i` and not `xclip -i -selection clipboard`. By 
default `xclip` write into the primary selection. There is a difference between 
primary selection and clipboard selection in GNU/Linux and BSD, so you should 
be explicit in which selection you use. I think the proble you are experiencing 
is because of that.
> 
> and where are the the other entries coming from (w3m, ...)?
Some externals are already inserted in the `lynx.cfg` file (should be in 
`/etc/lynx.cfg` in debian, but I am not sure about it). You can comment those 
lines if you do not want them. I did it because I like to have things separate.

note that there are also other kind of programs, such as VIEWERS, which are 
used to see files such as PDFs or PNGs. 
> 
> but this external things is greath!
> thanks a lot
You're welcome. Glad to have helped you!

BTW, be careful with EXTERNALS. Some security focused distributions, e.g. 
OpenBSD, compile lynx without them. It seems that it is a potential 
vulnerability. Unfortunately I do not know anything more about it (and I would 
be very glad if somebody in the list would say something about it), but I 
assume it is related to which program you use. E.g. `echo` is not a problem. Of 
course, I can be wrong about it.

Best,
disnocen

___
Lynx-dev mailing list
Lynx-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lynx-dev


Re: [Lynx-dev] copy URL to clipboard shortcut

2020-04-20 Thread s18
sorry

On 4/21/20 4:20 AM, s...@stof999.ch wrote:
> On 4/21/20 1:55 AM, Fadi Barbàra wrote:

> i added .lynx$ cat external
> EXTERNAL:http:echo -n %s|xclip -i:TRUE

xclip wasn't installed.
but after installing
there is still nothing in clipboard
???

thanks

___
Lynx-dev mailing list
Lynx-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lynx-dev


Re: [Lynx-dev] copy URL to clipboard shortcut

2020-04-20 Thread s18
On 4/21/20 1:55 AM, Fadi Barbàra wrote:
> Hi,
> I do not know what is the use case, but I assume something like:
> - you are in a page P
> - you want to copy the url of the page you are in
> - you want to paste that URL in an external application

exactly!

> 
> For that to work with external you need a file `$HOME/.lynx/external` in your 
> PC _if_ your lynx has been compiled with the option external.

i added .lynx$ cat external
EXTERNAL:http:echo -n %s|xclip -i:TRUE
EXTERNAL:http:wget %s:TRUE
EXTERNAL:http:mpv %s:TRUE
EXTERNAL:http:git clone %s:TRUE
EXTERNAL:http:links -g %s:TRUE
EXTERNAL:http:chrome %s:TRUE

and get with '.' in lynx

   w3m https://cmdt.ch/  │
 │ wget https://cmdt.ch/ │
 │ wget -r https://cmdt.ch/  │
 │ x-www-browser https://cmdt.ch/│
 │ echo -n https://cmdt.ch/|xclip -i │
 │ wget https://cmdt.ch/ │
 │ mpv https://cmdt.ch/  │
 │ git clone https://cmdt.ch/│
 │ links -g https://cmdt.ch/ │
 │ chrome https://cmdt.ch/

choosing
echo -n https://cmdt.ch/|xclip -i

is doing nothing (at least nothing in clipboard).
wget for example is working.
???

and where are the the other entries coming from (w3m, ...)?

but this external things is greath!
thanks a lot

___
Lynx-dev mailing list
Lynx-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lynx-dev


Re: [Lynx-dev] copy URL to clipboard shortcut

2020-04-20 Thread s18
On 4/20/20 11:43 PM, Ian Collier wrote:
> On Mon, Apr 20, 2020 at 08:46:42PM +0530, s...@stof999.ch wrote:
>> hi halaasz
>>> Well, one can assign a key to "TO_CLIPBOARD". I assign "S" to it.
>>> See the key-map, at first assigned to "k".
> 
>> i guess "TO_CLIPBOARD" is doing something with selected text?
> 
> No it is not; it is doing exactly what you asked for.

sorry
'^S' is assigned to TO_CLIPBOARD
but pressing ctrl+shift+s and paste it somewhere is filling
"TO_CLIPBOARD" [sic!]
not exactly what i like :)
???

___
Lynx-dev mailing list
Lynx-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lynx-dev


Re: [Lynx-dev] copy URL to clipboard shortcut

2020-04-20 Thread Thorsten Glaser
Ian Collier dixit:

>> Bad idea, I have a VT420 here which definitely needs this ;)

>But possibly not while you are using Lynx?

Why not?

I use mostly my laptop, but sit in front of one of the SPARCstations
occasionally. Why should I not use lynx then?

bye,
//mirabilos
-- 
[00:02]  gecko: benutzt du emacs ?
[00:03]  nö  [00:03]  nur n normalen mac
[00:04]  argl   [00:04]  ne den editor
-- Vutral und gecko2 in #deutsch (NB: Editor? Betriebssystem.)

___
Lynx-dev mailing list
Lynx-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lynx-dev


Re: [Lynx-dev] copy URL to clipboard shortcut

2020-04-20 Thread Ian Collier
On Mon, Apr 20, 2020 at 07:57:24PM +, Thorsten Glaser wrote:
> Ian Collier dixit:
> >stty stop undef

> Bad idea, I have a VT420 here which definitely needs this ;)

But possibly not while you are using Lynx?

imc

___
Lynx-dev mailing list
Lynx-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lynx-dev


Re: [Lynx-dev] copy URL to clipboard shortcut

2020-04-20 Thread Chuck Martin
I'm sorry, I accidentally sent this to the original poster instead of
the list.  My apologies.  I'm resending it to the list, in case others
may find the information useful.

On Mon, Apr 20, 2020 at 09:00:23PM +0530, s...@stof999.ch wrote:
> but since i'm often copy/paste URL for documention reason i need them in
> the citation kontext and therefore bookmark page would be soon overcrowed.
> and using '=', select URL, copy, concat takes about the same time.

What are you using to copy and paste?  If you're using gnu screen, you can
do the concatenation at the same time as the copy.  Just move the cursor
to the beginning of the URL and press "c" (without the quotes) to set the
first column, press "y" to "yank" the whole line, cursor down to hilight
all lines of the URL, then press "J" (shifted "j") to "join lines", then
either space or enter to finish the copy, and the lines will be copied as
one line.

Make sure you only press the "J" once, as it cycles between joining,
joining with blanks, joining with commas, and not joining.  Also, if for
some reason, spaces are hilighted at the end of a line, you may need to
press "C" (shifted "c") at the end of the line to set the last column,
but that doesn't usually happen.

If you're using tmux, you can do something similar, but you have to
concatenate the lines when you paste instead of when you copy.  For
example, you can use the "|" key to paste the paste buffer with all
lines concatenated with the following:

bind-key | paste-buffer -s ""

You'll need to do a "rectangle toggle" when you copy the URL to get
the same effect as the "c" and "C" keys in gnu screen.  The default
keys for this are "v" in vi mode, and "R" in emacs mode.

HTH.

Chuck

___
Lynx-dev mailing list
Lynx-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lynx-dev


Re: [Lynx-dev] copy URL to clipboard shortcut

2020-04-20 Thread Fadi Barbàra
Hi,
I do not know what is the use case, but I assume something like:
- you are in a page P
- you want to copy the url of the page you are in
- you want to paste that URL in an external application

For that to work with external you need a file `$HOME/.lynx/external` in your 
PC _if_ your lynx has been compiled with the option external.

I post here my externals file for example:

```
EXTERNAL:http:echo -n %s|xclip -i:TRUE
EXTERNAL:http:wget %s:TRUE
EXTERNAL:http:mpv %s:TRUE
EXTERNAL:http:git clone %s:TRUE
EXTERNAL:http:links -g %s:TRUE
EXTERNAL:http:chrome %s:TRUE

EXTERNAL:gopher:lynx -dump %s|urlview:TRUE
EXTERNAL:gopher:echo -n %s|xclip -i:TRUE
EXTERNAL:gopher:wget %s:TRUE

EXTERNAL:ftp:wget %s:TRUE
```

When you are in page P, you press ',' (default keybinding) and a pop up menu 
will appear with all the possible externals given the protocol. E.g. if you are 
in a http/https page you would see the options of the first group, i.e. from 
`echo` to `chrome`. if you select the `echo -n ...` option, it will copy the 
url of P into clipboard, no other actions needed. To paste it you have to use 
the shortcut of your terminal or application you want to paste that link into.

Note that you can use those externals also on the highlighted/selected link in 
a page, by pressing '.' instead of ',' .

Best,
Fadi

On Mon, Apr 20, 2020 at 08:43:33PM +0530, s...@stof999.ch wrote:
> hi fadi
> On 4/20/20 4:08 PM, Fadi Barbàra wrote:
> > Hi
> > On Mon, Apr 20, 2020 at 12:11:11PM +0530, s...@stof999.ch wrote:
> >> hi
> >> it would be greath to have a shortcut for copying the URL of the file
> >> currently viewing INTO clipboard.
> > Have you tried using externals? 
> > 
> > If you compiled enabling them (I think the debian version has it compiled 
> > that way by default) you can use a command like `echo %s|xclip -i 
> > -selection clipboard` as an external. 
> > 
> > External can be accessed via '.' and ',' by default.
> 
> do i understand it correct: the external command is doing something with
> selected text? select URL then '.'?
> if so, the problem isn't solved with long URL. when using 'G' the URL is
> truncated and can't be selected in whole.
> 
> or do i miss something?
> thanks
> 
> ___
> Lynx-dev mailing list
> Lynx-dev@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/lynx-dev

___
Lynx-dev mailing list
Lynx-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lynx-dev


Re: [Lynx-dev] copy URL to clipboard shortcut

2020-04-20 Thread Thorsten Glaser
Ian Collier dixit:

>stty stop undef

Bad idea, I have a VT420 here which definitely needs this ;)

Perhaps this could fix ^W though. *tries* No :-(
(If it had, I’d have asked for lynx to unspecial all keys it
binds, like mksh does.)

bye,
//mirabilos
-- 
18:47⎜ well channels… you see, I see everything in the
same window anyway  18:48⎜ i know, you have some kind of
telnet with automatic pong 18:48⎜ haha, yes :D
18:49⎜ though that's more tinyirc – sirc is more comfy

___
Lynx-dev mailing list
Lynx-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lynx-dev


Re: [Lynx-dev] copy URL to clipboard shortcut

2020-04-20 Thread Ian Collier
On Mon, Apr 20, 2020 at 07:26:18PM +, Thorsten Glaser wrote:
> Where did you find that? TO_CLIPBOARD isn't documented anywhere
> and we had a ton of people asking for this on IRC.

I grepped for 'clipboard' in all the docs (in /usr/share/doc/lynx)
and found it in the INSTALLATION file.

It is - ahem - under-documented, certainly.

> >executing Lynx.  If you are using an X11 system and have 'xclip'

> I guess xsel would also work, which is perhaps more common/known.

Meh - I hadn't heard of that, and it's not installed by default on
Fedora.  When I asked dnf what it was, it said:

XSel is a command line or script utility, similar to xclip, that can copy [etc]

> Whose bright idea was to use ^S for it anyway? 

Yes, that's an issue.

stty stop undef

imc

___
Lynx-dev mailing list
Lynx-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lynx-dev


Re: [Lynx-dev] copy URL to clipboard shortcut

2020-04-20 Thread Thorsten Glaser
Ian Collier dixit:

>Specifically, when you press the TO_CLIPBOARD key, it first asks
>you whether you want to save the URL of the current document or of
>the current link.  It then runs the command $RL_CLCOPY_CMD with the

Where did you find that? TO_CLIPBOARD isn’t documented anywhere
and we had a ton of people asking for this on IRC.

>executing Lynx.  If you are using an X11 system and have 'xclip'

I guess xsel would also work, which is perhaps more common/known.

You’d use…

export RL_CLCOPY_CMD='xsel -i'

… for the PRIMARY selection (“middle click”), and…

export RL_CLCOPY_CMD='xsel -i -p'

… for the CLIPBOARD (“Ctrl-V” or “Shift-Insert”).


>>On 4/20/20 7:35 PM, Halaasz Saandor via Lynx-dev wrote:

>>>Well, one can assign a key to "TO_CLIPBOARD". I assign "S" to it.

Whose bright idea was to use ^S for it anyway? Hm I guess the
clipboard would be builtin on Windows which wouldn’t use XOFF
either… probably there.

For the archives, you’ll need to add…

KEYMAP:S:TO_CLIPBOARD

… to your /etc/lynx.cfg for this.

bye,
//mirabilos
-- 
15:39⎜«mika:#grml» mira|AO: "mit XFree86® wär’ das nicht passiert" - muhaha
15:48⎜ also warum machen die xorg Jungs eigentlich alles
kaputt? :)15:49⎜ thkoehler: weil sie als Kinder nie den
gebauten Turm selber umschmeissen durften?  -- ~/.Xmodmap wonders…

___
Lynx-dev mailing list
Lynx-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lynx-dev


Re: [Lynx-dev] copy URL to clipboard shortcut

2020-04-20 Thread Ian Collier
On Mon, Apr 20, 2020 at 08:46:42PM +0530, s...@stof999.ch wrote:
> hi halaasz
> > Well, one can assign a key to "TO_CLIPBOARD". I assign "S" to it.
> > See the key-map, at first assigned to "k".

> i guess "TO_CLIPBOARD" is doing something with selected text?

No it is not; it is doing exactly what you asked for.

Specifically, when you press the TO_CLIPBOARD key, it first asks
you whether you want to save the URL of the current document or of
the current link.  It then runs the command $RL_CLCOPY_CMD with the
approrpiate URL on standard input.  This command is supposed to copy
the text to your clipboard, although it could do anything you want.

RL_CLCOPY_CMD is an environment variable that you can set before
executing Lynx.  If you are using an X11 system and have 'xclip'
installed on your system then

export RL_CLCOPY_CMD='xclip -i'

would be an appropriate setting to let Lynx copy URLs to the clipboard.

imc

___
Lynx-dev mailing list
Lynx-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lynx-dev


Re: [Lynx-dev] copy URL to clipboard shortcut

2020-04-20 Thread s18
hi russel
On 4/20/20 5:02 PM, russellb...@gmail.com wrote:
> 
>   I save links to my bookmark page, copy them from it.  It's
> also my start page.

it's an idea.
but since i'm often copy/paste URL for documention reason i need them in
the citation kontext and therefore bookmark page would be soon overcrowed.
and using '=', select URL, copy, concat takes about the same time.

so e.g. press 'S' and having the URL of the file
CURRENTLY VIEWING in the clipboard would be very easy :)

thanks

___
Lynx-dev mailing list
Lynx-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lynx-dev


Re: [Lynx-dev] copy URL to clipboard shortcut

2020-04-20 Thread s18
hi halaasz
On 4/20/20 7:35 PM, Halaasz Saandor via Lynx-dev wrote:
> 2020/04/20 02:41 ... s...@stof999.ch:
>> it would be greath to have a shortcut for copying the URL of the file
>> currently viewing INTO clipboard.
> 
> Well, one can assign a key to "TO_CLIPBOARD". I assign "S" to it.
> See the key-map, at first assigned to "k".

i guess "TO_CLIPBOARD" is doing something with selected text?
if so, the problem isn't solved with long URL. when using 'G' the URL is
truncated and can't be selected in whole.

or do i miss something?
thanks

___
Lynx-dev mailing list
Lynx-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lynx-dev


Re: [Lynx-dev] copy URL to clipboard shortcut

2020-04-20 Thread s18
hi fadi
On 4/20/20 4:08 PM, Fadi Barbàra wrote:
> Hi
> On Mon, Apr 20, 2020 at 12:11:11PM +0530, s...@stof999.ch wrote:
>> hi
>> it would be greath to have a shortcut for copying the URL of the file
>> currently viewing INTO clipboard.
> Have you tried using externals? 
> 
> If you compiled enabling them (I think the debian version has it compiled 
> that way by default) you can use a command like `echo %s|xclip -i -selection 
> clipboard` as an external. 
> 
> External can be accessed via '.' and ',' by default.

do i understand it correct: the external command is doing something with
selected text? select URL then '.'?
if so, the problem isn't solved with long URL. when using 'G' the URL is
truncated and can't be selected in whole.

or do i miss something?
thanks

___
Lynx-dev mailing list
Lynx-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lynx-dev


Re: [Lynx-dev] copy URL to clipboard shortcut

2020-04-20 Thread Halaasz Saandor via Lynx-dev

2020/04/20 02:41 ... s...@stof999.ch:

it would be greath to have a shortcut for copying the URL of the file
currently viewing INTO clipboard.


Well, one can assign a key to "TO_CLIPBOARD". I assign "S" to it.
See the key-map, at first assigned to "k".

___
Lynx-dev mailing list
Lynx-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lynx-dev


[Lynx-dev] copy URL to clipboard shortcut

2020-04-20 Thread russellbell

I save links to my bookmark page, copy them from it.  It's
also my start page.

russell bell

___
Lynx-dev mailing list
Lynx-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lynx-dev


Re: [Lynx-dev] copy URL to clipboard shortcut

2020-04-20 Thread Fadi Barbàra
Hi
On Mon, Apr 20, 2020 at 12:11:11PM +0530, s...@stof999.ch wrote:
> hi
> it would be greath to have a shortcut for copying the URL of the file
> currently viewing INTO clipboard.
Have you tried using externals? 

If you compiled enabling them (I think the debian version has it compiled that 
way by default) you can use a command like `echo %s|xclip -i -selection 
clipboard` as an external. 

External can be accessed via '.' and ',' by default.

Hope that helps!

Best,
disnocen

___
Lynx-dev mailing list
Lynx-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lynx-dev


[Lynx-dev] copy URL to clipboard shortcut

2020-04-20 Thread s18
hi
it would be greath to have a shortcut for copying the URL of the file
currently viewing INTO clipboard.

there are some solutions in the web which not work (debian, lxde,
lxterminal)
or could be improved when having long URLs:
- 'g' the whole URL can't be selected
- '=' (information about current document) shows URL. select and copy
works, but the url must be concated when to long.

and btw:
i'm more and more browsing just with lynx. fast AND NO PIC!
thanks a lot.

___
Lynx-dev mailing list
Lynx-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lynx-dev