Re: vile source links

2022-10-23 Thread Wayne Cuddy via discussions concerning the vile text editor
On Fri, Oct 21, 2022 at 07:42:01PM -0400, Thomas Dickey wrote:
> On Fri, Oct 21, 2022 at 06:20:40PM +0000, Wayne Cuddy via discussions 
> concerning the vile text editor wrote:
> > On the vile download page:
> > 
> > https://www.invisible-island.net/vile/vile.html#download
> > 
> > The links for the source downloads:
> > 
> > https://www.invisible-island.net/archives/vile/vile.tar.gz
> > 
> > https://www.invisible-island.net/datafiles/release/vile.tar.gz
> > 
> > These both seem to point to the older 9.8 release instead of 9.8w. Is
> > this intentional?
> 
> sort of (the versioning with letter suffixes seems to be acceptable to
> everyone -- though I recall quite a while ago a packager refusing to
> do anything with vile unless it ended ".0" -- and I've seen no real
> need recently for a "stable release").
> 
> "current" is where you should look:
> 
> https://invisible-island.net/datafiles/current/vile.tar.gz
> https://invisible-island.net/archives/vile/current/vile.tar.gz
> https://invisible-island.net/archives/vile/current/
>

I totally ignored those links for some reason. Perhaps because they are
suffixed with (for installers).

I'll make a note of that.

Thanks.



vile source links

2022-10-21 Thread Wayne Cuddy via discussions concerning the vile text editor
On the vile download page:

https://www.invisible-island.net/vile/vile.html#download

The links for the source downloads:

https://www.invisible-island.net/archives/vile/vile.tar.gz

https://www.invisible-island.net/datafiles/release/vile.tar.gz

These both seem to point to the older 9.8 release instead of 9.8w. Is
this intentional?

Should I be using another link to access to latest source?



Re: sh-mode highlight issue

