Menu

#410 Setting -rmargin for specific file type

Unknown
closed-works-for-me
nobody
None
v4.1
5
2024-02-06
2021-02-20
Bob DeYoung
No

I have a UNIX shell account on PANIX. I use the JOE editor. They offer 3 versions of JOE that I can use. I recently switched from JOE 3.3 to 4.1 and now I am having an issue with setting the right margin (-rmargin xx) on specific file types. I have the following entries in my $HOME/.joerc file that work fine in 3.3 but they do not work in 4.1:

*.html
-rmargin 250

*mutt_aliases
-rmargin 250

*.aliases
-rmargin 120

*.mutt
-rmargin 80

In 4.1, every file I edit, has the right margin set to 80. For example, if I edit ~/.aliases, the right margin is set to 80. Same with any .html file. If I change the value of the *.mutt value of -rmargin from 80 to , let;s say, 100, then every file has a right margin of 100.

I have read some on the ftyperc file but I get an error when I include it. Is this ftyperc file the only way in 4.1 to get the right margin set for specific files?

Thanks!

Discussion

  • John J. Jordan

    John J. Jordan - 2021-05-08

    ftyperc had a breaking change in 4.1 and requires file definition lines to start with [type-name] so you could do something like this in your ~/.joerc:

    :include ftyperc
    
    [mutt_aliases]
    *mutt_aliases
    -rmargin 250
    
    [aliases]
    *.aliases
    -rmargin 120
    
    [mutt]
    *.mutt
    -rmargin 80
    
     HTML
    [html]
    *.htm
    *.html
    -wordwrap
    -autoindent
    -smarthome
    -smartbacks
    -syntax html
    -rmargin 120
    

    :include ftyperc is already in there, that line is for reference. HTML is redefined here because it was previously defined in ftyperc, so we need to copy all of the settings from the original. Since the format changed, make sure joe is looking up the correct one -- depending on how it was installed, it may find the old one, which would explain the error. You can download the ftyperc from that version from source control and place it at ~/.joe/ftyperc.

    And I should mention that configuration really needs an overhaul. Something hierarchical or version-tagged or scripted would be an improvement. Breaking changes have bitten a lot of users, and we're aware of that.

     

    Last edit: John J. Jordan 2021-05-08
  • John J. Jordan

    John J. Jordan - 2024-02-06
    • status: open --> closed-works-for-me
     
  • John J. Jordan

    John J. Jordan - 2024-02-06

    Report unrelated to -rmargin; user should fix ftyperc. We do need to fix configuration at some point but that is tracked elsewhere.

     

Log in to post a comment.

MongoDB Logo MongoDB