Number: 1846 Date: 15-Aug-84 14':31':59 Submitter: Sannella.PA Source: JonL.pa Subject: Dedit should be cleverer about whether a list to be formatted is code or not Assigned To: Attn: Sheil Status: Open In/By: Problem Type: Design - UI Impact: Annoying Difficulty: Moderate Frequency: Priority: Perhaps System: Programming Environment Subsystem: Code Editor Machine: Disk: Lisp Version: Source Files: Microcode Version: Memory Size: File Server: Server Software Version: Disposition: ' ["sheil" "12-Sep-84 18':41':25" Difficulty':(->Moderate)] Description: Date': 29 Jul 84 18':54 PDT' From': JonL.pa' Subject': Is this a new bug in DEdit? ...' To': Sheil' cc': JonL.pa,LispSupport' ' ... if so, I''ll submit an AR, but I''m not entirely sure what''s going on.' ' ' Frequently, I''ll select some expression which is "wrapped in QUOTE", and bug Reprint, simply to defeat the prettyprinter which thinks that anything quoted isn''t code (thereby failing to switch fonts properly on clisp words). But nowadays when I do this, DEdit first reprints the selection correctly, then amazlingly! immediately reprints it a second time wrongly. ' ' I find that if I use BQUOTE rather than QUOTE, then when the selection is the whole BQUOTE''d thing, it prints correctly (I made that change myself, because BQUOTE is almost always covering code; whereas QUOTE is only almost always covering non-code). Yet if the selection is the stuff under the BQUOTE, rather than the whole bananna, then the same wrong double-print behaviour as mentioned in the preceeding paragraph occurs.' ' -- JonL --' ' -----' ' Date': 30 Jul 84 13':39 PDT' From': Sheil.pa' Subject': Re': Is this a new bug in DEdit? ...' In-reply-to': JonL.pa''s message of 29 Jul 84 18':54 PDT' To': JonL.pa' cc': LispSupport.pa' ' A simple example of what you describe does not behave the way you say it does for me. If you can create a simple example, pls submit an AR on it.' ' Beau' ' -----' ' Date': 30 Jul 84 15':50 PDT' From': JonL.pa' Subject': Re': Is this a new bug in DEdit? ...' In-reply-to': Sheil.pa''s message of 30 Jul 84 13':39 PDT' To': Sheil.pa' cc': JonL.pa, LispSupport.pa' ' Here''s my best effort at isolating the relevant nits -- if you can reproduce it, then I''ll collect the two messages on the subject and submit an AR':' ' 1) do (SETQ DEditWIndow (CREATEW (create REGION ' LEFT ← 440' BOTTOM ← 340' WIDTH ← 540' HEIGHT ← 440)' "DEdit Window" NIL T))' ' 2) (LOADFROM ''{ERIS}<LISPCORE>SOURCES>LLCHAR)' ' 3) (EDITDEF ''INPNAME ''I.S.OPRS)' ' 4) change the BQUOTE to a QUOTE, and then select the "bind" expression and but Reprint on it. It should reprint the "bind" expression once correctly, then (apparently deciding that it didn''t fit somehow) will reprint the expressions from a higher level, thereby "seeing" the QUOTE around the "bind" expression and thus reprint the "bind" expression wrongly.' ' Try as I might, I couldn''t get it to happen with BQUOTE today, although it indeed happen so yesterday (but that was in a different, although still recent, sysout).' ' -- JonL --' ' -----' ' Date': 2 Aug 84 10':58 PDT' From': Sheil.pa' Subject': Re': Is this a new bug in DEdit? ...' In-reply-to': JonL.pa''s message of 31 Jul 84 18':45 PDT' To': JonL.pa' cc': LISPSUPPORT' ' Finally, the answer. No it is not a DEdit bug. The problem is that when the loop is reprinted as code rather than as list structure, not only do the fonts change but so does the formatting. The result is that the expression is printed flatter and so tends to be pushed over the right margin. DEdit''s heuristic here is to back up one level and try again (usually in this case the containing expression will break differently, allowing more pleasing output). However, this gets you into the scope of the QUOTE or BQUOTE again, so the list prints as a non-form again!' ' Perhaps the "non-formness" of lists should be decided by whether their CARs have defns, rather tha whether they are inside QUOTE etc.' ' The other bug is a well-known INSPECT/DEdit tangle. If you (SETQ FOO ((I.S.OPR (QUOTE INPNAME) ...] the value of FOO is INPNAME. Since that is not a list, DV calls INSPECT, who then calls EDITDEF as a process (who calls DEdit). Hence the intervening process (if you look closely, the edit is of INPNAME, not FOO). The TTY confusion that results is a special cazse of other TTY confusions still to be fixed.' ' Beau' ' -----' ' Date': 2 Aug 84 11':04 PDT' From': Sheil.pa' Subject': A small question of DEdit printing' To': LISPCORE↑' Reply-to': Sheil.pa' ' There are occasional complaints that quoted forms (in macro definitions, SUBSTS, etc) dont print right (because the special PP controls are disabled if not in form context). This can look especially crummy if the form has a lot of CLisp inside it and is an extra special nusiance if one is trying to edit that representation in DEdit.' ' Hence, I am wondering whether the "non-formness" of lists in DEdit printing should be decided by whether their CARs have defns (FNs, CLisp, etc), rather than whether they are inside QUOTE etc.' ' Not the most earth shattering issue, but any opinions?' ' Beau' ' ' Workaround: Test Case: Edit-By: sheil Edit-Date: 12-Sep-84 18':41':26