2022-01-31 Thread Wayne Cuddy via discussions concerning the vile text editor
On Sun, Jan 30, 2022 at 03:45:15PM -0500, Thomas Dickey wrote:
> On Sat, Jan 29, 2022 at 04:09:09PM -0500, Thomas Dickey wrote:
> > On Sat, Jan 29, 2022 at 07:51:53PM +0000, Wayne Cuddy via discussions 
> > concerning the vile text editor wrote:
> > > I'm not sure if this has been reported before, please forgive me if
> > > this is repetitious.
> > > 
> > > I'm running 9.8t and have not had a chance to upgrade to the
> > > latest/greatest yet but I don't see mention of this issue being
> > > corrected in the changelog. The closest I could find was comments from
> > > 9.7y:
> > > 
> > > + improve vile-sh-filt for these cases:
> > > + "${number}"
> > > + "$(commands)"
> > > + "$((expression))"
> > > + "${name#value}", etc.
> > > 
> > > 
> > > The issue concerns $((expression)) expansions in variable assignments,
> > > but may not be limited to just this case.
> > > 
> > > var="prefix$((5*5))suffix"
> >^ string
> > ^expression
> >  ^ string?
> > > 
> > > prefix appears correctly highlighted, suffix does not, it seems the
> > > syntax highlighting terminates after the final ')' character.
> > 
> > Just looking at the source, the line
> > 
> > {BACKTIC2_UP}{ handle_backtic2(yytext, yyleng, 
> > LEN_BACKTIC2_DOWN, 0); }
> > 
> > is probably what should trigger on the "))", which takes it into
> > 
> > if (FLTSTACK_OK && (which <= 0) && (FLTSTACK_THIS.backtic == test)) {
> > 
> > and fails there for some reason -- otherwise it would go back to the
> > string/literal coloring.
> > 
> > (I'm in the middle of ncurses, but may dig into it tomorrow to get a better
> > answer).
> 
> See attached
> 
> -- 
> Thomas E. Dickey 
> https://invisible-island.net
> ftp://ftp.invisible-island.net

> --- sh-filt.l 2021/12/12 01:26:53 1.183
> +++ sh-filt.l 2022/01/30 20:27:01
> @@ -70,6 +70,7 @@
>  static void handle_backtic2(const char *text, int length, int test, int 
> which);
>  static void handle_backtic1(const char *text, int length, int test, int 
> which);
>  static void handle_parens(const char *text, int length, int test, int which, 
> int state);
> +static void resume_state(void);
>  static void save_here(const char *text, int length);
>  static void write_vname(const char *text, int length);
>  
> @@ -198,8 +199,10 @@
>   FLEX_PRINTF((stderr, "cannot pop '$((' level %d\n", 
> stk_level));
>   if (!pop_backtic1(yytext, 1, LEN_BACKTIC1_DOWN)) {
> FLEX_PRINTF((stderr, "cannot pop '$(' level 
> %d\n", stk_level));
> -   if (FLTSTACK_OK && stk_state[stk_level-1].state 
> == NORMAL)
> +   if (FLTSTACK_OK && stk_state[stk_level-1].state 
> == NORMAL) {
>   pop_state();
> + resume_state();
> +   }
> flt_putc(R_PAREN);
>   }
>   unput(R_PAREN);
> @@ -213,8 +216,10 @@
>   }
>  {BACKTIC1_UP}{ if (!pop_backtic1(yytext, yyleng, 
> LEN_BACKTIC1_DOWN)) {
>   FLEX_PRINTF((stderr, "cannot pop '$(' level %d\n", 
> stk_level));
> - if (FLTSTACK_OK && stk_state[stk_level-1].state == 
> NORMAL)
> + if (FLTSTACK_OK && stk_state[stk_level-1].state == 
> NORMAL) {
> pop_state();
> +   resume_state();
> + }
>   ECHO;
> }
>   }
> @@ -293,6 +298,7 @@
>  "))"   {
> WriteToken(Action_attr); 
> pop_state();
> +   resume_state();
>   }
>  {IDENT1}   |
>  {VNAME}{ WriteToken(Ident_attr); }
> @@ -312,6 +318,7 @@
> flt_bfr_append("'", 1);
> flt_bfr_finish();
> pop_state();
> +   resume_state();
>   }
>  \\[0-7]{1,3}  {
> flt_bfr_embed(yytext, 1, Action_attr);
> @@ -874,6 +881,7 @@
>   flt_bfr_append(value + used, length - used);
>   flt_bfr_finish();
>   pop_state();
> + resume_state();
>   FreeAndNull(here_tag);
>   here_exp = 0;
>   here_next = 0;

I'll make time to upgrade and test this patch later this week and post
the results.

Many thanks as usual, 
Wayne



sh-mode highlight issue

2022-01-29 Thread Wayne Cuddy via discussions concerning the vile text editor
I'm not sure if this has been reported before, please forgive me if
this is repetitious.

I'm running 9.8t and have not had a chance to upgrade to the
latest/greatest yet but I don't see mention of this issue being
corrected in the changelog. The closest I could find was comments from
9.7y:

+ improve vile-sh-filt for these cases:
+ "${number}"
+ "$(commands)"
+ "$((expression))"
+ "${name#value}", etc.


The issue concerns $((expression)) expansions in variable assignments,
but may not be limited to just this case.

var="prefix$((5*5))suffix"

prefix appears correctly highlighted, suffix does not, it seems the
syntax highlighting terminates after the final ')' character.

Wayne 



Re: paste-from-clipboard vs register ;

2020-04-06 Thread Wayne Cuddy
On Fri, Apr 03, 2020 at 08:27:19PM +0200, Gary Jennejohn wrote:
> On Fri, 3 Apr 2020 15:45:42 +
> Wayne Cuddy  wrote:
> 
> > Using the latest xvile but I don't believe the version makes a
> > difference.
> > 
> > I know there is data in the clipboard.
> > 
> > If issue :paste-from-clibpard it works as expected.
> > 
> > Per the help doc.
> > 
> >The register name '.' contains the current selected text in xvile. Also 
> > in
> >xvile, the register name ';' is a synonym for the clipboard. Other
> >versions of vile permit use of '.' and ';' as supplemental register
> >storage.
> > 
> > However when data is in the clipboard and I do ";p I receive 'nothing
> > in register ;]'.
> > 
> 
> Right, '.'works but ';' does not.  So, it's either a bug in xvile or
> in the help doc.
> 
> -- 
> Gary Jennejohn
> 

'.' does not work either for me. I have something in the clipboard,
start xvile and attempt to paste from register '.' I receive a similar
message as for ';'.

[Nothing in register .]

Where as :paste-from-clipboard does work.

Thank you for the response. It's not an issue for me since creating a
binding, or using the defaults, for clipboard yank/put works fine.
Maybe a good time to update the documentation at some point.

Regards,
Wayne



paste-from-clipboard vs register ;

2020-04-03 Thread Wayne Cuddy
Using the latest xvile but I don't believe the version makes a
difference.

I know there is data in the clipboard.

If issue :paste-from-clibpard it works as expected.

Per the help doc.

   The register name '.' contains the current selected text in xvile. Also in
   xvile, the register name ';' is a synonym for the clipboard. Other
   versions of vile permit use of '.' and ';' as supplemental register
   storage.

However when data is in the clipboard and I do ";p I receive 'nothing
in register ;]'.

