Re: customize columns in single panel view

2017-06-15 Thread Mooffie
On 6/12/17, Karel  wrote:
> Hello,
>
> Is it possible to customize the columns in the single panel view ?
>
> For my default (two panel) view, I have customized it using:
>
>  -> Listing Mode
>(*) User defined:
>   half type name | size:15 | mtime
>
> however, when I switch to the single panel view, there are different
> columns (obviously):
>
>   Permission   Nl   Owner   Group   Size   Modify time   Name
>
> For instance, I need to change the width of "Size" to 15.


No, you can't change the format of the "Long" listing-mode.

(You can make the "User defined" listing-mode display in one panel (by
changing "half" to "full"), but this is not what you want.)

So, you have two options:

(1) Modify the source code (search panel.c for "full perm space" and
tweak it); or:

(2) Use mc^2. It allows you to do this. (It already comes with a
snippet that enlarges the "Size" field a bit so there'd be room for
the commas (or other locale-dependent formatting) it adds. This makes
reading long numbers much easier.)
___
mc mailing list
https://mail.gnome.org/mailman/listinfo/mc


Re: using "alt-t" to switch to single-panel mode

2017-06-11 Thread Mooffie
On 6/11/17, Karel <li...@vcomp.ch> wrote:
>> On 2017-06-08 20:08, Mooffie wrote:
>>
>> Open src/filemanager/panel.c and search for " % ".
>
> did you mean this section of  src/filemanager/panel.c ?
> [...]

No, I erred: open src/filemanager/cmd.c instead.

