[emacs-w3m:13895] Re: [emacs-w3m/emacs-w3m] Change suspicious links warning customizable (Issue #115)
Boruch Baum <[email protected]> Tue, 15 Nov 2022 18:18:08 -0800
| Newsgroups | gmane.emacs.w3m |
|---|---|
| Message-ID | <emacs-w3m/emacs-w3m/issues/115/[email protected]> |
----==_mimepart_637448609b926_9adac670523a1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi. What value are you using for w3m-safe-url-regexp that you're getting=0D= such annoyances? If you don't want to share that information, I=0D understand it might be personal.=0D =0D On 2022-11-15 17:36, aaa70 wrote:=0D > Hi emacs-w3m contributers,=0D >=0D > Do you have a plan to make suspicious links warning customizable?=0D= > Actually, I'm using w3m on emacs mailer, sometimes a lot of =E2=9A=A0= =EF=B8=8F is a bit=0D > annoying.=0D >=0D > Here is my change:=0D >=0D > modified w3m.el=0D > @@ -2348,6 +2348,16 @@ Echo messages will be displayed no matter what t= his varia=0D > ble is unless=0D > :group 'w3m=0D > :type 'boolean)=0D >=0D > +(defcustom w3m-warning-propertize-function=0D > + (lambda (warning)=0D > + (if (display-graphic-p)=0D > + (propertize "=E2=9A=A0=EF=B8=8F" 'help-echo warning)=0D > + (propertize "=E2=96=B2!" 'help-echo warning=0D > + 'face '(:background "Yellow" :foregro= und "Blac=0D > k"))))=0D > + "Function used to propertize warn suspicious links"=0D > + :group 'w3m=0D > + :type 'function)=0D > +=0D > (defvar w3m-safe-url-regexp nil=0D > "Regexp matching urls which are considered to be safe.=0D > The nil value means all urls are considered to be safe.=0D > @@ -3584,12 +3594,7 @@ external `convert' program respectively."=0D > 'help-echo help=0D > 'keymap w3m-link-map))=0D > (when warning=0D > - (insert=0D > - (if (display-graphic-p)=0D > - (propertize "=E2=9A=A0=EF=B8=8F" 'help-echo warning)= =0D > - (propertize "=E2=96=B2!" 'help-echo warning=0D > - 'face=0D > - '(:background "Yellow" :foreground "Black"= )))))=0D > + (insert (funcall w3m-warning-propertize-function warning)= ))=0D > (and (w3m-handle-non-anchor-buttons) (not first)=0D > ;; Add a widget so `forward-button' and `widget-forwar= d'=0D > ;; work from outside of rendered area."=0D >=0D > Thanks,=0D >=0D > =E2=80=94=0D > Reply to this email directly, [1]view it on GitHub, or [2]unsubscrib= e.=0D > You are receiving this because you are subscribed to this thread.=0D= > Message ID: ***@***.***>=0D >=0D > References=0D >=0D > 1. https://github.com/emacs-w3m/emacs-w3m/issues/115=0D > 2. https://github.com/notifications/unsubscribe-auth/AAOE3KBUWA5VL6M= S2QEC5SDWIQ3CRANCNFSM6AAAAAASBTRZKE=0D =0D -- =0D hkp://keys.gnupg.net=0D CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0=0D =0D =0D -- =0D Reply to this email directly or view it on GitHub:=0D https://github.com/emacs-w3m/emacs-w3m/issues/115#issuecomment-1316192515= =0D You are receiving this because you are subscribed to this thread.=0D =0D Message ID: <emacs-w3m/emacs-w3m/issues/115/[email protected]>= ----==_mimepart_637448609b926_9adac670523a1 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <p></p>=0D Hi. What value are you using for w3m-safe-url-regexp that you're gett= ing<br>=0D such annoyances? If you don't want to share that information, I<br>=0D= understand it might be personal.<br>=0D <br>=0D On 2022-11-15 17:36, aaa70 wrote:<br>=0D > Hi emacs-w3m contributers,<br>=0D ><br>=0D > Do you have a plan to make suspicious links warning customizable?= <br>=0D > Actually, I'm using w3m on emacs mailer, sometimes a lot of =E2= =9A=A0=EF=B8=8F is a bit<br>=0D > annoying.<br>=0D ><br>=0D > Here is my change:<br>=0D ><br>=0D > modified w3m.el<br>=0D > @@ -2348,6 +2348,16 @@ Echo messages will be displayed no matter wha= t this varia<br>=0D > ble is unless<br>=0D > :group 'w3m<br>=0D > :type 'boolean)<br>=0D ><br>=0D > +(defcustom w3m-warning-propertize-function<br>=0D > + (lambda (warning)<br>=0D > + (if (display-graphic-p)<br>=0D > + (propertize "=E2=9A=A0=EF=B8=8F" 'help-echo w= arning)<br>=0D > + (propertize "=E2=96=B2!" 'help-echo warning<br>= =0D > + 'face '(:background "= Yellow" :foreground "Blac<br>=0D > k"))))<br>=0D > + "Function used to propertize warn suspicious links"<br>= =0D > + :group 'w3m<br>=0D > + :type 'function)<br>=0D > +<br>=0D > (defvar w3m-safe-url-regexp nil<br>=0D > "Regexp matching urls which are considered to be safe.<br>=0D= > The nil value means all urls are considered to be safe.<br>=0D > @@ -3584,12 +3594,7 @@ external `convert' program respectively.&= quot;<br>=0D > 'help-echo help<br>=0D= > 'keymap w3m-link-map)= )<br>=0D > (when warning<br>=0D > - (insert<br>=0D > - (if (display-graphic-p)<br>=0D > - (propertize "=E2=9A=A0=EF=B8=8F" 'h= elp-echo warning)<br>=0D > - (propertize "=E2=96=B2!" 'help-echo w= arning<br>=0D > - 'face<br>=0D > - '(:background "Yellow" :f= oreground "Black")))))<br>=0D > + (insert (funcall w3m-warning-propertize-function warni= ng)))<br>=0D > (and (w3m-handle-non-anchor-buttons) (not first)<br>=0D > ;; Add a widget so `forward-button' and `widget= -forward'<br>=0D > ;; work from outside of rendered area."<br>=0D= ><br>=0D > Thanks,<br>=0D ><br>=0D > =E2=80=94<br>=0D > Reply to this email directly, [1]view it on GitHub, or [2]unsubsc= ribe.<br>=0D > You are receiving this because you are subscribed to this thread.= <br>=0D > Message ID: ***@***.***><br>=0D ><br>=0D > References<br>=0D ><br>=0D > 1. https://github.com/emacs-w3m/emacs-w3m/issues/115<br>=0D > 2. https://github.com/notifications/unsubscribe-auth/AAOE3KBUWA5V= L6MS2QEC5SDWIQ3CRANCNFSM6AAAAAASBTRZKE<br>=0D <br>=0D -- <br>=0D hkp://keys.gnupg.net<br>=0D CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0<br>=0D =0D =0D <p style=3D"font-size:small;-webkit-text-size-adjust:none;color:#666;">&m= dash;<br />Reply to this email directly, <a href=3D"https://github.com/em= acs-w3m/emacs-w3m/issues/115#issuecomment-1316192515">view it on GitHub</= a>, or <a href=3D"https://github.com/notifications/unsubscribe-auth/ALIUP= NZB33L7663MO7JQMALWIQ76BANCNFSM6AAAAAASBTRZKE">unsubscribe</a>.<br />You = are receiving this because you are subscribed to this thread.<img src=3D"= https://github.com/notifications/beacon/ALIUPNZG5RK73N3UIIDBSITWIQ76BA5CN= FSM6AAAAAASBTRZKGWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5= UWJTSOOOAQG.gif" height=3D"1" width=3D"1" alt=3D"" /><span style=3D"color= : transparent; font-size: 0; display: none; visibility: hidden; overflow:= hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; ms= o-hide: all">Message ID: <span><emacs-w3m/emacs-w3m/issues/115/1316192= 515</span><span>@</span><span>github</span><span>.</span><span>com></s= pan></span></p>=0D <script type=3D"application/ld+json">[=0D {=0D "@context": "http://schema.org",=0D "@type": "EmailMessage",=0D "potentialAction": {=0D "@type": "ViewAction",=0D "target": "https://github.com/emacs-w3m/emacs-w3m/issues/115#issuecomment= -1316192515",=0D "url": "https://github.com/emacs-w3m/emacs-w3m/issues/115#issuecomment-13= 16192515",=0D "name": "View Issue"=0D },=0D "description": "View this Issue on GitHub",=0D "publisher": {=0D "@type": "Organization",=0D "name": "GitHub",=0D "url": "https://github.com"=0D }=0D }=0D ]</script>= ----==_mimepart_637448609b926_9adac670523a1--