Wayne 



Re: [vile] FTP URL acting strange

2019-04-07 Thread Wayne Cuddy
On Sun, Apr 07, 2019 at 01:45:10PM -0400, Thomas Dickey wrote:
> 
> actually the person who pointed out the problem to me was trying
> to use wget - that didn't work, and nor do any of my browsers.
>  
> > Should I update the slackbuild with /pub inserted or is this temporary
> > situation.
> 
> Using an explicit "/pub" should work for some time :-)
> 
> -- 
> Thomas E. Dickey 
> https://invisible-island.net
> ftp://ftp.invisible-island.net

I'll update the Slackbuild.. thank you Tom.

___
vile mailing list
vile@nongnu.org
https://lists.nongnu.org/mailman/listinfo/vile


[vile] FTP URL acting strange

2019-04-07 Thread Wayne Cuddy
I maintain the slackbuild for vile, currently using rev 9.8s.

It's worked in the past for many years but something has recently
broken the FTP URL source path via curl.

Here is a build attempt that fails at the download phase:

root@snow:/tmp# slapt-src -i vile
The following packages will be installed:
 vile 
Do you want to continue? [y/N] y
Fetching README...Done
Fetching patches/sh-filt.patch...Done
Fetching slack-desc...Done
Fetching vile.SlackBuild...Done
Fetching vile.info...Done
Fetching
ftp://ftp.invisible-island.net/vile/current/vile-9.8s.tgz...Failed

Most of these tools use libcurl to acquire the source, here is curl run
with debug enabled:
root@snow:/tmp# curl -v -O 
'ftp://ftp.invisible-island.net/vile/current/vile-9.8t.tgz'
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 0* 
  Trying 216.194.196.78...
