Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2024-02

What happened to code templates?

9 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

John Landmesser

Info:

Lazarus 3.99 (rev main_3_99-1527-gf3aa0586d9) FPC 3.2.2 x86_64-linux-gtk2

my old lazarus.dci contained for example

[sm | showmessage] ?ShowMessage('|');

I could use this template by

sm + Ctrl+j

Now i have in lazarus.dci

[sm | showmessage] [todo | ToDo item creator]

.. and there is no way how i can use that?!!

Clarification really needed!

John Landmesser

Reply by email

John Landmesser
to John Landmesser

Ok, i have to redefine my own code templates using the new? Makro edit box ?!

But why this change? I see no benefit.

Ok i am just a hobbyist using lazarus IDE !

mpf ...

John Landmesser

John Landmesser wrote 27 lines
Info: > Lazarus 3.99 (rev main_3_99-1527-gf3aa0586d9) FPC 3.2.2 > x86_64-linux-gtk2 my old lazarus.dci contained for example > [sm | showmessage] > ?ShowMessage('|'); I could use this template by sm + Ctrl+j Now i have in lazarus.dci > [sm | showmessage] > [todo | ToDo item creator] .. and there is no way how i can use that?!! Clarification really needed! John Landmesser

Reply by email

Juha Manninen
to John Landmesser

On Tue, Feb 27, 2024 at 7:45?PM John Landmesser via lazarus <

Show quoted text 8 lines
wrote: Now i have in lazarus.dci > [sm | showmessage] > [todo | ToDo item creator] .. and there is no way how i can use that?!!

First, "lazarus_dci_file.dci" was renamed to "codetemplates.dci". See https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/40657. I guess this is not related to your issue.

On Tue, Feb 27, 2024 at 8:15?PM John Landmesser via lazarus <

Show quoted text 7 lines
wrote: Ok, i have to redefine my own code templates using the new Makro edit box ?! But why this change? I see no benefit.

A new Makro edit box?
No, code templates are managed in Tools -> Code Templates ...

There was another change. Templates in the Ctrl-J list are now sorted and work as expected always.
https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/40764

I admit I have not added much templates myself. I have used the existing ones.
Maybe there is something in the common workflow that I don't know.

Juha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20240228/e0207e08/attachment.htm>

Reply by email

Martin Frb
to Juha Manninen
Juha Manninen wrote 13 lines
On Tue, Feb 27, 2024 at 7:45?PM John Landmesser via lazarus wrote: Now i have in lazarus.dci > [sm | showmessage] > [todo | ToDo item creator] .. and there is no way how i can use that?!! First, "lazarus_dci_file.dci" was renamed to "codetemplates.dci". See https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/40657. I guess this is not related to your issue.

Just to be sure, did you directly edit the lazarus.dci inside the ide folder in the lazarus install dir?

Because then, it would have stopped working.
If you edit via the IDE, then the modified file is saved in your PCP.

If the above is your issue copy the modified file to the PCP. -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20240228/dc568db1/attachment.htm>

Reply by email

Juha Manninen
to Martin Frb

On Wed, Feb 28, 2024 at 10:50?AM Martin Frb via lazarus <

Show quoted text 10 lines
wrote: Just to be sure, did you directly edit the lazarus.dci inside the ide folder in the lazarus install dir? Because then, it would have stopped working. If you edit via the IDE, then the modified file is saved in your PCP. If the above is your issue copy the modified file to the PCP.

Renaming "lazarus_dci_file.dci" to "codetemplates.dci" should not affect a file named "lazarus.dci".
I searched in my home dir if I have "lazarus.dci". It is found in a config dir for Lazarus 2.0. I don't remember creating such a file. How did it get there? I guess I don't know everything about the templates and their history.

Juha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20240228/0769b81f/attachment.htm>

Reply by email

John Landmesser
to Juha Manninen
Juha Manninen wrote 22 lines
On Wed, Feb 28, 2024 at 10:50?AM Martin Frb via lazarus wrote: Just to be sure, did you directly edit the lazarus.dci inside the ide folder in the lazarus install dir? Because then, it would have stopped working. If you edit via the IDE, then the modified file is saved in your PCP. If the above is your issue copy the modified file to the PCP. Renaming "lazarus_dci_file.dci" to "codetemplates.dci" should not affect a file named "lazarus.dci". I searched in my home dir if I have "lazarus.dci". It is found in a config dir for Lazarus 2.0. I don't remember creating such a file. How did it get there? I guess I don't know everything about the templates and their history. Juha

