Re: Any missed features?
Hi. Are you still interested in the feature? I could implement it for 50Eur. On Mon, 15 Feb 2021 at 19:09, Michael Straube via mc wrote: > I would like to be able to connect to a sftp server that uses > two-factor-authentication. I need to first enter the one-time-password > and then the normal password. So It would be nice to tell mc to ask > for both passwords. > > If this is already possible then I failed to get it working. > > Michael > > Am 16.02.21 um 00:30 schrieb Sebastian Gniazdowski via mc: > > Hi, > > I'm going to have some free time in the upcoming few days, so I'm > > looking for an idea to work/code on, so I thought that I'll ask: are > > there any features missed in MC? > > > > -- > > Sebastian Gniazdowski > > > > > > ___ > > mc mailing list > > https://mail.gnome.org/mailman/listinfo/mc > > > ___ > mc mailing list > https://mail.gnome.org/mailman/listinfo/mc > -- Best regards, Sebastian Gniazdowski ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Re: Any missed features?
Hi. Are you still interested in the feature? I could implement it for 50Eur. On Mon, 15 Feb 2021 at 18:45, Marco via mc wrote: > On Mon, 15 Feb 2021 17:30:59 -0600 > Sebastian Gniazdowski via mc wrote: > > > I'm going to have some free time in the upcoming few days, so I'm > > looking for an idea to work/code on, so I thought that I'll ask: are > > there any features missed in MC? > > Filters currently only act on files, not on directories. > Implementing this would make them much more useful. > > https://mail.gnome.org/archives/mc/2020-July/msg0.html > > Marco > ___ > mc mailing list > https://mail.gnome.org/mailman/listinfo/mc > -- Best regards, Sebastian Gniazdowski ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Re: Any missed features?
Hi. Are you still interested in the feature? I could implement it for 50Eur. On Mon, 15 Feb 2021 at 18:22, bcurrey99 wrote: > For mc and mcedit the features I wish most for are > > I would like to be able to mark a number of files in mc and then press F3 > or F4 to open mcedit for all the marked ones would be a great enhancement. > Currently it will open the one its positioned on, but not the others. I > don't think that has been requested that I noticed. > > In mcedit I wish the files dialog box would list files and directories for > me to select some or even one to edit. There is an open issue requesting > this already. > > If any help is needed testing etc, I would be happy to... > > > > Sent from my Galaxy > > > ---- Original message > From: Sebastian Gniazdowski via mc > Date: 2/15/21 10:35 AM (GMT-06:00) > To: mc@gnome.org > Subject: Any missed features? > > Hi, > I'm going to have some free time in the upcoming few days, so I'm looking > for an idea to work/code on, so I thought that I'll ask: are there any > features missed in MC? > > -- > Sebastian Gniazdowski > > -- Best regards, Sebastian Gniazdowski ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Multiple patches with new functions for mcedit
Hi, I was coding my mcedit fork for some time and I've added c.a. 17 new functionalities to it. I've submitted all of them to upstream but all of them were rejected. So I thought of writing this email and offering them to anyone for $25 each. Here is the list of them, maybe you'll find something interesting? 1. Soft wraps - toggleable visual-only wrapping of lines that exceed the screen width. 2. Ack/Ag/Rg interface - a popup listing all matches allowing jumping to them. 3. Listing of objects (separate for functions, variables, types and all) from TAGS file allowing to jump to them. 4. Quick jumps to previous and next tag (to jump to preceding/following function). 5. Ctags completion - after indexing e.g.: GLib allows to complete all functions from it by entering g_, or functions from the project: 6. Remembering and restoration of last selections (marks). 7. Peek at prototype (ctrl-s, alt-? to jump to definition) - shows a small popup window with the prototype for function under cursor. 8. Slang scripting engine (plugins in ~/.config/mc/plugin, init script at …/mc/init.sl). Current plugins: - plugins/commentify.sl - toggles /*...*/ comment on current like, - plugins/grow_shrink_integer.sl - grows or decreases current number, - plugins/list-paragraphes.sl - lists all paragraphs and allows to jump to them, - plugins/read_file.sl - completes the file under cursor, e.g.: conf -> configure.ac, 10. Rich ExternalCommand window - new options and list of remembered commands: 11. Terminal window (called instruction station; ctrl-insert) - allows to run make, git, etc. 13. Fix WindowNext and …Prev to keep the order of windows unchanged. 14. Automatic grouping of headers and sources in the window list – headers precede their sources. 15. Window cascading (alt-ctrl-c) and tiling (alt-ctrl-t). 16. Centering of view (alt-c). 17. Periodic command (alt-shift-i) - a command that is executed every given number of seconds + number of keypresses. Good for regenerating TAGS file (it is reloaded automatically). -- Best regards, Sebastian Gniazdowski ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
a1, c1, etc. keys not recognized
Hi, the a1, c1 etc. keys are useful mappings to the keypad – the two point to digit 7 and 1, for example, if numlock is off. However, they aren't recognized – 7 is being read as home and 1 as end. Why is that? Is it because the keymap() function isn't being called? Or some equal slang function. It seems to me that this bug is hidden because the default mappings match the default meaning of the numpad keys (home,end,pgup,pgdown). -- Best regards, Sebastian Gniazdowski ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Triggering actions from outside?
I thought that it would be nice to trigger CK_EditNew and other actions when running a macro, or a usermenu entry. It can be done via signals (USR1), attached is a patch. For running from macros inside mc/mcedit, what's sufficient is to execute: mc --ck EditNew (because the pid is exported). For outside, one has to specify the pid via: MC_PID=1234 mc --ck EditNew. It works for mc and mcedit. What do you think? PS. A little video: asciinema.org/a/432747 -- Best regards, Sebastian Gniazdowski From 3c00732b6aa0818bd9589e6addaba09c35ac0186 Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Sun, 29 Aug 2021 08:58:37 +0200 Subject: Ability to trigger actions (eg. EditNew) from outside of mc/mcedit, via signals. --- src/Makefile.am | 1 + src/args.c| 9 ++ src/args.h| 1 + src/filemanager/panel.c | 4 + src/filemanager/panel.h | 1 + src/main.c| 19 ++- src/signal_ck_action.c| 153 ++ .../template.h => src/signal_ck_action.h | 9 +- 8 files changed, 192 insertions(+), 5 deletions(-) create mode 100644 src/signal_ck_action.c copy maint/templates/template.h => src/signal_ck_action.h (73%) diff --git a/src/Makefile.am b/src/Makefile.am index 2739ea3d2..8ce25aeea 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -68,6 +68,7 @@ mc_SOURCES = \ libinternal_la_SOURCES = \ $(SRC_mc_conssaver) \ + signal_ck_action.c signal_ck_action.h \ args.c args.h \ clipboard.c clipboard.h \ events_init.c events_init.h \ diff --git a/src/args.c b/src/args.c index 5b4b106eb..a6fd935f4 100644 --- a/src/args.c +++ b/src/args.c @@ -85,6 +85,9 @@ char *mc_run_param1 = NULL; /* If true, show version info and exit */ static gboolean mc_args__show_version = FALSE; +/* Name of the action to run on an outer mc session */ +char *mc_args__ck_action; + /* forward declarations */ static gboolean parse_mc_e_argument (const gchar * option_name, const gchar * value, gpointer data, GError ** mcerror); @@ -114,6 +117,12 @@ static const GOptionEntry argument_main_table[] = { NULL }, +{ + "ck", 'o', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_STRING, + _args__ck_action, + N_("Runs the given action on an outer mc session (to be used in scripts run from mc)"), + NULL +}, /* options for wrappers */ { "datadir", 'f', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, diff --git a/src/args.h b/src/args.h index 69b25ec16..75fa68053 100644 --- a/src/args.h +++ b/src/args.h @@ -18,6 +18,7 @@ typedef struct /*** global variables defined in .c file */ +extern char *mc_args__ck_action; extern gboolean mc_args__force_xterm; extern gboolean mc_args__nomouse; extern gboolean mc_args__force_colors; diff --git a/src/filemanager/panel.c b/src/filemanager/panel.c index e8f4032ca..13190d1d2 100644 --- a/src/filemanager/panel.c +++ b/src/filemanager/panel.c @@ -4217,6 +4217,10 @@ panel_dir_list_callback (dir_list_cb_state_t state, void *data) /* - */ /*** public functions / /* - */ +gboolean panel_widget_is_panel(const Widget *w) +{ +return (w != NULL && w->callback == panel_callback); +} void try_to_select (WPanel * panel, const char *name) diff --git a/src/filemanager/panel.h b/src/filemanager/panel.h index 05c8aa56d..c6ebc6a66 100644 --- a/src/filemanager/panel.h +++ b/src/filemanager/panel.h @@ -161,6 +161,7 @@ extern mc_fhl_t *mc_filehighlight; /*** declarations of public functions / +gboolean panel_widget_is_panel(const Widget *w); WPanel *panel_sized_empty_new (const char *panel_name, int y, int x, int lines, int cols); WPanel *panel_sized_with_dir_new (const char *panel_name, int y, int x, int lines, int cols, const vfs_path_t * vpath); diff --git a/src/main.c b/src/main.c index 2c25cc019..904399ebf 100644 --- a/src/main.c +++ b/src/main.c @@ -57,6 +57,8 @@ #include "lib/vfs/vfs.h"/* vfs_init(), vfs_shut() */ #include "lib/logging.h" +#include "signal_ck_action.h" + #include "filemanager/filemanager.h" #include "filemanager/treestore.h" /* tree_store_save */ #include "filemanager/layout.h" @@ -308,7 +310,7 @@ main (int argc, char *argv[]) char *env_loglevel_str; mc_global.run_from_parent_mc = !check_sid (); - +cksig_init_signal(); /* We had LC_CTYPE before, LC_ALL includs LC_TYPE as well */ #ifdef HAVE_SETLOCALE (void) setlocale (LC_ALL, ""); @@
Is it possible to bind Ctrl-g and Ctrl-Alt-o?
Hi, I'm having problems with binding Ctrl-g and Ctrl-Alt-o (in mcedit)… The combinations are good so it's hard to see them unbound. Did anyone had such problems and/or successfully bound those keys? To be exact, the problems are: - Ctrl-g ↔ no reaction at all, - Ctrl-Alt-o ↔ a very weird behavior: it works as if it were temporarily disabling Ctrl (until it is pressed again) and Alt. So it enters "o", and any other following letter key, because Ctrl isn't active till it is pressed again, so is Alt. I'm using xterm. -- Best regards, Sebastian Gniazdowski ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
How to bind Ctrl-]?
Hi, I want to bind Ctrl-] (i.e.: a right square bracket with control), however entering, e.g.: Quit = ctrl-] in mc.keymap.ini doesn't work. That's little weird, as the key is correctly inserted as " ^]" via Insert Literal or by cat -v. Does anyone know how to bind thit key? -- Best regards, Sebastian Gniazdowski ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Re: Do your mcedit freeze for a moment, especially at file save?
Yes, of course I'll disclose the bug. I only asked because I wanted to know that it isn't only me, that's all. Could someone confirm the issue? The bug is: lack of row increasing leading to infinite loop interruptible by a keypress only: │ --- a/src/editor/editdraw.c 16│ +++ b/src/editor/editdraw.c 17│ @@ -926,14 +926,15 @@ render_edit_text (WEdit * edit, long start_row, long start_column, long e 18│ upto = MIN (curs_row - 1, end_row); 19│ while (row <= upto) 20│ { 21│ if (key_pending (edit)) 22│ return; 23│ edit_draw_this_line (edit, b, row, start_column, end_column); 24│ b = edit_buffer_get_forward_offset (>buffer, b, 1, 0); 25│ +row += 1; 26│ } On Fri, 25 Jun 2021 at 11:03, Yury V. Zaytsev wrote: > So maybe you’d care to disclose what the bug was and how did you fix it? > There is a general problem with input parsing, which can lead to effects > like this, but there are no known mcedit specific bugs of such sort. > > Sent from my iPad > > On 25. Jun 2021, at 09:59, Sebastian Gniazdowski via mc > wrote: > > > Hi! > I think that I've found a bug in mcedit which is: at save the UI freezes > for 2…5 secs, and is likely to become quicker unlocked if one will bang > enter rapidly. I wonder if only I have been occurring this issue? After > fixing the bug in my fork it is much better now. > > -- > Best regards, > Sebastian Gniazdowski > > ___ > mc mailing list > https://mail.gnome.org/mailman/listinfo/mc > > -- Best regards, Sebastian Gniazdowski ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Do your mcedit freeze for a moment, especially at file save?
Hi! I think that I've found a bug in mcedit which is: at save the UI freezes for 2…5 secs, and is likely to become quicker unlocked if one will bang enter rapidly. I wonder if only I have been occurring this issue? After fixing the bug in my fork it is much better now. -- Best regards, Sebastian Gniazdowski ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Re: Do syntax definitions permit bold/italic/underline coloring/styling?
Found it in manual: one has to append "base" to not modify background color, and then eg. "bold". On 20/06/2021, Sebastian Gniazdowski wrote: > Hi, > I've tried appending the style like it works for theme files, ie.: > > keyword whole case color227;;bold+italic > > However the keyword "case" is drawn with black color. Grepping for > "bold" in syntax/ yields empty result. So it seems that it's not > possible to apply the styles in syntax coloring? > > -- > Sebastian Gniazdowski > -- Sebastian Gniazdowski ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Do syntax definitions permit bold/italic/underline coloring/styling?
Hi, I've tried appending the style like it works for theme files, ie.: keyword whole case color227;;bold+italic However the keyword "case" is drawn with black color. Grepping for "bold" in syntax/ yields empty result. So it seems that it's not possible to apply the styles in syntax coloring? -- Sebastian Gniazdowski ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Re: NeoMCEdit fork with many new extensions
Ok, I'll make a binary and attach the source code. Thanks for pointing this out. śr., 16 cze 2021, 00:53 użytkownik slava zanko napisał: > You can't sell GPL-sources at all. No benefits can be an excuse. You may > sell compiled bytecode (executable files) but you must(MUST!) distribute > source code for free ('free' means paymentless). > Selling GPL sources violates GPL license. > > вт, 15 июн. 2021 г. в 21:07, Sebastian Gniazdowski via mc : > >> Hi, >> I would like to share info about availability of a MC fork – >> at neomcedit DOT software. There are many unique features added, >> you might want to check it out. >> >> As for the possible questions: >> >> - Why aren't you sending patches to upstream? >> >> I was, for ca.: 4 months, however all my feature-patches have been >> rejected. >> >> - Why are you sending the info here? >> >> Because there are many people on the list interested with anything >> that is connected with MC, who may get inspired to work on upstream >> sources or which may get neomcedit. >> >> -- >> Sebastian Gniazdowski >> >> ___ >> mc mailing list >> https://mail.gnome.org/mailman/listinfo/mc >> > ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
NeoMCEdit fork with many new extensions
Hi, I would like to share info about availability of a MC fork – at neomcedit DOT software. There are many unique features added, you might want to check it out. As for the possible questions: - Why aren't you sending patches to upstream? I was, for ca.: 4 months, however all my feature-patches have been rejected. - Why are you sending the info here? Because there are many people on the list interested with anything that is connected with MC, who may get inspired to work on upstream sources or which may get neomcedit. -- Sebastian Gniazdowski ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
What are c1, a1 in keymap?
Hi, I'm seeing such keys in keymap, e.g.: {"Top", "home; alt-lt; a1"}, {"Bottom", "end; alt-gt; c1"}, I wonder what are they? -- Sebastian Gniazdowski ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Neo-mc(edit), a special features rich MC(Edit) fork
Hi, I would like to announce availability of Neo-MC fork of MIdnight Commander ( https://github.com/neo-mc/neo-mc). It has following example features: 1. Scripting support A very light but functional scripting interpreter in MCEdit: https://asciinema.org/a/395648 2. Quick jumps to tags generated by ctags Alt-\ and Alt-Shift-\ to go to next/prev tag, and Alt-* to directly jump to file and line of declaration tag of word under pointer: https://asciinema.org/a/395637 3. QuickPreview popup window After a ctags command / jump, a small window with an overview of surrounding tags is displayed: https://asciinema.org/a/395624 4. Automatic regeneration and reload of CTags symbols The TAGS file can be set up to date by PeriodicCommand function and automatic tags reloading: https://asciinema.org/a/395644 5. MultiSearch grepping of any listbox An additional input is added under every listbox which can be used to filter its list. It works with ALL listboxes, e.g.: https://asciinema.org/a/395632 -- Sebastian Gniazdowski ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Re: Any missed features?
On Mon, 15 Feb 2021 at 11:41, Andrew Borodin wrote: > Everybody wants to implement features, even that features will not be used > by 99% users. > Nobody wants to fix bugs. > What bugs are there to fix? I might try to fix one or two. PS. I hope that features that I'll implement will be used by more than 1% people. -- Sebastian Gniazdowski ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Any missed features?
Hi, I'm going to have some free time in the upcoming few days, so I'm looking for an idea to work/code on, so I thought that I'll ask: are there any features missed in MC? -- Sebastian Gniazdowski ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Is there something like feedkeys()?
Hi, on Vim there's feedkeys() function that simulates series of keypresses like if they've been typed by a user, so e.g.: feedkeys(":wq\") exits the editor. Is there maybe something similar in MC's codebase? -- Sebastian Gniazdowski ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Re: mcedit: Is there a way to tell mcedit to start in window mode instead of full screen?
Hi, the options for a cascade (-w/--cascade) and tiling (-T/--tile) arrangement are implemented in https://midnight-commander.org/ticket/4184 patch. Also, menu entries (in Window submenu) are added. You can test the patch, if you like, it would help. On Sat, 16 Jan 2021 at 10:10, bcurrey99 wrote: > The cascading windows is a very nice idea because you could see all of the > files that were opened. > > But if that is too difficult, dividing the screen into two rows of tiled > windows (maximum 6 or 8) would be reasonable . > > Thanks much for your better idea. > Bob Currey > > > Sent from my Galaxy > > > ---- Original message ---- > From: Sebastian Gniazdowski via mc > Date: 1/16/21 9:13 AM (GMT-06:00) > To: mc@gnome.org > Subject: Re: mcedit: Is there a way to tell mcedit to start in window mode > instead of full screen? > > (I'm replying to the list this time, just ensuring that it's not missed) > > Can I ask for clarification: > - when an option, -w for example, will be given, > - then mc should start with the file's window in windowed (not fullscreen > mode), > - for multiple files, possibly arranged the windows in e.g.: cascading way, > ? > > I think that this would involve first creating a CK_WindowCascade action > that would arrange the windows (first exiting fullscreen if needed). > > On Fri, 15 Jan 2021 at 14:32, Bob Currey via mc wrote: > >> I looked on the --help screen but didn't see an option to open in window >> mode >> >> $ mcedit --help >> Usage: >> mcedit [OPTION…] [+lineno] file1[:lineno] [file2[:lineno]...] >> >> >> GNU Midnight Commander 4.8.25-154-g33c84e75e >> >> >> Help Options: >> -h, --helpShow help options >> --help-allShow all help options >> --help-terminal Terminal options >> --help-color Color options >> >> Application Options: >> -V, --version Displays the current version >> -f, --datadir Print data directory >> -F, --datadir-infoPrint extended info about used data >> directories >> --configure-options Print configure options >> -P, --printwd= Print last working directory to specified file >> -U, --subshellEnables subshell support (default) >> -u, --nosubshell Disables subshell support >> -l, --ftplog= Log ftp dialog to specified file >> -v, --view= Launches the file viewer on a file >> -e, --edit= ... Edit files >> >> >> Please send any bug reports (including the output of 'mc -V') >> as tickets at www.midnight-commander.org >> >> Midnight Commander is my favorite "mst have" program on my Linux >> machines. >> >> Thanks for all your efforts :) >> >> Bob Currey >> >> >> ___ >> mc mailing list >> https://mail.gnome.org/mailman/listinfo/mc >> > > > -- > Sebastian Gniazdowski > > -- Sebastian Gniazdowski ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Re: mcedit: Center current line in middle of screen
On Thu, 21 Jan 2021 at 12:51, Yury V. Zaytsev wrote: > On Thu, 21 Jan 2021, Sebastian Gniazdowski wrote: > > > I have made the wish list on the ticket system: > > http://midnight-commander.org/ticket/4177 > > > > Are there any interesting entries? Or: is the direction in them > > compliant with the maintainer vision? > > Sorry, I've used up the time that I can make for mc for the coming months, > but to make it short, I'd rather side with Andrew. > > I'm pretty averse to overloading mcedit with small hardly discoverable > functions (however useful they are), and bolting on a questionable > scripting engine on top of that. > There are two arguments in the paragraph: 1. Small hardly discoverable features: 2. Questionable scripting engine. Ad. 1. I think/I'm hoping that it's just a first impression that the wishlist has made, mostly because of how long it is. I think that the entries in it are of the following categories: A. Small bugfixes. Like the whitespace leaving on the divided line by the typewriter wrapping, or the pasting onto an input's initial, faded text, or the find definition goto-line instead of replacing the file with the same file, or the fix of ParagraphFormat action, etc. Such changes are fine as they are rather bugfixes than microchanges, and bugs can be as small as they can get, because they're bugs that should be just fixed. B. New features that are narrow, but sensible. Like the line joining (vim's J command), character swapping (Ctrl-t in readline), centering of view (vim's zz command), CapitalizeWord (vim's gUiw command), LowercaseWord/Letter, ReloadFile action (vim's :edit), or the to-open-paren indenting, etc. I think that such changes are yes – narrow – however they're have a good history in other editors, so it's fine to implement them. All of them require only small coding. C. Features by the big F – with big coding required by them. Like the (30) alternate/updated WindowList command merging (but with a separation) the entries of the open file list and the editor history, or the clipboard history, (61) showing of current function in the window bar, or the (10) word-delimited block paren-like matching (i.e.: MatchBracket action), MultiSearch listbox filtering, etc. Such changes are IMO little heavy and require acceptance of the maintainer, however I strongly believe in them (not sure if all such wishes from the list, however the above – yes) and I hope that I'll win maintainers blessing on them. D. Annoyance resolving changes. Like the (52) WordRight to jump to the end of word, not to the beginning of next word, or (41) repeating of Complete to move the selection in the list to next item, or (46) opening of file without adding it to editor history, or (53) explicit jumps to previous locations in the file, (56) saving and restoring of the replaced buffer's undo history. I think that such changes may be most difficult to convey to the maintainer. On the other hand, SearchOppositeContinue has found its way to mcview, and it is from this category – a narrow change to resolve an annoying problem, so maybe there's hope. E. Fancy changes. Like (13) completion of file paths in buffer, (39) go-to filename under the cursor, (40) repeating of all characters and commands from the last save, (57) peek of the declaration of the function under the cursor, or the terminal window support, or (18) bookmark listbox, (32) search results listbox, etc. Such changes can be perceived as controversial because of the fanciness and size of the patches. I think that they need to be "pulled off", which makes them open for a simple rejection. F. Creative, eccentric changes. Like the (17) preview of ExternalCommand, (14) tray with a set of Unicode symbols, (16) git support, (58) a tags aware window list. Such changes are rather doomed for a fork fate. 17 and 14 – yes, maybe, but the git support or 58 – no, rather no chances of acceptance of the maintainer. G. Long awaited changes. Like (5) file browse widget for Edit/SaveFile,(15) "other file" .c ↔ .h support, (11) CK_WindowCascade / CK_WindowTile, (29) scroll left/right. Such changes are IMO problematic, because they're known for the maintainer and fossilized. I however still have hopes for all of the above, especially the last three. H. Weird changes Such changes might be the ones that you and Andrew have biggest objections to, like 45, 36, 31, 4, 24, 47, etc. I've included them in the wishlist just to stimulate the grey cells and new ideas. They and the ones from F. may have caused the allergic reaction of Andrew… And also D., contributing to the microchanges aura. Ad.2. Questionable scripting. Slang is a good language. It e.g.: allows inheritance of structures via, e.g.: car = struct {x, y, z}; truck = struct {@car, t}; Slirp is a very reliable tool. Did maybe the kitchensink example scare you off? Because it's the standard syntax used in such tools, it's virtually identical to Swig, the main scripting integration
Re: mcedit: Center current line in middle of screen
Hi, I have made the wish list on the ticket system: http://midnight-commander.org/ticket/4177 Are there any interesting entries? Or: is the direction in them compliant with the maintainer vision? -- Sebastian Gniazdowski ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Re: mcedit: Is there a way to tell mcedit to start in window mode instead of full screen?
(I'm replying to the list this time, just ensuring that it's not missed) Can I ask for clarification: - when an option, -w for example, will be given, - then mc should start with the file's window in windowed (not fullscreen mode), - for multiple files, possibly arranged the windows in e.g.: cascading way, ? I think that this would involve first creating a CK_WindowCascade action that would arrange the windows (first exiting fullscreen if needed). On Fri, 15 Jan 2021 at 14:32, Bob Currey via mc wrote: > I looked on the --help screen but didn't see an option to open in window > mode > > $ mcedit --help > Usage: > mcedit [OPTION…] [+lineno] file1[:lineno] [file2[:lineno]...] > > > GNU Midnight Commander 4.8.25-154-g33c84e75e > > > Help Options: > -h, --helpShow help options > --help-allShow all help options > --help-terminal Terminal options > --help-color Color options > > Application Options: > -V, --version Displays the current version > -f, --datadir Print data directory > -F, --datadir-infoPrint extended info about used data directories > --configure-options Print configure options > -P, --printwd= Print last working directory to specified file > -U, --subshellEnables subshell support (default) > -u, --nosubshell Disables subshell support > -l, --ftplog= Log ftp dialog to specified file > -v, --view= Launches the file viewer on a file > -e, --edit= ... Edit files > > > Please send any bug reports (including the output of 'mc -V') > as tickets at www.midnight-commander.org > > Midnight Commander is my favorite "mst have" program on my Linux > machines. > > Thanks for all your efforts :) > > Bob Currey > > > ___ > mc mailing list > https://mail.gnome.org/mailman/listinfo/mc > -- Sebastian Gniazdowski ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Re: mcedit: Center current line in middle of screen
On Fri, 15 Jan 2021 at 10:58, Yury V. Zaytsev wrote: > Sebastian, if you are motivated and have time to do some serious work on mc, maybe we should talk about a vision first? Thanks for the invite! Yes I'm motivated, I find it very entertaining to work on mc. I wish someone had taken the time instead to integrate the Lua fork by > mooffie. Unfortunately he wasn't up to maintaining his work of a genius > (no kidding) and we don't have resources to take it over. I think that he had one initial mistake, if I can say so – he scripted mc and not mcedit. I think that it's an editor that can gain most of a scripting engine, not a filemanager. > In as far as S-Lang scripting is concerned, it's definitively easy to bolt > it on, but I really wouldn't want to live with the resulting mess. Our > code base is already in a shape bad enough... > I have a very pleasant experience with S-Lang. I've ran my first script displaying a listbox from script after ~2 hours of hacking – thanks to Slirp, the S-Lang version of Swig. It works very, surprisingly well! And it has all the advanced features of Swig (take a look at examples/kitchensink/slirprc if you have time). It looks solid. Basically, to simply export a function to S-Lang, all that is required is to run: slirp header.h, with the declaration in that file and to compile and link the resulting header_glue.c (that slirp automatically creates)! What concerns me about S-Lang is that it's not an object oriented language and that it doesn't have a bool type. However, that might be a good thing, as the engine and the vision will be light thanks to this, maybe… It doesn't make sense to me for you invest your valuable time only to get > your patches criticized or rejected or just rotting on the tracker without > any feedback. If we can agree on a direction, then I think it will be good > for all of us, if we can't - at least it will be good for you, because > then you can spare your time arguing with us and directly setup a fork > instead... :-) > Yes, I had such hunches too. So my intentions are: – to make the gem, that mcedit is, more popular, – to make it grow and flourish mainly by the light scripting engine, but also by regular C work (like e.g.: the tags objects in listboxes patch – really, I don't know how I was using the various Vim tags plugins for years, as it's the mcedit's way – a simple listbox (which can be just built in) – that is the right way to do tags :) – then to utilize the scripting also in regular mc and see what ideas will come up. I'm constantly having ideas on mcedit improvements. I'm saving them to a file… It had like 80 entries, but I've just accidentally deleted it hours ago via a miserable rm -f **/*.#* glob (it expands to all files, not just those with hash in them, so look out) :( however I have a backup that has ~50 entries, uf … So maybe I could do a wish list on the wiki out of it? PS. This gives an idea for an improvement – a saving of the backup file to a predefined directory outside the current tree… Could be done as a script plugin, maybe. -- > Sincerely yours, > Yury V. Zaytsev > -- Sebastian Gniazdowski IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zinit Blog: http://zdharma.org ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Re: mcedit: Center current line in middle of screen
I've finished coding the support, see https://midnight-commander.org/ticket/4175 for a patch. I'm thinking that such feature has a minor drawback which can be additionally addressed – it is little offensive, IMO, to human brain to observe such jumps. I feel this way basing on the relief that I've noticed when I moved from Vim to MCEdit recently. I was doing "zz" command very often there. I would guess that this has something to do with "rapidly changing pictures" topic in neurobiology. To address this, I propose an enhancement: to move display little slowly, gradually, just to not rudely cut the states of before and after the move. I could use the timers but I've noticed that timer.c has been removed recently. Why? ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Re: mcedit: Center current line in middle of screen
PS. There's one more patch that I hope will be accepted (after I improve it according to style guide): https://midnight-commander.org/ticket/4160 On Fri, 15 Jan 2021 at 11:05, Sebastian Gniazdowski wrote: > On Thu, 14 Jan 2021 at 15:24, wrote: > >> Hi there, >> >> to me, mcedit is a hidden gem. > > > For me too. It is so good that I've started to improve it recently. See my > pending patches: > > - https://midnight-commander.org/ticket/4165 > - http://midnight-commander.org/ticket/4169 > - http://midnight-commander.org/ticket/4174 > - http://midnight-commander.org/ticket/4171 > > I'm also working on adding a S-Lang scripting to it :) It already works on > my machine. It was really simple, just invoking SLang_init_all() and that > was it, as libslang is already linked :) I have a plugin in it that > implements adding and subtracting from number under cursor, for example. > When I improve the support (e.g.: add some more S-Lang interface functions > that would allow e.g.: moving the view) I submit the patch. > > It struck the right balance between ease of use, advanced features and >> simplicity. > > > Exactly. And IMO with a light scripting engine it could shine even more > and be able to compete with other main editors. > > However, I miss an important >> function: The ability to center the current line in the middle of the >> screen. I could not find it anywhere, maybe someone from the community >> can help? >> > > This is one of the most missed features by me and it was one of the main > things that drove me to contribute to mc. Seeing that someone shares my > view, I'll not wait until the scripting engine will be ready and I'll > implement the centering in C ("CenterView", perhaps, for the name of the > command?). It'll be there soon :) > > -- > Sebastian Gniazdowski > IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zinit > Blog: http://zdharma.org > -- Sebastian Gniazdowski IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zinit Blog: http://zdharma.org ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Re: mcedit: Center current line in middle of screen
On Thu, 14 Jan 2021 at 15:24, wrote: > Hi there, > > to me, mcedit is a hidden gem. For me too. It is so good that I've started to improve it recently. See my pending patches: - https://midnight-commander.org/ticket/4165 - http://midnight-commander.org/ticket/4169 - http://midnight-commander.org/ticket/4174 - http://midnight-commander.org/ticket/4171 I'm also working on adding a S-Lang scripting to it :) It already works on my machine. It was really simple, just invoking SLang_init_all() and that was it, as libslang is already linked :) I have a plugin in it that implements adding and subtracting from number under cursor, for example. When I improve the support (e.g.: add some more S-Lang interface functions that would allow e.g.: moving the view) I submit the patch. It struck the right balance between ease of use, advanced features and > simplicity. Exactly. And IMO with a light scripting engine it could shine even more and be able to compete with other main editors. However, I miss an important > function: The ability to center the current line in the middle of the > screen. I could not find it anywhere, maybe someone from the community > can help? > This is one of the most missed features by me and it was one of the main things that drove me to contribute to mc. Seeing that someone shares my view, I'll not wait until the scripting engine will be ready and I'll implement the centering in C ("CenterView", perhaps, for the name of the command?). It'll be there soon :) -- Sebastian Gniazdowski IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zinit Blog: http://zdharma.org ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc