Giter Site home page Giter Site logo

mg's People

Contributors

hboetes avatar liangfu avatar ulm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mg's Issues

Requesting support for Parinfer

I don't know who the original maintainers of "mg" (under OpenBSD) are, so writing to you with the hope that either you could consider providing the requested feature, or forward this request to the appropriate individual(s).

Would it be possible for "mg" to provide parentheses balancing and indentation support using the Parinfer mechanism/algorithm?
Description of Parinfer is available at https://shaunlebron.github.io/parinfer/
Hope I haven't overstepped my limits by requesting the above. Thank you.

Syntax highlight

Hi:
Do you plan to implement syntax highlight sometime. At least the most basic functionalities?

Upon saving, file permissions are restored to the value they had when file was opened

Here is a demonstration of the problem, using mg 20200723-1 as packaged in Debian testing:

% mg foo
# Edit buffer, save it, suspend mg.
zsh: suspended  mg foo
% chmod 600 foo
% fg
[2]  - continued  mg foo
# Modify buffer, save it again, suspend mg.
zsh: suspended  mg foo
% ls -l foo
-rw-rw-r-- 1 user user 9 Jan  5 17:24 foo

This behavior can be a problem if one edits configuration files that need specific permissions. This is how I got bitten by it.

Other editors I checked (GNU emacs and zile) preserve permissions that are modified while a file is open.

.mg file is... ignored?

I have the following lines inside my ~/.mg file

make-backup-files 0

Yet mg still makes backups. When i use make-backup-files interactively, only then it says they're disabled.

From the manpage:

Many commands take an optional numerical
parameter, n. This parameter is set either by M- (where n is the numerical argument) before the
command, or by one or more invocations of the universal argument, usually bound to C-u. When in‐
voked in this manner, the value of the numeric parameter to be passed is displayed in the
minibuffer before the M-x. One common use of the parameter is in mode toggles (e.g. make-backup-
files). If no parameter is supplied, the mode is toggled to its alternate state. If a positive
parameter is supplied, the mode is forced to on. Otherwise, it is forced to off.

Does this also apply to the ~/.mg file? Why is the configuration file not covered more in the manual?

error: no member named 'st_atim' in 'struct stat'

Hello, we have an old version of mg in MacPorts which I'm trying to update to your latest version 20180927. I'm trying to build it on macOS High Sierra.

First, it told me to install libbsd. I tried to build libbsd, but it failed. I reported that to the developers of libbsd. Then, since macOS is based on BSD, I tried patching your makefile so that it would not require a separate libbsd.

That got me further, and now it fails to build for me with this error:

fileio.c:282:20: error: no member named 'st_atim' in 'struct stat'
        new_times[0] = sb.st_atim;
                       ~~ ^
fileio.c:283:20: error: no member named 'st_mtim' in 'struct stat'
        new_times[1] = sb.st_mtim;
                       ~~ ^
2 errors generated.

I've run into this problem with other projects as well. Seems this is just one of those things that different operating systems do differently: macOS doesn't use the names st_atim, st_ctim, st_mtim, but instead uses st_atimespec, st_ctimespec, st_mtimespec.

Since the last release, I see you've added cmake support. Maybe you could have cmake detect which time fields to use on the current OS.

Three more bugs in display-wide-characters

Hi!

First, I noticed auto-fill-mode bug: one UTF-8 character counts as multiple characters. That is, it creates new line too early.

Second, just right after that I tried to delete characters at next line. When I delete that line, the last character at previous line is also removed.

failing to build in Fedora 32

mg 20180408 builds for Fedora 31, but not Fedora 32.

The relevant part of the build where it fails in Fedora 32:

/usr/bin/ld: basic.o:/builddir/build/BUILD/mg-20180408/def.h:757: multiple definition of `rptcount'; autoexec.o:/builddir/build/BUILD/mg-20180408/def.h:757: first defined here
/usr/bin/ld: basic.o:/builddir/build/BUILD/mg-20180408/def.h:756: multiple definition of `tcdell'; autoexec.o:/builddir/build/BUILD/mg-20180408/def.h:756: first defined here
/usr/bin/ld: basic.o:/builddir/build/BUILD/mg-20180408/def.h:755: multiple definition of `tcinsl'; autoexec.o:/builddir/build/BUILD/mg-20180408/def.h:755: first defined here
/usr/bin/ld: basic.o:/builddir/build/BUILD/mg-20180408/def.h:754: multiple definition of `tceeol'; autoexec.o:/builddir/build/BUILD/mg-20180408/def.h:754: first defined here
/usr/bin/ld: basic.o:/builddir/build/BUILD/mg-20180408/def.h:346: multiple definition of `winch_flag'; autoexec.o:/builddir/build/BUILD/mg-20180408/def.h:346: first defined here
/usr/bin/ld: bell.o:/builddir/build/BUILD/mg-20180408/def.h:757: multiple definition of `rptcount'; autoexec.o:/builddir/build/BUILD/mg-20180408/def.h:757: first defined here
/usr/bin/ld: bell.o:/builddir/build/BUILD/mg-20180408/def.h:756: multiple definition of `tcdell'; autoexec.o:/builddir/build/BUILD/mg-20180408/def.h:756: first defined here
/usr/bin/ld: bell.o:/builddir/build/BUILD/mg-20180408/def.h:755: multiple definition of `tcinsl'; autoexec.o:/builddir/build/BUILD/mg-20180408/def.h:755: first defined here
/usr/bin/ld: bell.o:/builddir/build/BUILD/mg-20180408/def.h:754: multiple definition of `tceeol'; autoexec.o:/builddir/build/BUILD/mg-20180408/def.h:754: first defined here
/usr/bin/ld: bell.o:/builddir/build/BUILD/mg-20180408/def.h:346: multiple definition of `winch_flag'; autoexec.o:/builddir/build/BUILD/mg-20180408/def.h:346: first defined here

