bugGNU TeXmacs - Bugs: bug #62487, Editing macros doesn't always...

 
 

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

bug #62487: Editing macros doesn't always activate them with the right arity

Submitter:  Jeroen Wouters <jeronim>
Submitted:  Wed 18 May 2022 08:59:01 AM UTC
 
Category:  None Priority:  5 - Normal
Item Group:  Error Status:  Fixed
Privacy:  Public Assigned to:  vdhoeven
Originator Name:  Open/Closed:  Closed
Release:  None Release:  2.1.1
Fixed Release:  None Fixed Release: 
Keywords: 

Mon 10 Oct 2022 07:50:59 PM UTC, comment #3: 

This is a subtle issue and not a bug, strictly speaking.

The point is that, within a style package, there is a difference between the editing environment while editing your package, and the changes to the environment that are caused when including your style package.

You may very well write a style package X that could be used jointly with two packages A, B that both define a certain macro F, but with different arities.  When selecting the package A as a style package for editing X, you will be able to use F with the arity from A.  But this does not mean that A gets automatically imported when importing X.  (For this, there is the use-package primitive.)

Still, I agree that it is handy to at least determine the right arities of the macros added by X when editing X.  I did the necessary in revision 13921, by adding all macros defined using 'assign' to the editing environment.

Joris van der Hoeven <vdhoeven>
Project Administrator
Mon 10 Oct 2022 05:31:39 PM UTC, comment #2: 

I made a mistake.

Joris van der Hoeven <vdhoeven>
Project Administrator
Mon 10 Oct 2022 05:28:31 PM UTC, comment #1: 

I applied a slightly modified version of your patch in revision 13920.  Please check that I did not make a silly mistake.

Joris van der Hoeven <vdhoeven>
Project Administrator
Wed 18 May 2022 08:59:01 AM UTC, original submission:  

It has been reported by user jonsterling on the forum that macros are not always activated with the correct number of arguments when editing in style files or preambles:

http://forum.texmacs.cn/t/editing-macros-in-an-extracted-style-file/941

For example, if a macro

<assign|con|<macro|x|<math|<math-ss|<arg|x>>>>>

is defined, typing "\con <RET>" normally puts the cursor inside the first argument of "<con| >". However, sometimes "<con>" is inserted, without arguments.

From my experimentation it seems that only a limited amount of macros defined at the start of a style file behave in the correct way.

Jeroen Wouters <jeronim>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #53227:  macros.ts added by jonsterling (8KiB - application/octet-stream - Here is a .ts file on which you can reproduce this issue.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by vdhoeven (Posted a comment)
  • -email is unavailable- added by jonsterling (Updated the item)
  • -email is unavailable- added by jeronim (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

     

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-10-10 vdhoeven StatusNone Fixed
        Open/ClosedOpen Closed
    2022-10-10 vdhoeven StatusFixed None
        Open/ClosedClosed Open
    2022-10-10 vdhoeven StatusNone Fixed
        Assigned toNone vdhoeven
        Open/ClosedOpen Closed
    2022-05-18 jonsterling Attached File- Added macros.ts, #53227

    Back to the top


    Powered by Savane 3.9