Why I cannot paste a symbol in symbol editor?

This may be a “Feature Request”
I can select a footprint in a PCB, then turn to the foorptint editor, create a new footprint and paste the pcb footprint in a new footprint.
Is there a reason why I cannot do the same in the symbol editor?
If I select a simbol in a schematic, turn to symbol editor, create a new symbol and paste, results in a text block with the internal rappresentation of the symbol.
Also using the command “Paste Symbol” results in an error.

Of course you can save all symbols in a new library from the schematics, and paste from there, but I think it should be also done as described, and as footprints can.

Any comment?
Regards.
Mau.

When you copy a symbol in the Schematic Editor, what’s copied is a reference to an instance of a symbol, not its full definition.
Pasting in the Symbol Editor tries to interpret this as if it’s symbol-definition data, but it isn’t. That’s why you end up with a block of raw text or an error.

I am not so sure about bidhohini’s remark, but I started experimented a bit. I already know that what’s actually copied to the clipboard is a bunch of lines of text. So I first verified the footprint thing and it works. as you describe. For the symbol, it did not work, also as you describe.

In the next step, I pasted both into a text editor. The footprint looks like:

(footprint "Inductor_THT:L_Axial_L7.0mm_D3.3mm_P10.16mm_Horizontal_Fastron_MICC" (version 20240108) (generator "pcbnew") (generator_version "8.0")
  (layer "F.Cu")
(uuid "b8537dd4-71c0-42c4-b7bf-e97cae5cdeae")
  (at 5.08 0 180)
  (descr "Inductor, Axial series, ...


    (scale (xyz 1 1 1))
    (rotate (xyz 0 0 0))
  )
)

and the symbol looks like:

(lib_symbols
  (symbol "Device:C" (pin_numbers hide) (pin_names (offset 0.254)) (exclude_from_sim no) (in_bom yes) (on_board yes)
    (property "Reference" "C" (at 0.635 2.54 0)
      (effects (font (size 1.27 1.27)) (justify left))
    )
    (property "Value" "C" (at 0.635 -2.54 0)
...

      (path ""
        (reference "C104") (unit 1)
      )
    )
  )
)

An obvious difference is that the footprint begins with: **(footprint ** while the symbol has an extra level of (lib_symbols … before the (symbol …, which is only on the second line.
In the next step I simply removed the lib_symbols … line in the text editor, and also the last closing parentheses to keep the S-expression syntax complete. And then it did paste into the symbol editor. As a result, I’m guessing this is a bug. This should probably be reported on gitlab (but first check whether a bug report for this already exists). I’m also still working with KiCad V8.0.9 myself, and it should be verified that the latest V9 still shows this behavior first.

It’s also a workflow I never used before, and I guess not many people do (or the bug would be discovered & reported long ago). Normally I first go to the properties window of a symbol, and then either press the Edit Symbol or the Edit Library Symbol button. This goes directly to the symbol editor, and with the symbol already loaded, on it’s default position. Once you’re in the symbol editor, you can save the symbol in another library / name.


Edit / Addition:

In the Symbol Editor, you can File / Save Copy As and then select a library and new symbol name. In the partially covered info bar (above the wiggly line) you can see I loaded this capacitor directly from the schematic.

I’m not certain that your workflow makes sense.
I’d do the following (as suggested by paulvdh) instead:
1: select symbol and open “Symbol properties” in the schematic editor
2: click “Edit library symbol”
3: select the symbol from the library list.
4: “Copy”
5: select the library (mostly the same) and “Paste symbol”
You’ll now have a new symbol with the same name plus “_1” at the end.

This applies to V8 and probably also to V6 and V7.

What I described is not a “normal” workflow …
but it happens, as an example, when you open someone else project and just find a footprint or symbol that you may want to keep for your own (future) projects and libraries.
In this case, copying from PCB works, while from schematics it does not.

Obviously there are many other ways to accomplish the same result, so not a problem and probably not really a bug …
I was just only curious why the behaviors are different.
Regards.

After clicking Symbol Properties → Edit Symbol…, you can use Export → Symbol… (which doesn’t require a library):