GithubHelp home page GithubHelp logo

ed-mode's Introduction

ed for Emacs

ed-mode lets you interact with Emacs buffers like you would do with the ed editor.

Installation

Make sure that ed-mode.el is in your load-path, then add (require 'ed) to your init file.

Usage

Use ed by opening a file like you’d normally do, and then do: M‑x ed RET

ed-mode's People

Contributors

echosa avatar ryanprior avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

ed-mode's Issues

Upstreaming to Guix

Hi @ryanprior

I currently have this package sitting at libremiami-packages and I would like to upstream it.

Are you planning to make a release?

Also how have you successfully ran the tests in the past?

I currently have tests disabled in the guix package I linked above.

I have the relevant test command I tried running in a comment in the package definition linked above and below here:

(native-inputs
  `(("ert-runner" ,emacs-ert-runner)))
(arguments
 `(#:tests? #t
    #:test-command '("emacs" "-Q" "-batch" "-l" "ed-mode-tests.el" "-f" "ert-run-tests-batch-and-exit")))

all best

(u)ndo doesn't always do what it should

Hello! @ryanprior recently e-mailed me about this amazing repository. While my original CVS repository of this thing is probably gone for good (and with that the TODO file that I once had), I spent a while trying to remember what "original" issues still might persist.

The only relevant one is that ed-cmd-undo doesn't work like in other implementantions of ed. This is mentioned in the docstring, but to clarify, here's one example I managed to think of:

In standard ed I can do this:

i
this is the first line
.
a
this is the second line
this is the third line
.
1,$p
this is the first line
this is the second line
this is the third line
u
1,$p
this is the first line

So the undo reverts the changes made to the buffer by the previous command. However, in ed-mode.el this happens:

i
this is the first line
.
a
this is the second line
this is the third line
.
1,$p
this is the first line
this is the second line
this is the third line

u
1,$p
this is the first line
this is the second line

So calling the Emacs undo doesn't revert everything that was appended by the second command but just the last line - which, now that I think about it, is quite logical since we are just doing line-by-line inserts into the buffer.

I'm not 100 % sure if this is just an issue with input mode commands (i, a and c) - but if that is the case, the fix might be a lot easier than what I thought 14 years ago: just build an intermediate buffer string while doing input mode, then insert it all in one go when . is used to exit. If everything gets inserted in one go, then I think undo should also work properly.

If someone can think of other cases than i / a / c where undo messes up, then we might need to think of something more elaborate 😄

Other than this, I just had some commands missing, and it looks like @echosa already has a pull request for adding placeholders. Nice!

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.