* TCP_NODELAY set
* Connected to ftp.invisible-island.net (216.194.196.78) port 21 (#0)
< 220 ProFTPD Server (ftp.invisible-island.net) [216.194.196.78]
> USER anonymous
< 331 Anonymous login ok, send your complete email address as your password
> PASS f...@example.com
< 230 Anonymous access granted, restrictions apply
> PWD
< 257 "/" is the current directory
* Entry path is '/'
> CWD vile
* ftp_perform ends with SECONDARY: 0
< 550 vile: No such file or directory
* Server denied you to change to the given directory
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 0
* Connection #0 to host ftp.invisible-island.net left intact
curl: (9) Server denied you to change to the given directory

Here is the same URL working with wget:
root@snow:/tmp# wget -d 
'ftp://ftp.invisible-island.net/vile/current/vile-9.8t.tgz'
DEBUG output created by Wget 1.20.3 on linux-gnu.

Reading HSTS entries from /root/.wget-hsts
Converted file name 'vile-9.8t.tgz' (UTF-8) -> 'vile-9.8t.tgz' (ISO-8859-1)
--2019-04-07 12:28:35--  
ftp://ftp.invisible-island.net/vile/current/vile-9.8t.tgz
   => 'vile-9.8t.tgz'
Resolving ftp.invisible-island.net... 216.194.196.78
Caching ftp.invisible-island.net => 216.194.196.78
Connecting to ftp.invisible-island.net|216.194.196.78|:21... connected.
Created socket 3.
Releasing 0x0096f610 (new refcount 1).
220 ProFTPD Server (ftp.invisible-island.net) [216.194.196.78]
Logging in as anonymous ...
--> USER anonymous

331 Anonymous login ok, send your complete email address as your password

--> PASS -wget@ 

230 Anonymous access granted, restrictions apply
Logged in!  
==> SYST ...
--> SYST

215 UNIX Type: L8
done.   
UNIX TYPE L8: I know it and I will use "LIST -a" as standard list command
==> PWD ... 
--> PWD 

257 "/" is the current directory
done.
==> TYPE I ...
--> TYPE I

200 Type set to I
done.  changing working directory
Prepended initial PWD to relative path:
   pwd: '/' 
   old: 'vile/current'
  new: '/vile/current'
==> CWD (1) /vile/current ...
--> CWD /vile/current

250 CWD command successful
done.   
==> SIZE vile-9.8t.tgz ...
--> SIZE vile-9.8t.tgz

213 2352119 
2352119 
conaddr is: 216.194.196.78
==> PASV ...
--> PASV

227 Entering Passive Mode (216,194,196,78,225,149).
trying to connect to 216.194.196.78 port 57749
Created socket 4.
done.==> RETR vile-9.8t.tgz ...
--> RETR vile-9.8t.tgz

150 Opening BINARY mode data connection for vile-9.8t.tgz (2352119 bytes)
done.   
Length: 2352119 (2.2M) (unauthoritative)

vile-9.8t.tgz  
100%[=>]   2.24M   450KB/s
in 5.1s

Closed fd 4 
226 Transfer complete
Closed fd 3 
2019-04-07 12:28:41 (452 KB/s) - 'vile-9.8t.tgz' saved [2352119]


The problem appears to permissions in the intial /vile directory?

Connected to ftp.invisible-island.net (216.194.196.78).
220 ProFTPD Server (ftp.invisible-island.net) [216.194.196.78]
Name (ftp.invisible-island.net:wcuddy): anonymous
331 Anonymous login ok, send your complete email address as your password
Password:
230 Anonymous access granted, restrictions apply
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> cd /vile
550 /vile: No such file or directory
ftp> cd /vile/current
250 CWD command successful

Looks like curl changes directories one at time but wget performs
the complete CD at once.

I can get curl to work inserting /pub into the URL:
ftp://ftp.invisible-island.net/pub/vile/current/vile-9.8t.tgz

Should I update the slackbuild with /pub inserted or is this temporary
situation.

Wayne

___
vile mailing list
vile@nongnu.org

[vile] multiline abbreviations, is it possible?

2019-01-20 Thread Wayne Cuddy


I tried:

:abb XXX line1^V^Mline2

But when I type XXX it simply outputs line1^V^Mline2 without
inserting a new line.

Thanks,
Wayne

___
vile mailing list
vile@nongnu.org
https://lists.nongnu.org/mailman/listinfo/vile


[vile] suffixes

2018-11-01 Thread Wayne Cuddy


How does one view or access which suffixes apply to the current major
mode without having to examine modes.rc?

Is it possible to add to suffixes that exist in modes.rc without having
to redefine them?

Wayne

___
vile mailing list
vile@nongnu.org
https://lists.nongnu.org/mailman/listinfo/vile


[vile] x11.c patch

2018-10-13 Thread Wayne Cuddy
When running xvile under the CTWM window manager CTWM does not assign
xvile the input (keyboard) focus. The window can be raised and lowered
but it will not receive the input focus after it is switched to another
window. I believe this is because the InputHint is being cleared in
x11.c:x_load_icon().

I propose the following patch:

1822c1822
<   hints->flags = IconPixmapHint;
---
>   hints->flags |= IconPixmapHint;


I've tested this against another window manager and it works fine with
xvile either way.  I assume that CTWM honors the XWMHints where it's
ignored by some other window managers.

Wayne

___
vile mailing list
vile@nongnu.org
https://lists.nongnu.org/mailman/listinfo/vile


Re: [vile] setv for buffer-local variables?

2017-11-24 Thread Wayne Cuddy
On Fri, Nov 24, 2017 at 04:02:32PM -0500, Thomas Dickey wrote:
> On Fri, Nov 24, 2017 at 01:59:56PM -0500, Wayne Cuddy wrote:
> > 
> > I have a procedure that toggles boolean variables using setv. The
> > problem with this is that setv seems to adjust that corresponding
> > variable in all buffers.  What is the equivalent setl in vile's macro
> > language?
> > 
> > This is the offending line:
> > setv  $1   %mode
> > 
> > Note the name of the variable is determined/evaluated at execution
> > time using   Replacing setv with setl does not work.
> > 
> > Or is there a way to build up a string and execute it... something
> > like sh's eval command?
> 
> yes - it's not pretty, but you can use  for concatenating strings.
> It would look something like this:
> 
>  eval  "setv "  $1 "  %mode"
> 
> it-would-be-nice-if-vile-implemented ""
>  
> > I see execute-string exists but it doesn't seem to be callable from
> > the macro language?
> 
> I use eval (execute-string) in this macro in vileinit.rc:
> 
> ; generalized from ToggleList, for any boolean mode
> store-procedure ToggleMode mode='Mode'
>   ~local %value
>   setv %value  $1
>   ~if  "TRUE" %value
>   eval  "setl no" $1
>   ~elseif  "FALSE" %value
>   eval  "setl " $1
>   ~else
>   write-message "Not a boolean mode"
>   ~endif
> ~endm
> 
> -- 

Exactly what I was looking for. Darn, I checked the help page and macros
file and didn't see anything about eval, though I forgot to check the
sample vileinit.rc. Is it documented somewhere or am I just blind in my
old age?

Thanks again,
Wayne 

___
vile mailing list
vile@nongnu.org
https://lists.nongnu.org/mailman/listinfo/vile


[vile] setv for buffer-local variables?

2017-11-24 Thread Wayne Cuddy

I have a procedure that toggles boolean variables using setv. The
problem with this is that setv seems to adjust that corresponding
variable in all buffers.  What is the equivalent setl in vile's macro
language?

This is the offending line:
setv  $1   %mode

Note the name of the variable is determined/evaluated at execution
time using   Replacing setv with setl does not work.

Or is there a way to build up a string and execute it... something
like sh's eval command?

I see execute-string exists but it doesn't seem to be callable from
the macro language?

What am I missing?

Wayne

___
vile mailing list
vile@nongnu.org
https://lists.nongnu.org/mailman/listinfo/vile


Re: [vile] ANN: vile-9.8s

2016-12-21 Thread Wayne Cuddy

On 12/18/2016 09:37 AM, j. van den hoff wrote:

thanks for explaining. I understand it's not easy, too :-). just out of
curiosity;

* why does it not happen with `[1A', too? because it thinks it's a hex
number?

* the problem with `proc 1g {return bla}' (showing the proc name as a
reserved word) is still a slightly different problem I guess? I concede
it's a stupid procedure name but tcl simply allows next to everything
(at least a lot) here ;-).