The % operator is used there to cycle the modes. It goes from 0 to 3
and back to 0. (You're interested in modes 2 and 3: see panel.h for
'list_long' and 'list_user'.) The code there is simple enough if you
know basic C. (You may email me privately if you don't want to pollute
this list; but I'm not available 24/7.)

>
> I cannot use mc^2

(Tip: Don't use "can't" on mailing lists. It gives no real information
and only raises more questions. Use "won't" instead.)
___
mc mailing list
https://mail.gnome.org/mailman/listinfo/mc


Re: can omni.ja be viewed with MC?

2017-02-22 Thread Mooffie
On 2/14/17, Felix Miata  wrote:
> http://forums.mozillazine.org/viewtopic.php?f=18=2943023 mentions that mc
>
> cannot view these "optimized" .zip files named omni.ja used by Firefox and
> SeaMonkey. When I try renaming to omni.zip, mc reports "inconsistent extfs
> archive". Is there a known solution to make these viewable in mc?

The 'unzip' program exits with error code (because it prints warnings,
to stderr) when it processes .ja files. That's why MC fails. Here's
what to do:

(1) Create a wrapper for unzip (and make it executable):

#!/bin/sh
if echo "$* " | grep "\\.ja "; then
  # when dealing with .ja files, suppress warnings and error code.
  unzip "$@" 2>/dev/null
  exit 0
else
  exec unzip "$@"
fi

(2) Edit /usr/lib/mc/extfs.d/uzip. Tell it to use the wrapper instead
of "/usr/bin/unzip".

>
> When I try renaming to omni.zip,

You can also do "cd omni.ja/uzip://". (Or symlink it. Or edit MC's
"extension file".)
___
mc mailing list
https://mail.gnome.org/mailman/listinfo/mc


Re: Local-to-dir mcedit prefs or quick profiles?

2017-02-21 Thread Mooffie
On 2/20/17, wwp <subscr...@free.fr> wrote:
> I'm using mcedit to edit sources in many projects, some of them have
> coding conventions that require [...] and some require [...]
>
> What feature or best practice would you suggest in order to quickly
> switch mcedit settings (general editor options) according to the file
> location?

You can use mc^2 with a simple snippet like this:

ui.Editbox.bind("<>", function(edt)

  if edt.filename and edt.filename:find "/projects/lambda/" then
ui.Editbox.options.tab_size = 4
ui.Editbox.options.expand_tabs = true
  else
ui.Editbox.options.tab_size = 8
ui.Editbox.options.expand_tabs = false
  end

end)

(For documentation, see [1])

(The 'else' case is needed because in MC the editor options are
global, not local to each edit buffer.)

mc^2 also comes with a modeline module (if you decide to use it just
remember to require() it before the snippet above so it doesn't
overwrite your settings).

[1] 
http://www.typo.co.il/~mooffie/mc-lua/docs/html/classes/ui.Editbox.html#ui.Editbox.options
___
mc mailing list
https://mail.gnome.org/mailman/listinfo/mc


Re: Help: meaning of the panelize command in left/right menus

2017-02-14 Thread Mooffie
On 2/15/17, c...@linux.it  wrote:
> Hi, I can't find any information in the internal help, or man page, or
> wiki,
> about the "Panelize" command in the "Left" or "Right" menu.
>
> I suspect it is related to the (well documented) "External panelize"
> command,
> but when I select it, I'm left clueless with an empty panel.
> Now what?

I believe you opened a ticket for this. Please also link to the ticket
or we'll have two crowds discussing this independently and therefore
wasting their time.
___
mc mailing list
https://mail.gnome.org/mailman/listinfo/mc


Re: copy/move live-update

2016-10-21 Thread Mooffie
On 10/15/16, Yury V. Zaytsev <y...@shurup.com> wrote:
> On Fri, 14 Oct 2016, Rikishi 42 wrote:
>> [snip]
>
> This could be an interesting feature to implement: if I remember
> correctly, Volkov Commander did that [...] it removed the selection
> dynamically from the files already copied, so you could literally see how
> your files float from one directory to another.

Good news: MC already does this. But it doesn't repaint the panel, so
you don't see anything happening there.

I wrote little snippet for mc^2 to repaint the screen as files get unmarked:

https://gist.github.com/mooffie/8ebf543f1dbd717410744114be9cc31f

(You can also drag the progress dialog to see the file list beneath.)

>
> if I remember correctly, Volkov Commander did that [...]

I know this feature from Dos Navigator. Seeing this was a huge wonder
for me. Like seeing Wolfenstein 3D for the 1st time. I was a teenager
in school back then and I couldn't understand how text partially
obscured by the dialog above it (the progress dialog) could change. It
even worked when the shadow of the dialog fell on it!
___
mc mailing list
https://mail.gnome.org/mailman/listinfo/mc


Re: Norton Commander's make-believe features

2016-10-21 Thread Mooffie
On 10/15/16, Rikishi 42  wrote:
> On 14/10/16 15:35, chris glur wrote:
>>> ..the presence of very basic defects in the file
>>> management functions.
>>> [...]
>>> Peter Norton would not be happy.
>>
>> Please describe some of these.
>
> - copies are made in the disk order, instead of taking the sort order
> that is chosen for the display

MC does use the display order, for marked files.

For subdirs it uses the disk-order, but so does your beloved Norton
Commander, and FAR, and Volkov, and Dos Navigator (I've just checked
all of these; To be exact, they seem to use name order, but I suspect
this comes from the DosBox/Wine emulation layer).

> - when some of the files are allready on destination, and one choses to
> skip, their number and volume should be substracted from the total
> count/size. In that way the estimates mean something.

This doesn't look like a really useful feature. And, as @Mike
explained, it's not at all one that's easy to implement.

> - the move function still copies all, before removing the files, meaning
> that we gain nothing in volume until all has been copied

Here I agree with you.

(@Yury explains why the current behavior is intentional (to make the
entire move operation atomic), and this certainly makes sense when one
thinks about it, but it might be nice to have an option to turn this
off.)

>
> - the move function doesn't give an estimate during it's work

It does.

> NC (it's ancestor) [was] a file/dir manager, not a terminal.
>
> I'm amazed at the resources and time that go into the terminal maintenance
> and development
> [...]
> Peter Norton would not be happy.

DOS wasn't multitasking. NC was spawning a new COMMAND.COM instance to
process each command you typed, and went into hibernation till it
finished. Unix, OTOH, is multitasking. MC spawns only one shell
process, and communicates with it. This makes a huge difference (and
is why, I guess, many MC users appreciate it and don't switch to any
of the other similar Unix filemanagers).
___
mc mailing list
https://mail.gnome.org/mailman/listinfo/mc


Re: heax search (was: Re: mc Digest, Vol 145, Issue 7)

2016-09-26 Thread Mooffie
On 9/21/16, chris glur  wrote:
>> you should tick the "All charsets" and "Case sensitive"
>> checkboxes first.
>
>  Previously I never succeeded.
> With those 2 'ticks', it finds the first matching byte on the display only.
>
> Once the endianism is determined you can use:
> ->  cat Log | hexdump | grep 2f3a ==

Maybe you entered, in MC's search dialog, "2f3a" instead of "2f 3a"?

(When ticket #3694 gets in you'll be notified of such "mistakes".)
___
mc mailing list
https://mail.gnome.org/mailman/listinfo/mc


Re: display thousands separator in file size

2016-09-26 Thread Mooffie
On 9/26/16, Fourhundred Thecat <400the...@gmx.ch> wrote:
>
> I am using thousands separator with ls, and it hugely increases
> readability:
>
>   BLOCK_SIZE="'1" ls -lAF
>

You'll have this feature when ticket #3666 advances.[1]

>
> is there a simple way how I could modify the code, so that file size
> displayed in mc has thousands separator?

If you know how to compile code then simply install mc^2. It has this
feature.[2]

>
> is there a simple way how I could modify the code, so that file size
> displayed in mc has thousands separator?

It's not a simple one-line fix to the code. That's because the
thousands separators consume space, and the available space affects
the units used (which affects the space!). So it's like a
chicken-and-egg problem.

But, if you feel adventurous, and don't expect hand-holding from us:

In lib/utils.c find the function size_trunc_len(). Change the three
character string "%" (there's only one there!) to "%'". But now the
separators will consume space and the size column will cut off a digit
or two. So go to "Listing mode", choose "User defined", and change
"size" to "size:10" to give it 10 columns (or more). But, as I
explained, you'll sooner or later find that it's not perfect.

[1] http://www.midnight-commander.org/ticket/3666
[2] http://www.typo.co.il/~mooffie/mc-lua/docs/html/index.html
___
mc mailing list
https://mail.gnome.org/mailman/listinfo/mc


Re: change "timeformat_old" from 6 months to 1 year

2016-09-26 Thread Mooffie
On 9/20/16, Fourhundred Thecat <400the...@gmx.ch> wrote:
>> On 2016-09-19 05:11, Mooffie wrote:
>> That expression (6 * 30 * 24 * 60 * 60) equals 0x00ed4e00. Use MC's
>> viewer to edit /usr/bin/mc: press  for hex view. Search for "00 4e
>> ed 00" (assuming little endian).
>
> I did not manage to find the hex string 0x00ed4e00, using any of my hex
> editors, so I ended up recompiling mc.

That's weird. For the record: I grabbed a few MC binaries off the
"Binaries" webpage and found `00 4e ed 00` in all of them.

Perhaps you forgot to select the "Hexadecimal" radio button in the
search dialog.

Whatever, if you feel adventurous and want to investigate this matter
further, compile MC with debugging support (e.g., "./configure .
CFLAGS='-g -O0'"), and then interact with gdb:

$ gdb ./mc
# break file_date
# run
( when it returns to the debugger: )
# disassemble /mr

You'll then see what bytes the expression "if (current_time > ... + 6L
* 30L * 24L * 60L * 60L)" got compiled into.)

>
> Perhaps, it would make sense to make this option configurable
> via the ini file?

I don't know. Personally I'd aim higher: make it possible to color
fields (preferably at individual character level). You'd then use this
feature to display old dates dimmed. But this feature only makes sense
if MC had scripting support, to let users describe their logic using
code. Simple settings, like those in ini files, aren't flexible
enough.

>
> Or set 12 months by default, because that makes more
> logical sense than 6 months.

The "6 months" boundary isn't arbitrary: it's intended to match the
behavior of 'ls' (
http://pubs.opengroup.org/onlinepubs/007908799/xcu/ls.html ).
___
mc mailing list
https://mail.gnome.org/mailman/listinfo/mc


Re: change "timeformat_old" from 6 months to 1 year

2016-09-18 Thread Mooffie
On 9/19/16, Mooffie <moof...@gmail.com> wrote:
>
> One possibility is to modify MC's source code:
>
> https://source.midnight-commander.org/S/lib--timefmt.c.html#L133
>
> Change the "6L" (six months) to "12L".

Or you can edit the MC binary directly.

That expression (6 * 30 * 24 * 60 * 60) equals 0x00ed4e00. Use MC's
viewer to edit /usr/bin/mc: press  for hex view. Search for "00 4e
ed 00" (assuming little endian). But it turns out MC's hex search has
a bug: you should tick the "All charsets" and "Case sensitive"
checkboxes first.
___
mc mailing list
https://mail.gnome.org/mailman/listinfo/mc


Re: change "timeformat_old" from 6 months to 1 year

2016-09-18 Thread Mooffie
On 9/18/16, Fourhundred Thecat <400the...@gmx.ch> wrote:
> Hello,
>
> I am using different date formats for "timeformat_recent" and
> "timeformat_old":
>
>   [Misc]
>   timeformat_recent=%b %e  %H:%M
>   timeformat_old=%Y %b %e  %H:%M
>
> which gives me nice, clean dates, where new files are immediately
> distinguished from older ones:
>
>Sep  3  15:13
>   2016 Mar 10  19:57
>
> that works great, except that "timeformat_old" is used for files 6
> months or older.
>
> I would like to change it to 1 year or older, so that for newer files
> (less than one year), I don't see the year.
>
> How can I do it ?

One possibility is to modify MC's source code:

https://source.midnight-commander.org/S/lib--timefmt.c.html#L133

Change the "6L" (six months) to "12L".

(Another possibility is to use mc^2 and describe the logic with Lua.
This gives you more freedom than a fixed "1 year ago". For example,
here's a snippet that shows your timeformat_recent only for files
modified in 2016:
https://gist.github.com/mooffie/de41af651f9383c3bd38f0f6259522a0 )
___
mc mailing list
https://mail.gnome.org/mailman/listinfo/mc


Re: mplayer keyboard control

2016-08-31 Thread Mooffie
On 8/31/16, benoit felix  wrote:
> Hiya
> I managed to make mplayer the default video player in mc. It is all fine but
> the keyboard control does not work anymore (eg. pause, stop, etc).

How exactly are you launching mplayer? How did you configure mc to use it?

And do you want it to run in the foreground (stopping mc) or in the
background (detached from mc)?

(BTW, you do know there's 'mpv' nowadays, right?)
___
mc mailing list
https://mail.gnome.org/mailman/listinfo/mc


Re: view .gnumeric files in mc (in console)

2016-08-31 Thread Mooffie
On 8/31/16, Mooffie <moof...@gmail.com> wrote:
> On 8/31/16, Fourhundred Thecat <400the...@gmx.ch> wrote:
>>
>> when run on the commandline, ssconvert needs output file
>
> The manual page for ssconvert says you can use fd://1 for standard
> output. Use this as the output file.

BTW, most systems support the /dev/fd/# pseudo files. So even if the
software doesn't have special support for stdout, you can always use
/dev/fd/1.

http://www.informit.com/articles/article.aspx?p=99706=15
___
mc mailing list
https://mail.gnome.org/mailman/listinfo/mc


Re: view .gnumeric files in mc (in console)

2016-08-31 Thread Mooffie
On 8/31/16, Fourhundred Thecat <400the...@gmx.ch> wrote:
>> On 2016-08-31 10:51, Slava Zanko wrote:
>>
>> Hi Fourhundred,
>>
>> Try to use this:
>>
>> View=%view{ascii} ssconvert %f || xls2csv %f || strings %f
>>
>
> that obviously cannot work
>
> when run on the commandline, ssconvert needs output file

The manual page for ssconvert says you can use fd://1 for standard
output. Use this as the output file.
___
mc mailing list
https://mail.gnome.org/mailman/listinfo/mc


Re: Using trash on MacOS Homebrew

2016-08-25 Thread Mooffie
On 8/23/16, Joseph Reagle <joseph.2...@reagle.org> wrote:
>
> For the time being, and if I remember, I type `trash`, mark the files, and
> then `ctrl+x t` to paste them.

It'd be easier to add the command to the user menu (that's ).

(BTW, passing gazillion files to the shell with `ctrl+x t` hangs MC.
At least on my system.)

>
> I wish I could map F8 to a user supplied command.

You can do this in mc^2. Here's a little snippet to make  use 'trash':

https://gist.github.com/mooffie/4111a39e18934e2b4e7001c1c0cd3213

(BTW, I know of a homebrew user who installed mc^2 by slighthly
modifying Formula/midnight-commander.rb)
___
mc mailing list
https://mail.gnome.org/mailman/listinfo/mc


Re: MC with Tabs

2016-08-23 Thread Mooffie
On 8/23/16, Mooffie <moof...@gmail.com> wrote:
> On 8/21/16, Russell Urquhart <russurquha...@verizon.net> wrote:
>>
>> Hi,
>>
>> I was looking, and found this link:
>>
>> https://www.midnight-commander.org/ticket/1581
>>
>> Has anyone used this, and can this patch be folded into current releases?
>
> It's very easy to implement such things in mc^2. There's no need to
> use C. I'll look into this later today.

Done. I've posted an announcement at that ticket.
___
mc mailing list
https://mail.gnome.org/mailman/listinfo/mc


Re: MC with Tabs

2016-08-23 Thread Mooffie
On 8/21/16, Russell Urquhart  wrote:
>
> Hi,
>
> I was looking, and found this link:
>
> https://www.midnight-commander.org/ticket/1581
>
> Has anyone used this, and can this patch be folded into current releases?

It's very easy to implement such things in mc^2. There's no need to
use C. I'll look into this later today.

(I haven't bothered with this feature before because I didn't quite
see why people would use it. After all, as @Mike wrote, there are tabs
in terminal emulators. OTOH, I think I can see why tabs might be
useful in some situations.)
___
mc mailing list
https://mail.gnome.org/mailman/listinfo/mc


Re: mc^2 news (august 2016)

2016-08-17 Thread Mooffie
On 8/17/16, Yury V. Zaytsev  wrote:
> I hope that my efforts in trying to find an employer
> who would be ready to sponsor some work on mc at least
> on the scale of several hours per week have now finally
> borne fruit

I very much hope so.

It amazes me that the Linux ecosystem (and similar OSs), under which
flourish gazillion of companies, don't help in this.

Perhaps people just aren't aware of the situation. Before I came here
I assumed there was some "Bilderberg group" behind MC. After all, MC
is such a basic element of Linux, so who wouldn't want a hand in it?

>
> basically, I've been inactive in the last couple
> of months (travelling, $dayjob), but [...]

Yep, I've noticed your resounding absence :-(  I'm relieved to see
you're still an addict.

I too have been inactive. It started with a computer crash that kept
me busy for a couple of months, and afterwards I sort of remained
inactive. Not that I've been active before that.

>
> In the mean time, kudos to Andrew who is single-handedly
> doing some excellent work on mc right now...

Right! He's like Atlas. I mean it.

I swear, when that $75 million USD finally get to me from that
Nigerian prince whose rich uncle Absalom had died, the very first
thing I'm going to do is put Andrew and you on a hge payroll. For
Andrew I'll buy a gold Lamborghini. Even before I buy myself a
computer!
___
mc-devel mailing list
https://mail.gnome.org/mailman/listinfo/mc-devel


mc^2 news (august 2016)

2016-08-17 Thread Mooffie
Hi folks!

mc^2 is a Lua energized version of MC:

http://www.typo.co.il/~mooffie/mc-lua/docs/html/

So, what's new since last month? -Two exciting modules:

* "Folder Jumping"

  A feature borrowed from GitHub.com.[1]

  See screenshot[2]

* Unwind

  Automatically convert Windows/DOS line-ends to Unix, in
  the editor.

  See screenshot[3]

(You don't need to configure anything if you want to try out these
modules: the 'demo' module will ask you, at startup, which features
you want to enable.)


[1] https://github.com/blog/1877-folder-jumping
[2] 
http://www.typo.co.il/~mooffie/mc-lua/docs/html/guide/SCREENSHOTS.md.html#folder-jumping
[3] 
http://www.typo.co.il/~mooffie/mc-lua/docs/html/guide/SCREENSHOTS.md.html#unwind
___
mc-devel mailing list
https://mail.gnome.org/mailman/listinfo/mc-devel


Re: Privacy option?

2016-07-14 Thread Mooffie
(Replying to a post in the mailing list archive, so apologies for lack
of threading.)

On May 20, 2016, Toby wrote:
> I usually enable the privacy option on GUI desktop systems / file
> managers, which prevents them from keeping a menu of recently accessed
> files and directories, because I find the feature more troublesome than
> useful.
>
> In plain Bash terminals instead I use a "private window" concept,
> borrowed from web browsers. Whenever I'm about to work on private data I
> type 'unset HISTFILE', after which all following commands typed into that
> window won't be saved in .bash_history

(You can make it so that the Bash spawned under MC does this automatically.)

>
> Is there a similar option for mc? Either a global option to avoid saving
> activity history (such as recently accessed files, directories, and
> commands) or a temporary switch akin to "private window"?
>
> Otherwise, has anybody come up with some hook or script to do that?
>
> I took a look at the files kept by mc and I found the following:
>
> ~/.local/share/mc/history
> ~/.local/share/mc/filepos
> ~/.cache/mc/Tree
>
> The first is the most troublesome file. I only want to keep the
> [user-fmt-input] and [mini_input] sections there (which are really
> configuration history, rather than activity history) and get rid of
> everything else. The second file contains activity history of recently
> edited files and the third contains the directories browsed using Tree
> view, so they need to go as well.
>
> I just cleaned up those three files and gave them root:root 644
> permissions, which seems to be doing the trick: it keeps them read-only
> with no visible error message. But I'm wondering if there's a better
> option out there.

I don't know if it helps, but MC respects the following environment variables:

XDG_CONFIG_HOME
XDG_DATA_HOME
XDG_CACHE_HOME

Google them. You can create a shell script to launch a "private" MC
that puts all these under ~/.private or whatever.

(I see that MC stores the "Directory hotlist" data in CONFIG, not
DATA. This looks wrong.)

(Tip: you can make your "private" MC use a different skin than the regular one.)
___
mc mailing list
https://mail.gnome.org/mailman/listinfo/mc


mc^2 news (july 2016)

2016-07-14 Thread Mooffie
Hi folks!

A new release of mc^2 is out. It's mainly a maintenance release,
so there aren't many exciting new features.

http://www.typo.co.il/~mooffie/mc-lua/docs/html/

News:

The C side:

  - The branch is rebased against mc 4.8.17.

The Lua side:

  - A few minor bug fixes.

  - New module: "dynamic skin"

It lets you change the skin automatically depending on
the directory you're in.

So, for example, when you're examining an old backup disk
you've mounted, or when you're on a remote machine, or when
you're browsing a panelized or filtered listing, or when
you're in a read-only directory, you can get a very
noticeable visual indication reminding you of this.

  - New module: "colon"

It lets you type :commands :like :these on the
command-line (or in the editor). Like in 'vi'.
E.g., you can rename files by typing:

:s/\.jpe?g/jpg/i

(This launches Visual Rename, where you can inspect
the changes before committing them.)

  - The snapshots module can now save/restore panelized listings.
___
mc-devel mailing list
https://mail.gnome.org/mailman/listinfo/mc-devel


Re: CGDB

2016-05-23 Thread Mooffie
On 5/23/16, Nicolas Rybkin  wrote:
> Is it possible to debug MC using GDB/CGDB?

Sure. There are ways to make gdb and mc use two different terminals
(as Slava mentioned, and see later), but, depending on what you want,
this is often not needed.

>
> I can't debug it with pure GDB too, because I can't use
> keyboard when MC is running.

- Did you remember to resume mc's execution by, for example, typing
'cont' in gdb?
- Maybe the fact that mc's screen is garbled leads you to think
(erroneously) that it doesn't respond to keys. Press C-l to make mc
redraw the screen (after 'cont').

Anyway, there are ways to make gdb and mc use different terminals
(but, again, it may not have been this issue that tripped you):

(1) Run './mc' in one terminal and 'sudo gdb -p 1234' (or 'sudo gdb
./mc 1234') in another, where 1234 is mc's PID (which you can find by
executing 'echo $PPID' in mc). (Drop the 'sudo' to get instruction on
how to do without.) In gdb, set breakpoints or whatever, and do 'cont'
to resume mc (you can return to gdb even without breakpoints, by
pressing C-g). (The disadvantage of this simple method is that you
don't get a chance to inspect mc's startup.)

(2) Use 'gdbserver'.

(3) Use gdb's 'tty' command.

I once wrote some notes explaining methods (2) and (3). They're not
quite suitable for public consumption, but here they are:
http://pastebin.com/pqdk1NfB .
___
mc-devel mailing list
https://mail.gnome.org/mailman/listinfo/mc-devel


Re: Midnight Commander 4.8.16 released

2016-03-19 Thread Mooffie
On 3/15/16, Yury V. Zaytsev  wrote:
> On Tue, 2016-03-15 at 09:31 +0100, wwp wrote:
>>
>> I notice that when configuring with slang, the configure summary
>> doesn't mention it, whereas for ncurses it explicitely mentions it.
>> See for instance (w/ --with-screen=slang or no --with-screen, same
>> output here):
>
> Yes, I've noticed this as well, it's a bug in our ncurses/slang
> detection macro, but it's purely cosmetic.
>
> I didn't manage to create a ticket for this so far, but if you can do
> it, it will be appreciated and maybe one day we'll even get to it.

Done:
http://www.midnight-commander.org/ticket/3607#comment:3
___
mc-devel mailing list
https://mail.gnome.org/mailman/listinfo/mc-devel


Re: Browsing the source

2016-02-21 Thread Mooffie
On 2/19/16, Yury V. Zaytsev  wrote:
> [...] I've finished the integration
> script and the results are available at the following URL:
>
>  http://source.midnight-commander.org

Superb! Thanks!

minor comments:

- GLOBAL ignores dot-files and dot-directories, so you can install it
in ".global" instead of "CVS".

- Right now the header on the front page (index.html) is "mc". We can
change it by running htags thus:

htags --suggest -t "Welcome to the Midnight Commander source tour!"


(BTW, it's possible to tell htags to make the front page (index.html)
show all the files in a collapsible JavaScript tree (by adding the
option `--tree-view=filetree`). But this makes the front page 96K
instead of just 13K and the browser will also download an uncompressed
jquery.js (161K) so I don't know if we should enable this feature.)

>
> If that looks fine to you, maybe we should put it somewhere on the Trac,

Put what on Trac? A link to http://source.mc.org? Sure.

We also need to add to the front page of http://source.mc.org a short
introductory text pointing to the main site (and to the instructions
for producing the HTML on one's own computer). Leave it to me: I'll
investigate this and provide a patch in a couple of days.
___
mc-devel mailing list
https://mail.gnome.org/mailman/listinfo/mc-devel


Re: Browsing the source

2016-02-19 Thread Mooffie
On 2/18/16, Yury V. Zaytsev <y...@shurup.com> wrote:
> I wonder whether you would mind giving `htagsfix` a more permanent home? [...]
> Maybe you could "officially" release and maintain it in a GitHub repository

Done:

https://github.com/mooffie/htagsfix

>
> or even try to get it pushed into GNU Global itself?

We may need additional customizations, so it's better to keep it
independent for a while.

(BTW, my original attempt was to modify htag's code itself, but I
found its C code not very wieldy so I gave up and cobbled up a quick
script.)
___
mc-devel mailing list
https://mail.gnome.org/mailman/listinfo/mc-devel


Re: Browsing the source

2016-02-16 Thread Mooffie
> On 2/16/16, Yury V. Zaytsev  wrote:
>> > Global doesn't seem to be available as a package on RHEL though?! :-(
>>
>> http://www.geocities.co.jp/keep_creating/sanaly/index.html

BTW, you need to install just the "global" package. You don't need
"pygments" and "sanaly".

(I use htags to create static HTML pages but it can also produce
alternative output for servers supporting CGI (Perl). I guess "sanaly"
is something similar.)
___
mc-devel mailing list
https://mail.gnome.org/mailman/listinfo/mc-devel


Re: Browsing the source

2016-02-16 Thread Mooffie
On 2/16/16, Yury V. Zaytsev <y...@shurup.com> wrote:
> On 2/16/16, Mooffie <moof...@gmail.com> wrote:
> > If I get write access to MC's wiki I can prepare a page listing the
> > steps to generate this documentation
>
> Done.

Ouch! I created a MarkDown instructions page before I got your reply.
Here it is:

    https://gist.github.com/mooffie/72d58969eceb885febf5

(I'll convert it to MC's wiki sometime.)

> Could you please tell how much time is required for generation, I'm
> wondering whether I can simply have it run upon every commit or rather
> it would be more appropriate to let it run hourly / nightly or so.

As the instructions page explains, there are three commands to run
(gtags, htags, htagsfix). On my computer it takes about 3 minutes
total. But I'm using an old Pentium 4. I imagine modern computers do
this in at least 20% of the time: 35 seconds top.

> > Global doesn't seem to be available as a package on RHEL though?! :-(
>
> http://www.geocities.co.jp/keep_creating/sanaly/index.html

I see that this is the newest 'global' version. Good. You can ignore
the "appendix" on the instructions page.

> > We can also provide a downloadable tarball
> > (around 12 MB) so people can have it right away.

Anybody who's interested can download the HTML archive here:

http://www.typo.co.il/~mooffie/tmp/mc/mc-source-html.PASSWORD.tgz

Replace "PASSWORD" with "bird" (sorry for this silly trick. I don't
want people to stress the server).
___
mc-devel mailing list
https://mail.gnome.org/mailman/listinfo/mc-devel


mc^2 news (january 2016)

2016-01-11 Thread Mooffie
Hi folks!

mc^2 is a Lua energized version of MC:

http://www.typo.co.il/~mooffie/mc-lua/docs/html/

So, what's new in mc^2 since its announcement here in May 2015? Lots
of minor things. Lots of non-minor things. But I won't bore you with
lengthy lists. The highlights:

* The git commit history was rewritten. It now consists of around 90
  commits that go from genesis to today.

* New users can get an impression of mc^2 instantly: just run it and
  a dialog will pop up asking you if you want to enable some "factory
  defaults" goodies.

  You no longer need to configure mc^2 if you just want to take it
  for a test-drive!

Some new scripts:

* You can drag dialogs with the mouse. Dialogs with help pages
  have "?" icon at their corner.

* "Restore selection"

* "Size calculator"

* A front-end for scanimage(1).

You can see much of these features on the screenshots page:

http://www.typo.co.il/~mooffie/mc-lua/docs/html/guide/SCREENSHOTS.md.html
___
mc-devel mailing list
https://mail.gnome.org/mailman/listinfo/mc-devel


Re: mc and me

2015-11-04 Thread Mooffie
On 11/4/15, Egmont Koblinger  wrote:
> Hi guys,
>
> I've been thinking about writing something like this for quite a long
> time...

Egmont, I feel for you!

(I hope these are suitable words. I'm not an English speaker. At this
moment I'm hungry and tired so I'm giving up revising that sentence
;-)

It'd pain me greatly to see you go or no longer contributing. I'm
relatively new here and you (and Yury, and Andrew) are the only one(s)
I've seen showing care/love towards MC. So, in a very straightforward
way, you're very precious to me - and to every user of MC. Not from a
utilitarian point of view but also from that of being a kin - bonded
by love for MC. Though I don't think we're a crowd that differentiates
between "love" and "utility" when it come to our hobby software! ;-)

> Probably #3534 comment 18 was the last straw (a one-character
> change probably not making it into the next release).

I'm sorry that I chimed in there. I thought I could help expedite
matters by providing "review" to help bring the issue to conclusion,
but, alas, my "contribution" there added needless volume and probably
did the opposite.

On the up side, every comment of yours there attest to your
thoroughness. Not that I needed more evidence for that. One needs to
read only few of your tickets to understand that the community can
entrust you with responsibility.

>
> The question is: backwards, or forwards?

So indeed, Yury, why not forward?

The sun is shining, the birds are chirping, the coffee is a brewing,
and a cheery letter from Egmont is waiting; what can be better than
that?
___
mc-devel mailing list
https://mail.gnome.org/mailman/listinfo/mc-devel


Re: Midnight Commander not compiles on Debian Squeeze

2015-10-20 Thread Mooffie
On 10/20/15, Andrey Tataranovich  wrote:
> Glib version check patch attached.

You also need to update README, INSTALL, HACKING.
___
mc-devel mailing list
https://mail.gnome.org/mailman/listinfo/mc-devel


Re: listbox hotkeys

2015-05-28 Thread Mooffie
On 5/24/15, Mike Smithson mdooli...@gmail.com wrote:

 It's always bugged me that I can only access the
 first 10 items with the keys 0-9.
 [...]
 Keys a-z are very often used by the menu of the
 dialog the listbox is in, but keys A-Z are not.
 [...]
 Now I can access the top 36 items instead of just
 the top 10.

But isn't it hard to count, say, 27 items mentally? Isn't it easier
to just press the arrows repeatedly? I think that's a question the
maintainers are going to ask you.

(Otherwise I don't see a problem with your code. But you'd want to
change the - 55 to - 'A' + 10 and remove the curly brackets
(that's their laws).)

Anyway, you can do all such tweakings in mc^2 without touching the C
code. Here, I translated your code to Lua:

https://github.com/mooffie/mc/blob/lua-4.8.14-port/src/lua/tests/snippets/listbox_AZ.lua

I've also created a new module today that lets you associate hotkeys
with the directories there. Again, no C coding is required. Here's a
screenshot (note the yellow arrows):

http://www.typo.co.il/~mooffie/mc-lua/docs/html/guide/SCREENSHOTS.md.html#Find_as_you_type__hotkeys__clock

(Isn't this feature what you *really* want?)


 I use Directory hotlist a lot. Constantly, really.

A few weeks ago somebody said he's using the File edit/view history
of Dos Navigator several hundred times a day[1]. After implementing
it (better) in mc^2 I can say the same. I mention it because many
times (thanks to its Quick filter entry[2]) one can use it as a
replacement for the Directory hotlist dialog.

[1] http://www.midnight-commander.org/ticket/280#comment:25
[2] 
http://www.typo.co.il/~mooffie/mc-lua/docs/html/guide/SCREENSHOTS.md.html#Recently_Visited_Files__xterm_titles
___
mc-devel mailing list
https://mail.gnome.org/mailman/listinfo/mc-devel


Re: mc is over!? - post by Ilia Maslakov on Russian-speaking IT site

2015-05-27 Thread Mooffie
On 5/27/15, Paul Sokolovsky pmis...@gmail.com wrote:
 happens within your team. Whatever it is, please show goodwill by
 adding Egmont Koblinger to the maintainer team, if he agrees

I second that!
___
mc-devel mailing list
https://mail.gnome.org/mailman/listinfo/mc-devel


Re: [ANN] mc^2

2015-05-27 Thread Mooffie
On 5/8/15, Egmont Koblinger egm...@gmail.com wrote:
 Hi,

 How much work would it be to port your branch to 4.8.14 or git head?
 I'd really like to use your version for daily work

Done. The 4.8.14 port has just been pushed to github. The Getting
started (and Installation) chapter now has the appropriate branch
name.

(This is not yet the stage-by-stage patch I promised here to the
maintainers (together with some reviewers guide document, to ease
their work), but this will come soon.)
___
mc-devel mailing list
https://mail.gnome.org/mailman/listinfo/mc-devel


Re: mc is over!? - post by Ilia Maslakov on Russian-speaking IT site

2015-05-27 Thread Mooffie
On 5/27/15, Volodymyr Buell vbu...@gmail.com wrote:
 Please organise a pol to choose a right person.

 Personally my opinion - why not to give a steering wheel to Mooffie

Hey, hold the horses. I'm not at all a programming hotshot, and being
practically anonymous here so far, I should be treated with suspicion.
To borrow the [in]famous idiom, I haven't proven myself to be real
man ;-) And nobody has actually looked into my code yet. There are
better people here who have shown aptitude, responsibility and
dedication for years (Egmont comes to mind).


 It seems [that Mooffie] did much more for mc than anybody
 else in past few years.

No, that's patently untrue. First, it's just an illusion that writing
mc^2 involved a lot of work. Second, Andrew Borodin has been doing a
tremendous (and fantastic) work of cleaning up the code. People
perhaps aren't aware of this. It won't be right to say that MC
stagnates.

As an aside:

As one for whom MC is the center of the universe, I was surprised to
learn that this is not the case for everybody, and that MC's lifeblood
was not flowing as strong as one would imagine. Until a year or two
ago I was convinced MC's development was financed and steered by the
Illuminati...

I'd guess, based on my own experience, that people (that is,
programmers) are simply not aware of MC's predicament. After all, how
would they? There's no sign for that unless one stumbles upon specific
posts here.
___
mc-devel mailing list
https://mail.gnome.org/mailman/listinfo/mc-devel


Re: [ANN] mc^2

2015-05-11 Thread Mooffie
On 5/11/15, Alexander Kriegisch alexan...@kriegisch.name wrote:

 And now there comes along Mooffie and donates something to
 the project. As I expected based on my experience with my own
 patches, people start discussing details and demanding smaller
 patches

In case you're referring here to people asking me to split my patch
into smaller ones, then they're absolutely right in their request.
It's something I certainly ought to do.


 [...] instead of discussing and staying stuck in your analysis
 paralysis?

(I think people here were all positive towards the idea behind mc^2,
so I believe your impression, in this case at least, was wrong. There
was just one guy (Paul) who showed some frustration. I don't think
harm has been done *yet* ;-)
___
mc-devel mailing list
https://mail.gnome.org/mailman/listinfo/mc-devel


Re: [ANN] mc^2

2015-05-10 Thread Mooffie
On 5/10/15, Paul Sokolovsky pmis...@gmail.com wrote:

 ... and the conversation is focused around priority of things to do [...]
 is exciting new is the only thing you're after, then


Paul,

Nowhere did I market mc^2 as bringing exciting new stuff.

If you'd checked out mc^2 site, you'd have found a page listing
reasons to have scripting support. You'd have discovered that one of
my major motives was to help fix this heartbreaking situation of users
whose patches get ignored. I mention there the frustration and
embitterment they feel.

It was even in my announcement message here on this mailing list.

Read it again. Nowhere do I use the words features or new or
exciting or shiny.

The words I *do* use there are to put an end to this waste of human resources.

Read mc^2 frontpage again. The one out of which you plucked one
sentence. Does it have exciting or new or features or shiny on
it?

No, it hasn't.

It talks about making MC's code leaner, and fixing bugs.

What's ironic, Paul, is that if you'd bothered to check out mc^2 you'd
have seen that it concurs with your own agenda. It's just that while
you're just preaching (or bickering, should I say), I'm actually
doing.

Furthermore,

If you ever bother to read the documents there, or my few messages
here, you'll see that I make it a principle to hand over all policy
decisions to the community/maintainers. I market mc^2 only as food
for thought, and I mention directions in which the community, not me,
may choose to go. I also state (the obvious) that the community is
free to deem my work garbage.

I submit myself to their will because I know it's the only way to go
forward in order to achieve the goal, and the goal is not shiny
exciting new features but keeping MC alive and solving the heartaches
of the contributors and users.

Now, don't bother to compose a reply, Paul. I think you'll agree with
me that we probably won't manage a very constructive discussion here.
I'll welcome any private email from you if you wish to, though.
___
mc-devel mailing list
https://mail.gnome.org/mailman/listinfo/mc-devel


Re: [ANN] mc^2

2015-05-09 Thread Mooffie
On 5/8/15, Andrew Borodin aboro...@vmail.ru wrote:

 It would be great if you split first huge commit of branch in several small
 commits. It will make the review easier.

I'll take notice of that.
___
mc-devel mailing list
https://mail.gnome.org/mailman/listinfo/mc-devel


Re: [ANN] mc^2

2015-05-09 Thread Mooffie
On 5/9/15, Yury V. Zaytsev wrote:

 Anyways, how do we move from there on?

I'll be doing two things:

- I'll prepare a document explaining to reviewers the overall
structure of the code and the modifications to existing files.

- I'll look into porting the code to 4.8.14.

The thing I'll appreciate from reviewers at this early stage is
not to criticize the small things (e.g., coding style) but to look
at the big picture.

(I already know some places where I'll get criticism. E.g., in
places where I didn't wan't to refactor things in the old code (e.g., in
src/filemanager/panel.c). Why didn't I? because I didn't think
it was wise to refactor/modify old code before I first get an ok on
the big picture.)
___
mc-devel mailing list
https://mail.gnome.org/mailman/listinfo/mc-devel


Re: [ANN] mc^2

2015-05-08 Thread Mooffie
On 5/8/15, Egmont Koblinger egm...@gmail.com wrote:

 [...] a complete rewrite [...] would require at least 100x (but
 rather 1000x) the work Mooffie has probably already spent. There are
 no engineering resources for that.
 [...]
 Successful redesigns almost always happen in small steps, maintaining
 the usability and quality of the project throughout the steps.
 [...]

Egmont,

Thanks for composing this excellent reply. I actually composed one
myself (a much, much shorter one) before going on-line. I combed it
to see what I could salvage out of it but I see that you've got all
the main points.

Now,

mc^2 isn't perfect. API in a scripting language poses many
challenges (which you mentioned, and Szabó Gergely too). These are
certainly issues we'll have to think about. It's certainly possible
that people will conclude that mc^2 in its present form is garbage,
but at least it provides us with a path we can work on.


 did you just rewrite half of mc

No, it's not a rewrite.

(That's the short answer. The sources (under the 'src/lua' tree) seem
big at first glance, but that's mainly because they have documentation
embedded in them. There are files with just 10% of actual code.)
___
mc-devel mailing list
https://mail.gnome.org/mailman/listinfo/mc-devel


Re: [ANN] mc^2

2015-05-08 Thread Mooffie
On 5/8/15, Egmont Koblinger wrote:
 How much work would it be to port your branch to 4.8.14 or git head
 (they're pretty much the same now)?

Probably very little work.

I'll do that sometime soon, I hope.
___
mc-devel mailing list
https://mail.gnome.org/mailman/listinfo/mc-devel


[ANN] mc^2

2015-05-07 Thread Mooffie
Hi guys!

I've just published a branch of MC with Lua support:

  http://www.typo.co.il/~mooffie/mc-lua/docs/html/

See the screenshots link.

Also see the other documents link for background (especially
HISTORY).

Many, many tickets can be solved with mc^2, but I don't want to spam
the ticket queue with my posts, so I've prepared a list of some such
tickets (see other documents - TICKETS).

(But in a few tickets I *will* comment: in tickets I believe a
constructive discussion could ensue, or where I feel people are truly
in need of a solution.)

==

Now, I guess I'll be attacked for one reason or another. Let me save
your time by attacking myself for you:

==

Q: Is this a 'fork' of MC? Are you trying to split the community?

A: No, this is not a fork (as per Wikipedia's definition). It's intended
   to be food for thought for the MC community. My hope is that
   eventually the principle behind mc^2 will be adopted by MC.

==

Q: Is seems that you've invested a lot of time in this. Gosh, why
waste human resources?! Especially on something that nobody's
going to use?

A: The time I waste here is negligible in comparison to the time and
   efforts wasted by tens of people who have tried to contribute code
   to MC over the years.

   The principle behind mc^2, if adopted by MC, is going to put an end
   to this waste of human resources.

==

Q: But why use Lua?!?! Why not pick the language that starts
with 'P'?! Why not make it work with any language?!??!

A: Let's not talk about languages/VMs *right now*. Please, as much as
   it's tempting.

   Right now, the language is not the issue. The issue is the
   principle, of having some extension language.

   The language/VM is obviously something everybody will have
   something to say about. You will. But not now.

   If every passerby here will now emit his 2 cents opinion/rant,
   it will kill the vision/project. It will start a Holy War. It will
   derail the discussion from the mainroad to the gutters. It's the
   least constructive thing that could happen. It means death.

   In the future, when we know the principle will be regarded favorably
   by MC's maintainers, we could open this issue and discuss things.

   One thing's for sure: You can't give an opinion about the subject
   without considering it for at least a week (or a month, I'd say).
   There are various facets to consider. There are threads of thoughts
   to be picked and discarded. There are insights to be acquired. You
   can't just barge in with use Python!!, use Parrot!, use
   GObject!. As the Chinese saying goes, Opinions are like belly
   buttons: everybody has one. It should take more, much more, than
   an opinion to affect the discussion.

   So, again: let's not talk about languages now.

   (For the record: I recorded my reasons for choosing Lua in
   other documents - HISTORY.)
___
mc-devel mailing list
https://mail.gnome.org/mailman/listinfo/mc-devel


Have STREQ(a,b)?

2015-03-29 Thread Mooffie
I see many `if (strcmp (a, b) == 0)` in the code. Wouldn't it be nice
if we create a macro and then do `if (STREQ (a,b))` instead?

(Not that it bothers me much. I ask this mainly to verify that my
subscription works and that I can post here ;-)
___
mc-devel mailing list
https://mail.gnome.org/mailman/listinfo/mc-devel