Code Monkey home page Code Monkey logo

auto-sudoedit's People

Contributors

amake avatar c0001 avatar dragoncraft89 avatar lemonbreezes avatar ncaq 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

Watchers

 avatar  avatar  avatar

auto-sudoedit's Issues

OCaml環境でのsmart-jump-goと相性が悪い

システムライブラリに飛んだ時、リードオンリーなので開き直されるのは仕方ないとして、smart-jump-goで飛んだ場合何故か /root/ をtrampで開いてしまう。
merlin-locateで直接飛んだ時は問題なし。

Is the concept corect?

My apologies, I may just not understand the idea behind auto-sudoedit, but I do have difficulties understanding the idea behind it:

  • I open a file that is rw-r--r-- root:root as user foo. Emacs opens it.
  • I try to edit it, but emacs says it's only rw for root, foo can't edit it.
  • I try to save it (without editing), emacs says "no need to save, no changes"

Shouldn't auto-sudoedit instead intercept the "find-file" function and say "hey, you won't be able to edit/save this file, do you want to open it as root via tramp instead"?

親ディレクトリに書き込めるが子ディレクトリに書き込めない形式に対応する

#3 でとりあえずディレクトリが存在しない方に寄せるようにしたが,
/var/tmp/systemd-private-45f10fa9b0de45f48a257a8e512c83c0-rtkit-daemon.service-FagvJXのように親ディレクトリが書き込めるが子ディレクトリが書き込めないケースで問題が発生する.
何の関数を使うように変更すれば良いだろうか.
単に場合分けするしかない?

Feature upstreaming

Hi 👋
I did some customizations for my use-case: Dragoncraft89@7c70781

Now, I'm wondering what parts you'd like me to contribute back upstream. Here's a list of my changes:

Bug fixes

  • Sudo syntax over tramp was wrong, which made reopen as sudo trying to open an invalid file when using tramp

Features

  • advice-add doesn't work when you use a different find-file function (such as ido-find-file). This may be the problem observed in #11 . I solved this by using the find-file-hook instead.
  • Added a y-or-no-p query before reopening the buffer. This allows you to open files when you don't have sudo permissions (e.g. via tramp on other people's machines)
  • Added auto-detection of the user owning a file. Therefore auto-sudoedit can reopen files as other users beside root (e.g. as www-data)

Just tell me whether you'd like me to upstream some of these changes and I'll happily prepare a pull request

`auto-sudoedit-sudoedit` invocation fails

Invoking auto-sudoedit-sudoedit fails with this error:

Symbol’s function definition is void: auto-sudoedit-current-path

auto-sudoedit-current-path was removed in #6, but is still referenced by auto-sudoedit-sudoedit.

sudo-edit as a backend

Nice idea, but I think it'd be better to use sudo-edit as a backend engine, because it has more checks and covers many more cases of filenames.

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.