in any case it sure is not a big deal ...

On Sun, 18 Dec 2016 15:23:40 +0100, Thomas Dickey  wrote:


On Sun, Dec 18, 2016 at 01:20:26PM +0100, j. van den hoff wrote:

thanks a lot for the new version. regarding the (k)sh syntax filter
I can confirm that the reported problems are gone.


:-)


while testing a bit further I noted that there persists (a so far
seemingly unreported) minor glitch in the tcl syntax filter, it
seems:

I see strange spurious highlighting by reverse video in constructs like

[1G

(the `1G' shows up in reverse video (red in my case))

strangely this happens ony if _not_ in line one. even more strangely
it does also not happen in, e.g.,

[1A

I have encountered the problem when defining constants containing
escape sequences, e.g. like

set gobol  {^[[1G}


yes...  tcl is harder to parse reliably than it looks, since its
designers chose to use curly-braces to mean (from the user's point of
view) different things.  That makes it hard to parse with a lex-based
filter, since matching curly-braces has to be recursive - something
that lex can only approximate with a stack of different states.

For this chunk, my filter tries to see that as a regular expression
because of the "^", and then sees the doubled "[" and decides it can't
be that because the closing curly brace (and end of line) comes before
it finds a valid regex.  So it treats the "[" characters specially,
and falls into the "1G" not being a number.

Rather than showing it as an error, I could modify that to just
treat it as a literal (but the downside is that if it were meant
to be a regex, then it would have been an error).

I _could_ rewrite that in C (as I did for perl and ruby) and get
proper recursion...


to move cursor to beginning of line (^[ denoting escape (octal
033)). you can also see the problem with this silly example:

proc 1G {return bla}
puts [1G]


This case is a little different, but again, the leading "1" makes it
think that should be a number, but the "G" tells it that it's not.


note that the reverse video might only appear after deleting and
reinserting the line containing the `[1G' construct.
as an aside: in this example the proc name is furthermore
highlighted as a reserved word (like proc). maybe both problems are
related?

thanks for `vile'

joerg

On Sun, 18 Dec 2016 03:15:10 +0100, Thomas Dickey 
wrote:







And I thought I was the only one using TCL here :)

___
vile mailing list
vile@nongnu.org
https://lists.nongnu.org/mailman/listinfo/vile


[vile] print-prefixed-lines-til

2016-09-27 Thread Wayne Cuddy
Does a function exist like print-prefixed-lines-til that will not
prefix each line with the name of the source buffer?  All I'm after
are line numbers.

Wayne

___
vile mailing list
vile@nongnu.org
https://lists.nongnu.org/mailman/listinfo/vile


Re: [vile] load of 1 and 100% CPU (ncursesw vs ncurses)

2016-09-21 Thread Wayne Cuddy
Also... just to reiterate in case it wasn't clear this only happens when
linking with ncursesw not plain ncurses.

Wayne

On Sun, Sep 18, 2016 at 06:33:15PM -0400, Thomas Dickey wrote:
> On Fri, Sep 16, 2016 at 03:48:46PM -0400, Wayne Cuddy wrote:
> > When vile is linked against ncursesw, version 5.9 64-bit in this case, it
> > chews up the CPU when highlighting is enabled.
> > 
> > It's quite reproducible for me:
> > 
> > - start vile on any file which can be highlighted
> > - go into insert mode
> > - make any change to the file (simply moving the cursor does not
> > trigger the problem) but a single character change will
> > 
> > Leaving insert mode does not correct the problem.
> > 
> > It seems to be related to highlighter execution. Turning highlighting
> > off (set nohl) brings the load back down.
> > 
> > Using strace I can see that poll() is being executed with a timeout of
> > 0. According to the man page this causes poll to return immediately so
> > that explains the load.
> 
> Brendan sent me some more information, getting me to look at this chunk:
> 
>   if (acmilli != 0) {
>   timeout(acmilli);
>   for_ever {
>   result = getch();
>   if (result < 0) {
>   autocolor();
>   } else {
>   break;
>   }
>   }
>   } else {
>   nodelay(stdscr, FALSE);
>   result = getch();
>   }
> 
> A few months ago, I was working on the timeout code in ncurses - old bug - and
> may not have fixed it completely (but now I know where to look).
> 
> -- 
> Thomas E. Dickey <dic...@invisible-island.net>
> http://invisible-island.net
> ftp://invisible-island.net

___
vile mailing list
vile@nongnu.org
https://lists.nongnu.org/mailman/listinfo/vile