bugvile, a vi-compatible text editor - Bugs: bug #35288, Issue with %{__any expression__}...


bug #35288: Issue with %{__any expression__} in $modeline-format

Submitter:  None
Submitted:  Wed 11 Jan 2012 06:00:23 PM UTC
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup

Wed 08 Aug 2012 12:51:39 AM UTC, comment #4: 

fixed in 9.8h

Thomas Dickey <dickey>
Group administrator
Wed 11 Jan 2012 11:53:01 PM UTC, comment #3: 

thanks (sounds good).

Thomas Dickey <dickey>
Group administrator
Wed 11 Jan 2012 10:21:56 PM UTC, comment #2: 

(I am original poster) Not quite as simple; "%{&cat 'hello' ' world'}" displays 'hello world' (with the quotes), due to run_func() returning quoted result (via tb_enquote(&result) call [eval.c line 1543])...

Adam Denton <adenton>
Wed 11 Jan 2012 06:02:54 PM UTC, comment #1: 

(Forgot to mention....the source file is display.c)

Wed 11 Jan 2012 06:00:23 PM UTC, original submission:  

A problem in vile-9.8f prevents it from properly parsing %{...} in $modeline-format, unless it has the very-simple syntax of a single "token" with no arguments.

It is simple to repair so that you can say e.g.
    setv $modeline-format "%{&cat 'ignorecase is ' $ignorecase}"

FIX: Change the line in special_formatter() under case L_CURL
(in vile-9.8f it's line 3608:)
   [ORIG. LINE:]
      vl_strncpy(temp, tokval(temp), sizeof(temp));
      vl_strncpy(temp, tokval(tb_values(tok)), sizeof(temp));

That's it.  Now there can be full expressions between %{...}
(assuming OPT_EVAL is enabled).



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by dickey (Posted a comment)
  • -email is unavailable- added by adenton (Posted a comment)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.


    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-08-08 dickey StatusNone Fixed

    Back to the top

    Powered by Savane 3.13-b921.
    Corresponding source code