The builds are:

The relevant logs are:

libbsd was upgraded form 0.9.1 in f31 to 0.10.0 in f32 if that is relevant.

I tried upgrading to 20180927 but it also failed to build in f32 with the same error. 20180927 builds fine in f31 though.

The relevant logs for 20180927 are:

new tag?

Would it be possible to add a new tag, if the code is in a sufficiently stable state? This would help to release a new package for Debian.

add version numbers, please?

Hi Han,

I am maintainer for mg in Debian. Problem is: Since 2018 there are no tagged new versions for mg on github anymore, even though mg in OpenBSD 6.6 appears to be pretty stable. Without version numbering it is very difficult to provide new Debian packages. I have no indication to tell a good from a bad version. You know much better.

Do you think it would be possible to tag a version from time to time? Following the version number schemer from the "pre-github" time would be sufficient.

Thanx in advance
Harri

Containerfile to generate static builds

Preamble: static binaries are great, but you can't really build them with glibc, to fix that problem I want to create a Containerfile, so I can simply build a static binary:

Here is that Containerfile:

FROM docker.io/library/alpine
RUN apk update
RUN apk add git libbsd-dev ncurses-dev musl-dev ncurses-static gcc make
RUN git clone https://github.com/hboetes/mg.git
WORKDIR mg
RUN TAG=$(git describe --tags); \
    git checkout $TAG; \
    make STATIC=1; \
    strip mg; \
    ln mg mg-$TAG-static-x86_64

You can create the static binary like this:

% sudo podman image build --rm -t mg-static .
[SNIP: lots of output]
% sudo podman image ls                       
REPOSITORY                TAG         IMAGE ID      CREATED         SIZE
localhost/mg-static       latest      93dc44a79f11  15 seconds ago  163 MB
docker.io/library/alpine  latest      14119a10abf4  3 weeks ago     5.87 MB
% sudo podman run -it 93dc44a79f11

To get the binary out, open another terminal and run:

% sudo podman ps                  
CONTAINER ID  IMAGE                       COMMAND     CREATED         STATUS             PORTS
f4e0aa32f16a  localhost/mg-static:latest  /bin/sh     34 seconds ago  Up 33 seconds ago
% sudo podman exec f4e0aa32f16a sh -c "ls /mg/mg-*"
/mg/mg-20210609-1-g0b69dcc-static-x86_64
% sudo podman cp f4e0aa32f16a:/mg/mg-20210609-1-g0b69dcc-static-x86_64 .

What works:

  • The binary is successfully created and can be copied out of the container:

What I don't like:

  • This is clumsy, can't I directly copy the binary out of the container with instructions in the Containerfile?
  • I need to run this as root for some reason or another. What am I missing here?

Which mg does Apple ship?

Hi there - I notice that Apple is now shipping mg (whether it's part of the base MacOS install, or part of their optional "Command Line Tools for Xcode" package, I'm not sure, as I've already installed the latter on my machine).

I'm wondering which mg codebase they're using, and went looking at https://opensource.apple.com , but could not find any trace of mg.

Do you know what the deal is?

Consolidate with other OpenBSD mg ports?

Greetings. I found the following other OpenBSD mg ports:

Considering that these are now 4 repos for the same purpose, would you be willing to contact their maintainers and merge your work with one of them? :) IMHO, ibara's version seems to be the best maintained. It "aggressively tracks upstream" and is "Tested on recent versions of Arch, Cygwin, Debian, DragonFly BSD, FreeBSD, Mac OS X (10.10 or later), NetBSD, Slackware, and Ubuntu." It would be great to have a single portable OpenBSD mg repo that could be added to all OS package managers.

tag, please?

Hi Han,
would you mind to add a tag to the version of March 31st? I would like to use it to provide a new Debian package.
Thank you very much
Harri

Backspace Key not deleting

Hello, as I read in the tutorial file, it said To delete characters, use the backspace key. But when I did backspace, it showed a b c:. I am not sure if this has a different meaning, but it would be useful to have a backspace working rather than moving one letter forward and doing ^D.
Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.