My lazarus.dci is very, very old !! Copied from Delphi, I don't remember!

I have only three(?) additions that i got working again ... so everything is fine with lazarus IDE ... as usual :-)

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20240228/267ff8a5/attachment.htm>

Reply by email

John Landmesser
to Juha Manninen: On Wed, Feb 28, 2024 at 10:50?AM Martin Frb via lazarus < Renaming "lazarus_dci_file.dci"…
Juha Manninen wrote 11 lines
Renaming "lazarus_dci_file.dci" to "codetemplates.dci" should not affect a file named "lazarus.dci". I searched in my home dir if I have "lazarus.dci". It is found in a config dir for Lazarus 2.0. I don't remember creating such a file. How did it get there? I guess I don't know everything about the templates and their history. Juha

Wondering about filenames you are talking about:

if i start my lazarus with new --pcp

lazarus --pcp=/home/john1/.lazarus-juha

I get these new config files including lazarus.dci

Show quoted text 27 lines
[]$ ls -lha insgesamt 540K drwxr-xr-x? 4 john1 john1????????????????? 4,0K 28. Feb 21:40 . drwx------ 97 john1 systemd-journal-upload 4,0K 28. Feb 21:41 .. -rw-r--r--? 1 john1 john1?????????????????? 803 28. Feb 21:40 codeexploreroptions.xml -rw-r--r--? 1 john1 john1?????????????????? 267 28. Feb 21:40 debuggeroptions.xml -rw-r--r--? 1 john1 john1?????????????????? 837 28. Feb 21:39 editoroptions.xml -rw-r--r--? 1 john1 john1?????????????????? 12K 28. Feb 21:40 environmentoptions.xml -rw-r--r--? 1 john1 john1????????????????? 466K 28. Feb 21:39 fpcdefines.xml -rw-r--r--? 1 john1 john1?????????????????? 115 28. Feb 21:40 includelinks.xml -rw-r--r--? 1 john1 john1?????????????????? 168 28. Feb 21:40 inputhistory.xml -rw-r--r--? 1 john1 john1?????????????????? 12K 28. Feb 21:39 jcfsettings.cfg -rw-r--r--? 1 john1 john1????????????????? 6,9K 28. Feb 21:40 lazarus.dci -rw-r--r--? 1 john1 john1????????????????? 1,2K 28. Feb 21:38 laz_indentation.pas drwxr-xr-x? 6 john1 john1????????????????? 4,0K 28. Feb 21:39 onlinepackagemanager drwxr-xr-x? 2 john1 john1????????????????? 4,0K 28. Feb 21:38 projectsessions

No codetemplates.dci ???

Info:

Lazarus 3.99 (rev main_3_99-1538-g642e3bac61) FPC 3.2.2 x86_64-linux-gtk2

Manjaro Linux XFCE

Hope these infos are usefull ?!!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20240228/995d9565/attachment-0001.htm>

Reply by email

Martin Frb
to John Landmesser
John Landmesser wrote 25 lines
Am 28.02.24 um 10:10 schrieb Juha Manninen via lazarus: > > Renaming "lazarus_dci_file.dci" to "codetemplates.dci" should not > affect a file named "lazarus.dci". > I searched in my home dir if I have "lazarus.dci". It is found in a > config dir for Lazarus 2.0. I don't remember creating such a file. > How did it get there? I guess I don't know everything about the > templates and their history. > > Juha > > Wondering about filenames you are talking about: if i start my lazarus with new --pcp lazarus --pcp=/home/john1/.lazarus-juha I get these new config files including lazarus.dci > -rw-r--r--? 1 john1 john1 6,9K 28. Feb 21:40 lazarus.dci > No codetemplates.dci ???

Afaik (from what I heard) the change only affects the file in the folder ide in your laz install. That was renamed.

The one in your PCP is as it always was => and that is where your own templates should also be stored.

For your original lazarus look into menu view > ide internals > about ide >> that should tell you where it has its pcp (usually ~/.lazarus)

-----
So then, the question is: are there entries in such a lazarus.dci file (in the pcp), that are not available in the IDE (not via ctrl-j / not in the codetemplate editor from the tool menu)?

If so, then report a bug, with a copy of the lazarus.dci attached. -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20240228/9eddae09/attachment.htm>

Reply by email