Re: mc macro recording/editing issues
On Wed, 20 Sep 2017 12:28:02 +0300 Sergey Naumovwrote: > But I will try to use macro too. > In the code (usermenu.c: expand_format()) I see that despite mcedit manual > mentions %c, it is not actually supported. > Could I fix %c and also add %C as file offset (WEdit.buffer.curs1)? Should > I file a bug for it? No. usermenu.c isn't related to editor and editor macros. It is related to user menu (called via F2 in file namager or F11 in the editor). I can't confirm that recorded macro isn't stored in ~/.local/share/mc/mc.macros. It works for me. But ctrl-space. It is some special case. -- Andrew. ___ mc-devel mailing list https://mail.gnome.org/mailman/listinfo/mc-devel
Re: mc macro recording/editing issues
AFAIU the call chain is the following: {"ExecuteScript", CK_PipeBlock (0)} /* CK_PipeBlock */ edit_block_process_cmd() -> user_menu() -> user_menu_cmd() -> execute_menu_command() -> expand_format() Therefore format of .local/share/mc/mcedit/macros.d/macro.*.sh is the same as for usermenu entries - they are handled by the same code. Thanks, Sergey. 2017-09-20 12:40 GMT+03:00 Andrew Borodin: > On Wed, 20 Sep 2017 12:28:02 +0300 Sergey Naumov > wrote: > > But I will try to use macro too. > > In the code (usermenu.c: expand_format()) I see that despite mcedit > manual > > mentions %c, it is not actually supported. > > Could I fix %c and also add %C as file offset (WEdit.buffer.curs1)? > Should > > I file a bug for it? > > No. usermenu.c isn't related to editor and editor macros. It is related to > user menu > (called via F2 in file namager or F11 in the editor). > > I can't confirm that recorded macro isn't stored in > ~/.local/share/mc/mc.macros. > It works for me. But ctrl-space. It is some special case. > > -- > Andrew. > ___ mc-devel mailing list https://mail.gnome.org/mailman/listinfo/mc-devel
Re: mc macro recording/editing issues
Thanks, Yury. But I will try to use macro too. In the code (usermenu.c: expand_format()) I see that despite mcedit manual mentions %c, it is not actually supported. Could I fix %c and also add %C as file offset (WEdit.buffer.curs1)? Should I file a bug for it? Thanks, Sergey. 2017-09-19 20:16 GMT+03:00 Yury V. Zaytsev: > On Tue, 19 Sep 2017, Sergey Naumov wrote: > > Also is there a way for macros to get cursor position in a file in a form >> of offset from the beginning of the file? >> >> What I'm trying to achieve is to get some sort of autocompletion for >> golang using gocode, and it is done like this: >> > > I think you might get luckier with mcedit/etags integration, not sure if > there it anything etags-like for go, but if I were you, I'd rather look > into this... > > -- > Sincerely yours, > Yury V. Zaytsev > ___ mc-devel mailing list https://mail.gnome.org/mailman/listinfo/mc-devel