#602 Enhanced and noenhanced multiplot option

closed-accepted
nobody
None
5
2012-10-14
2012-10-14
No

I wanted to place a filename in the multiplot title that has an underscore. There was no way to escape the undescore so that it would be plotted correctly.

This patch inherits the enhanced/noenhanced option from the terminal and adds a enhanced/noenhanced option to the "set multiplot" command so the global option can be overridden. The documentation was changed too, to reflect the new option.

Discussion

  •  
    Attachments
  • Ethan Merritt
    Ethan Merritt
    2012-10-14

    OK, but a couple of things to note:

    - In general it is possible to escape underscores in a quoted string by prefixing a backslash. One backslash for single quotes, two for double quotes. E.g.
    set title "Keep\\_backslash"
    set title 'Keep\_backslash'
    If this doesn't work for you please file a bug report and be sure to say which gnuplot version and which terminal type. (I realize that this option doesn't help if the title string is passed through from somewhere else, so your patch is still needed).

    - I can see no sense in initializing to the current state of (term->flags & TERM_ENHANCED_TEXT), since that is a toggle whose state can be changed later. What exactly was the intent here?

     
  • This patchset has been closed because it is suspected to be obsolete. Possible reasons include

    (1) the patch no longer applies against current cvs
    (2) strong resistance was expressed during discussion
    (3) an equivalent capability has been added since the patch was submitted
    (4) we no longer remember or don't understand what the patch was intended to fix

    If this is your patchset and you think that it is still relevant, please re-submit a revised version against the current CVS source.

     
  • Hm, I tested with double quotes and only one slash. But using only single quotes does the trick.

    Regarding term->flags & TERM_ENHANCED_TEXT:
    I thought when the terminal is in enhanced mode this should be treated as a kind of global configuration for all settings that make use of enhanced/noenhance aka labels and titles.
    But maybe I didn't quite understand how this is meant.

     
  • Ethan Merritt
    Ethan Merritt
    2012-10-14

    • status: open --> closed-accepted
     
  • Ethan Merritt
    Ethan Merritt
    2012-10-14

    The TERM_ENHANCED_TEXT flag is an internal indicator of whether the current terminal is in enhanced text mode at this moment. It is useful, for example, if the code wants to estimate how much space will be required to print a string. But the user can toggle this flag at will via "set termoption {no}enhanced", so testing it in advance inside another "set ..." command doesn't make sense. The very next command executed might change its state.

    Anyhow - the new option is now in CVS for 4.6 and 4.7