bugGNU TeXmacs - Bugs: bug #18404, ...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #18404: tm-convert.scm/format-default-suffix returns #<unspecified> instead of #f on no match

Submitted by:  Lionel Elie Mamane <lmamane>
Submitted on:  Wed 29 Nov 2006 09:54:08 AM UTC  
 
Category: ConversionPriority: 3 - Low
Item Group: ErrorStatus: Fixed
Privacy: PublicAssigned to: None
Originator Name: Open/Closed: Closed
Release: CVS HEADRelease: None
Fixed Release: NoneFixed Release: 
Keywords: 

Sat 18 Aug 2012 10:04:28 AM UTC, comment #2:

Actually, returning "" in format-default-suffix makes (if (and suf (!= suf "")) (string-append "." suf) "") return "" whenever the suffix wasn't found, so this seems fixed. => closed.

(However, the double check (and suf (!= suf "")) seems redundant ...)

Miguel de Benito <mdbenito>
Project Member
Mon 05 Mar 2012 11:54:27 PM UTC, comment #1:

Currently (SVN 4909) the referred function returns "" on no match, instead of #f as does the patch. Is this behaviour correct? What would break if we returned #f? In other words, is this still a bug?

Miguel de Benito <mdbenito>
Project Member
Wed 29 Nov 2006 09:54:08 AM UTC, original submission:

I'm defining a new converter, by giving converters between scheme-snippet and myformat-snippet. My converters are of the :shell type.

Hence, when pasting from MyFormat, converter-shell gets called, which sets suf to (format-default-suffix "schme-snippet") and then does (if (and suf (!= suf "")) (string-append "." suf) ""). That code expects suf to be #f on no match, but it is #<unspecified>, which is true when seen as boolean, and hence this code generates a Scheme error:

/opt/texmacs-cvs/share/TeXmacs/progs/kernel/texmacs/tm-convert.scm:134:41: In procedure string-append in expression (string-append "." suf):
/opt/texmacs-cvs/share/TeXmacs/progs/kernel/texmacs/tm-convert.scm:134:41: Wrong type argument (expecting STRINGP): #<unspecified>

Patch for format-default-suffix attached. I abandon any form of copyright I may have on such a trivial patch.

Lionel Elie Mamane <lmamane>

 

Attached Files
file #11400:  format-default-suffix.patch added by lmamane (472B - text/x-patch - Patch for format-default-suffix)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mdbenito (Posted a comment)
  • -unavailable- added by fbreuer (Updated the item)
  • -unavailable- added by lmamane (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 18 Aug 2012 10:04:28 AM UTCmdbenitoStatusNeed Info=>Fixed
      Open/ClosedAccepted=>Closed
    Mon 05 Mar 2012 11:54:27 PM UTCmdbenitoPriority5 - Normal=>3 - Low
      StatusFixed=>Need Info
    Mon 18 Dec 2006 07:24:57 PM UTCfbreuerOpen/ClosedOpen=>Accepted
    Thu 07 Dec 2006 09:27:28 PM UTCfbreuerStatusNone=>Fixed
    Wed 29 Nov 2006 09:54:08 AM UTClmamaneAttached File-=>Added format-default-suffix.patch, #11400

    Back to the top


    Powered by Savane 3.1-cleanup1