Giter Site home page Giter Site logo

composable.el's People

Contributors

d12frosted avatar damiencassou avatar ergus avatar gaudecker avatar paldepind avatar randymorris avatar s-kostyaev avatar syohex 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

composable.el's Issues

Visual feedback

A great package! It would be nice if there is some visual feedback when entering composable commands.

Some examples:

  • In evil-mode, after we press d, the cursor's height shrinks to a half.
  • There is a similar package easy-kill which only deals with M-w. easy-kill adds an overlay to show the current copied region. It is very useful for commands that don't modify the buffer (M-w etc.).
  • After entering a composable command, show the key sequence in the echo area (something like C-w l l). Help message could also be added, similar to what hydra does, showing the available object key bindings. Adding a variable to control whether the verbose help message should be displayed.

EDIT: fix some typos.

Hooks for use with god-mode

In the god-mode readme you'll find the following example:

(defun god-toggle-on-overwrite ()
  "Toggle god-mode on overwrite-mode."
  (if (bound-and-true-p overwrite-mode)
      (god-local-mode-pause)
    (god-local-mode-resume)))

(add-hook 'overwrite-mode-hook 'god-toggle-on-overwrite)

What hooks does composable-mode provide in order to be able to pause god-mode? Otherwise in god-mode w} results in god-mode complaining C-} is not bound.

`#'composable-comment-or-uncomment-region` doesn't work as expected.

When I run M-; } }

|(cursor)
(defclass variables ()
  ((eyes :initarg :eyes :accessor eyes)
   (tongue :initarg :tongue :accessor tongue)
   (thoughts :initarg :thoughts :accessor thoughts)))

(defun make-variables (eyes tongue thoughts)
  (make-instance 'variables :eyes eyes :tongue tongue :thoughts thoughts))

Expected behavior:

;; (defclass variables ()
;;   ((eyes :initarg :eyes :accessor eyes)
;;    (tongue :initarg :tongue :accessor tongue)
;;    (thoughts :initarg :thoughts :accessor thoughts)))

;; (defun make-variables (eyes tongue thoughts)
;;   (make-instance 'variables :eyes eyes :tongue tongue :thoughts thoughts))

Current behavior:

;; ;; (defclass variables ()
;; ;;   ((eyes :initarg :eyes :accessor eyes)
;; ;;    (tongue :initarg :tongue :accessor tongue)
;; ;;    (thoughts :initarg :thoughts :accessor thoughts)))

;; (defun make-variables (eyes tongue thoughts)
;;   (make-instance 'variables :eyes eyes :tongue tongue :thoughts thoughts))

I get why that becomes that, but it's particularly annoying, especially when uncommenting (instead of commenting I showed here).

Access keymap

I would like to be able to use hydra with composable, but there is no variable with the keymap for composable-object-mode.

Feature request: new object upper-sexp

Firstly thanks for this great package. I think that new text object upper-sexp with behavior like expand-region will be very useful. I don't see package internals yet, but maybe I'll try to add this object and send PR if you agree to add it and don't want to do it yourself.

Way to show object binding keys automatically

I've gotten used to which-key showing all my options, but that doesn't happen when compose-object-mode, and it would be nice to see the various object commands I can use to help memorize them better.

It would be nice if either:

  1. composable-object-mode worked with which-key automatically. I.e. I do C-w and now I see menu that tells me what "l" etc. does.
  2. Or, there was a hydra provided (or just it's documented how to do a hydra).

Problem with mark

Hi:

When the option mark-even-if-inactive is nil the package only gives errors because there is not mark.

The solution is to call the mark command as (mark t) to avoid the error and add a conditional when needed.

Numeric prefixes don't work

Hello,

Just run into problem with numeric prefixes. Tried several commands with them and seem like none of them are working properly. Here is my setup.

  1. $ emacs -Q
  2. add composable to load-path
  3. (require 'composable)
  4. switch to scratch buffer (in fundamental mode)
  5. (composable-mode)

So I am performing following steps.

  1. type first second third fourth
  2. place cursor at f in first
  3. C-w 3 f

I expect it to kill first second third and leave fourth. But instead it places fff. Note that doing C-w f C-w f C-w f works as expected as well as C-w f f f.

Am I missing something?

P. S. M-w, M-; commands also insert f or l or whatever I used as target.

P. P. S. I am using emacs-25. Will try on emacs 24 a little bit later.

Moving to Elpa

Hi Simon:

Could we consider to add composable to elpa? The most complex part is to contact all the developers who contributed to this package with more than 15 lines of code and ask them to request a copyright assignment from the FSF; but with git shortlog -sne I actually see that you are the only other than me. I already have the assignment; could you try to do it please?

Best,
Ergus

Feedback on README

Here is some feedback regarding the README I just read. I can send a PR for some of these points if you want.

  • "The default object bindings": in the table, I don't understand some
    lines, e.g., the first two. (ok, you explain them after, maybe you could say that in the table)
  • Before understanding what the package is about, there are quite some
    lines to read. What about putting some examples right at the beginning (you
    already have them in "Basic Usage")
  • "Create custom composable command": you could give a meaningful
    example. Something like, "suppose you have a function
    rename-variable-region that replaces all occurrences of a variable
    name in the region by another name, you can make it composable by..."
  • "Composable mark mode": I understand I can type "C-SPC l", but I
    don't know what this will do
  • "Prefix arguments": I guess it could be clearer with more examples, right from the beginning.
  • "With pair movements": what does M-w . f do?

Appears to break pop mark command

Hello,

When I have composable-mark-mode enabled, popping the mark seems to do nothing (i.e. C-u C-SPC).

I have tested this with the minimal configuration i.e. emacs -Q, (load "composable-mark.el") (load "composable.el") (composable-mark-mode) followed by pushing and popping the mark.

Halp!

Thanks,

Tom

Composable save region fails if region exists

When running M-w (composable-save-region) when a region has already been delineated using transient mark mode, emacs reports an error:

Marker points into wrong buffer: #<marker in no buffer>

Version:
26.2
Steps to reproduce:
$ emacs -Q
evaluate (package initalize)
evaluate (composable-mode 1)
Select a region using movement while holding shift, then press M-w to save the region.

Trying to kill in a readonly buffer fails

When trying to kill in a readonly buffer, emacs remains in the state where it expects a move command.

There is also an error in post-command hook.
Notice also

  • Version:
    25.0.50.1, windows version.
  • Steps to reproduce:
    $ emacs -Q
    evaluate (package initalize)
    evaluate (composable-mode 1)
    M-x read-only-mode and press C-w C-w, in the scratch buffer, yields:

Error in post-command-hook (composable--post-command-hook-handler): (buffer-read-only #<buffer scratch>)

Repeat command with numeric prefix needs composable-end-argument

The readme says C-w 10 l should delete 10 lines but for me it just inserts 10 l characters. To get repeat to work I have to C-w . 5 l. I have to use the '.' composable-end-argument in there.

I also tried this with emacs -Q and loading just composable-mode.

I am using emacs version 25.1.50.2

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.