Loading ...
Sorry, an error occurred while loading the content.

quotes and fence matching

Expand Messages
  • Thomas Hundt
    Putting a single quote inside parentheses upsets the goto-matching-fence (and its complementary display) algorithm. I have fences set to always display, so,
    Message 1 of 5 , Oct 31, 2004
    • 0 Attachment
      Putting a single quote inside parentheses upsets the goto-matching-fence
      (and its complementary display) algorithm. I have fences set to always
      display, so, they come up in red when the cursor's on a fence whose mate
      can't be found.

      Examples:

      (this is a test) # okay
      (this is a test') # not found
      (this is a test'') # okay
      (this is a test") # not found
      (this is a test"") # okay

      This is all reasonable when editing code, but when typing English, it is
      not that useful:

      (why won't it work?) # not found

      Sometimes it does find a matching fence, way back in the file, and then
      from that one can't find the fence it just came from.

      It might be helpful if there were variables around this, the way we have
      them for the paragraph filling routines. $fill-mode, $fill-eos,
      $fill-ignore, etc. Right now the fences are hardcoded. (E.g., I can't
      set '<' and '>' to be fences. Fences are hardcoded to "[({})]" in
      dmf.emf.
      Also, I can't find any mention of quotes in this file. So I'm not even
      sure this is the right one. One of the help pages said fence matching
      was now implemented in macros.)
    • Steven Phillips
      This is a tough one, another equally valid example would be: (this is a test ( ) # okay Even in a text file, we implicitly know which bracket is matched to
      Message 2 of 5 , Nov 4, 2004
      • 0 Attachment
        This is a tough one, another equally valid example would be:

        (this is a test'(') # okay

        Even in a text file, we implicitly know which bracket is matched to which,
        unfortunately computers don't do implicit rules very well.

        dmf.emf is the right file, it defines which 'fences' it is going to hilight
        but uses the goto-matching-fence command to find it, it is this sub command
        that attempts to match the 's.

        I don't think this can be solved yet, but changes are afoot that may lead to a
        solution,

        Steve

        > Subject: [jasspa] quotes and fence matching
        > From: Thomas Hundt <thundt@...>
        > Date: Sunday, October 31, 2004, 10:54:03 PM
        > To: "JASSPA MicroEmacs Mailing List (W)" <jasspa@yahoogroups.com>

        > Putting a single quote inside parentheses upsets the goto-matching-fence
        > (and its complementary display) algorithm. I have fences set to always
        > display, so, they come up in red when the cursor's on a fence whose mate
        > can't be found.

        > Examples:

        > (this is a test) # okay
        > (this is a test') # not found
        > (this is a test'') # okay
        > (this is a test") # not found
        > (this is a test"") # okay

        > This is all reasonable when editing code, but when typing English, it is
        > not that useful:

        > (why won't it work?) # not found

        > Sometimes it does find a matching fence, way back in the file, and then
        > from that one can't find the fence it just came from.

        > It might be helpful if there were variables around this, the way we have
        > them for the paragraph filling routines. $fill-mode, $fill-eos,
        > $fill-ignore, etc. Right now the fences are hardcoded. (E.g., I can't
        > set '<' and '>' to be fences. Fences are hardcoded to "[({})]" in
        > dmf.emf.
        > Also, I can't find any mention of quotes in this file. So I'm not even
        > sure this is the right one. One of the help pages said fence matching
        > was now implemented in macros.)




        > __________________________________________________________________________

        > This is an unmoderated list. JASSPA is not responsible for the content of
        > any material posted to this list.

        > To unsubscribe, send a mail message to

        > mailto:jasspa-unsubscribe@yahoogroups.com

        > or visit http://groups.yahoo.com/group/jasspa and
        > modify your account settings manually.



        > Yahoo! Groups Links
      • Thomas Hundt
        Well for a quick fix, I would make dmf.emf take a variable to determine which fences to match, instead of having them hardcoded. I would then simply remove
        Message 3 of 5 , Nov 4, 2004
        • 0 Attachment
          Well for a quick fix, I would make dmf.emf take a variable to determine
          which fences to match, instead of having them hardcoded. I would then
          simply remove the apostrophe from the list (in mytxt.emf), for text
          files. And add brockets ('<' and '>') for HTML files. Etc. This seems
          like a five minute hack, if you know where to create the system variable
          (which I don't). (An open question is where goto-matching-fence gets
          its fence list from.)

          -Th



          > Even in a text file, we implicitly know which bracket is matched to which,
          > unfortunately computers don't do implicit rules very well.
          >
          > dmf.emf is the right file, it defines which 'fences' it is going to hilight
          > but uses the goto-matching-fence command to find it, it is this sub command
          > that attempts to match the 's.
          >
          > I don't think this can be solved yet, but changes are afoot that may lead to a
          > solution,
          >
          > Steve


          >>Putting a single quote inside parentheses upsets the goto-matching-fence
          >>(and its complementary display) algorithm.
          >
        • Phillips, Steven
          Alas if it where that simple, dmf does not try to match the s or s, it only tries to match (), [] & {}. but the built in goto-matching-fence command (using
          Message 4 of 5 , Nov 5, 2004
          • 0 Attachment
            Alas if it where that simple, dmf does not try to match the 's or "s, it only tries to match (), [] & {}. but the built in goto-matching-fence command (using by c indentation and other things) is the offender and has not configuration variable. So currently there is no 5 minute hack.

            As Jon has mentioned, we are currently looking into the indentation code and a solution to this issue may be got from here, but this will be a next release solution I think.

            Steve

            > -----Original Message-----
            > From: Thomas Hundt [mailto:thundt@...]
            > Sent: Friday, November 05, 2004 1:55 AM
            > To: jasspa@yahoogroups.com
            > Subject: Re: [jasspa] quotes and fence matching
            >
            >
            >
            > Well for a quick fix, I would make dmf.emf take a variable to
            > determine
            > which fences to match, instead of having them hardcoded. I would then
            > simply remove the apostrophe from the list (in mytxt.emf), for text
            > files. And add brockets ('<' and '>') for HTML files. Etc.
            > This seems
            > like a five minute hack, if you know where to create the
            > system variable
            > (which I don't). (An open question is where goto-matching-fence gets
            > its fence list from.)
            >
            > -Th
            >
            >
            >
            > > Even in a text file, we implicitly know which bracket is
            > matched to which,
            > > unfortunately computers don't do implicit rules very well.
            > >
            > > dmf.emf is the right file, it defines which 'fences' it is
            > going to hilight
            > > but uses the goto-matching-fence command to find it, it is
            > this sub command
            > > that attempts to match the 's.
            > >
            > > I don't think this can be solved yet, but changes are afoot
            > that may lead to a
            > > solution,
            > >
            > > Steve
            >
            >
            > >>Putting a single quote inside parentheses upsets the
            > goto-matching-fence
            > >>(and its complementary display) algorithm.
            > >
            >
            >
            >
            > ------------------------ Yahoo! Groups Sponsor
            > --------------------~-->
            > $9.95 domain names from Yahoo!. Register anything.
            > http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/89EolB/TM
            > --------------------------------------------------------------
            > ------~->
            >
            > ______________________________________________________________
            > ____________
            >
            > This is an unmoderated list. JASSPA is not responsible for
            > the content of
            > any material posted to this list.
            >
            > To unsubscribe, send a mail message to
            >
            > mailto:jasspa-unsubscribe@yahoogroups.com
            >
            > or visit http://groups.yahoo.com/group/jasspa and
            > modify your account settings manually.
            >
            >
            >
            > Yahoo! Groups Links
            >
            >
            >
            >
            >
            >
            >
            >
          • Pierre Gaston
            Actually this is not just a pb for text file, this might cause problems editing scheme or lisp code where quotation is done with a single and where matching
            Message 5 of 5 , Nov 5, 2004
            • 0 Attachment
              Actually this is not just a pb for text file, this might cause problems
              editing scheme or lisp code where quotation is done with a single ' and
              where matching () is somehow
              quite useful...

              Phillips, Steven wrote:

              >Alas if it where that simple, dmf does not try to match the 's or "s, it only tries to match (), [] & {}. but the built in goto-matching-fence command (using by c indentation and other things) is the offender and has not configuration variable. So currently there is no 5 minute hack.
              >
              >As Jon has mentioned, we are currently looking into the indentation code and a solution to this issue may be got from here, but this will be a next release solution I think.
              >
              >Steve
              >
              >
              >
              >>-----Original Message-----
              >>From: Thomas Hundt [mailto:thundt@...]
              >>Sent: Friday, November 05, 2004 1:55 AM
              >>To: jasspa@yahoogroups.com
              >>Subject: Re: [jasspa] quotes and fence matching
              >>
              >>
              >>
              >>Well for a quick fix, I would make dmf.emf take a variable to
              >>determine
              >>which fences to match, instead of having them hardcoded. I would then
              >>simply remove the apostrophe from the list (in mytxt.emf), for text
              >>files. And add brockets ('<' and '>') for HTML files. Etc.
              >>This seems
              >>like a five minute hack, if you know where to create the
              >>system variable
              >>(which I don't). (An open question is where goto-matching-fence gets
              >>its fence list from.)
              >>
              >>-Th
              >>
              >>
              >>
              >>
              >>
              >>>Even in a text file, we implicitly know which bracket is
              >>>
              >>>
              >>matched to which,
              >>
              >>
              >>>unfortunately computers don't do implicit rules very well.
              >>>
              >>>dmf.emf is the right file, it defines which 'fences' it is
              >>>
              >>>
              >>going to hilight
              >>
              >>
              >>>but uses the goto-matching-fence command to find it, it is
              >>>
              >>>
              >>this sub command
              >>
              >>
              >>>that attempts to match the 's.
              >>>
              >>>I don't think this can be solved yet, but changes are afoot
              >>>
              >>>
              >>that may lead to a
              >>
              >>
              >>>solution,
              >>>
              >>>Steve
              >>>
              >>>
              >>
              >>
              >>>>Putting a single quote inside parentheses upsets the
              >>>>
              >>>>
              >>goto-matching-fence
              >>
              >>
              >>>>(and its complementary display) algorithm.
              >>>>
              >>>>
              >>
              >>------------------------ Yahoo! Groups Sponsor
              >>--------------------~-->
              >>$9.95 domain names from Yahoo!. Register anything.
              >>http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/89EolB/TM
              >>--------------------------------------------------------------
              >>------~->
              >>
              >>______________________________________________________________
              >>____________
              >>
              >>This is an unmoderated list. JASSPA is not responsible for
              >>the content of
              >>any material posted to this list.
              >>
              >>To unsubscribe, send a mail message to
              >>
              >> mailto:jasspa-unsubscribe@yahoogroups.com
              >>
              >>or visit http://groups.yahoo.com/group/jasspa and
              >>modify your account settings manually.
              >>
              >>
              >>
              >>Yahoo! Groups Links
              >>
              >>
              >>
              >>
              >>
              >>
              >>
              >>
              >>
              >>
              >
              >
              >
              >__________________________________________________________________________
              >
              >This is an unmoderated list. JASSPA is not responsible for the content of
              >any material posted to this list.
              >
              >To unsubscribe, send a mail message to
              >
              > mailto:jasspa-unsubscribe@yahoogroups.com
              >
              >or visit http://groups.yahoo.com/group/jasspa and
              >modify your account settings manually.
              >
              >
              >
              >Yahoo! Groups Links
              >
              >
              >
              >
              >
              >
              >
              >
              >
              >
              >
            Your message has been successfully submitted and would be delivered to recipients shortly.