sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: neovim
Issue: Multihead: multiple linked clients (like Emacs "frames", multitenancy)
Labels: enhancement,ui,ui-extensibility

Hi Everyone, I've got a few use-cases that I'm wondering if Neovim can solve. If I'm missing something just let me know.

The main thing I'd like to do is to be able to have two or more **linked** Windows (using OS terminology, NOT vim windows, see emacs **frames** for a comparison) of Vim. The reason for this is that it would facilitate multi-monitor set-ups. Each monitor would have its own OS window (I'll call them **widgets** from now on to avoid confusion) and focus could be switched between the two (or more) using vim-bindings.

This is a necessary addition to existing structures like tabs, windows, splits, etc. because often different monitors have different resolutions and arrangements, and Vim doesn't always adapt well to these situations (stretching a single widget across multiple screens doesn't work well, and MANY programmers are using multi-monitor setups).

Some features this would require for optimal use would include:
- If a buffer is present in each widget, they should update themselves with changes made in other widgets (preferably in real-time) 
- It is possible for a buffer to be open in one widget, while not open in another.
- It is possible for a buffer to be open in multiple widgets at the same time.
- All splits, windows, and tabs are managed on a per widget basis (making a split in one widget doesn't affect any others).
- There is only one active cursor between all widgets
- The Vim instance is aware of all windows and can switch between them using keyboard bindings (similar to switching between splits using <ctrl-w>[key] bindings

As far as implementation goes I don't believe something like this is currently possible. Since Vim does not traditionally deal with Widgets itself (leaving that to gVim and MacVim) it would perhaps be more dependent on GUI clients to implement, however it would still be important for Neovim to define an interface which allows this behaviour. These features will come in handy when third-parties begin to look at embedding Vim, and will allow them greater flexibility in doing so.

I don't believe that Vim's server modes allow this behaviour as they are, though it would be possible to extend it's behaviour to accommodate this sort of thing.

If there is any confusion, please ask.  For reference, simply look over how "frames" are handled in Emacs.

I'm not sure whether it would be most beneficial to share a buffer list between widgets or not, that's up for debate I suppose.

Cheers! Thanks for your time.
Repository: go
Issue: test/fixedbugs: bug248 and bug369 fail when the absolute path contains a space
Labels: Testing

Go version:

```
go version devel +6ffed30 Wed Mar 18 15:14:37 2015 +0000 darwin/amd64
```

I did:

```
cd ~/"Google Drive"
git clone https://go.googlesource.com/go
cd go/src
./all.bash
```

I expected to see a successful build and test.

Instead I saw:

```
...
##### ../test
# go run run.go -- fixedbugs/bug248.go
exit status 1
bug2.go:8: import path contains space character: "/Users/drchase/Google Drive/work/go/test/fixedbugs/bug248.dir/bug0"
bug2.go:9: import path contains space character: "/Users/drchase/Google Drive/work/go/test/fixedbugs/bug248.dir/bug1"
```

and a similar failure with bug369.go .
My workaround is to rename "Google Drive" to "GoogleDrive" (and correct external references to the original name).

Small reproducer (can copy and paste into shell):

```
cd;  mkdir -p tmp ; cd tmp ; mkdir "t m p" ; cd "t m p"

cat > main.go <<EOF
package main
import (
  p0 "./x"
  "fmt"
 )
func main() {
  fmt.Println(p0.Id("Hello, playground"))
}
EOF

mkdir x
cat > x/bug0.go <<EOF
package x
func Id (s string) string {
  return s
}
EOF

go tool 6g main.go
# end of copy and paste
```

This produces the error:

```
main.go:3: import path contains space character: "/Users/drchase/tmp/t m p/x"
main.go:7: undefined: p0 in p0.Id
```

Ordinary compilation works fine:

```
$ go run main.go
Hello, playground
```
Repository: rust
Issue: unused-features only warns unused non-language features
Labels: C-enhancement,A-diagnostics,T-compiler

For the following snippet, rustc only warns about `rustc_privat` being unused:

```
#![feature(rustc_private)]
#![feature(box_syntax)]
#![feature(trace_macros)]
#![feature(slicing_syntax)]
#![feature(log_syntax)]

fn main() {}
```

According to the documentation, [check_unused_or_stable_features](https://github.com/rust-lang/rust/blob/master/src/librustc/middle/stability.rs#L570) only checks unused non-langauge features, but it is the only place that emits `UNSUSED_FEATURES`.
Repository: rust
Issue: Poor interaction between int fallback and other flow of type information
Labels: A-type-system,T-compiler,A-inference,C-bug,T-types

A reduced example:

``` rust
use std::ops::Shl;

struct Foo<T>(T);

impl<T> Shl<usize> for Foo<T> {
    type Output = Foo<T>;
    fn shl(self, _: usize) -> Foo<T> { self }
}

impl<T> Shl<i32> for Foo<T> {
    type Output = Foo<T>;
    fn shl(self, _: i32) -> Foo<T> { self }
}

fn main() {
    let _ = Foo(0u32) << 2; // works fine

    let _ = (Foo(0u32) << 2).0; // does not work

    let x = Foo(0u32) << 2; // does not work
    let _ = x.0;

    let x: Foo<u32> = Foo(0u32) << 2; // works
    let _ = x.0;
}
```

generates the following error:

```
<anon>:18:13: 18:31 error: the type of this value must be known in this context
<anon>:18     let _ = (Foo(0u32) << 2).0; // does not work
                      ^~~~~~~~~~~~~~~~~~
<anon>:21:13: 21:16 error: the type of this value must be known in this context
<anon>:21     let _ = x.0;
                      ^~~
```

I suspect what is happening here is that the fallback isn't being triggered early enough -- in particular, before the projection is generating the error. Note that the same problem occurs with a normal struct.

(This may be one reason that `Shl`/`Shr` are only implemented on `usize` for `Wrapping<T>`.)
Repository: neovim
Issue: `set <key>={sequence}` is not implemented
Labels: bug,compatibility,tui,core,mappings

Sorry if this has been addressed in docs, but I searched and couldn't find anything. 

in my vimrc I have 

```
set <k0>=^[Op
set <k1>=^[Oq
set <k2>=^[Or
set <k3>=^[Os
set <k4>=^[Ot
set <k5>=^[Ou
set <k6>=^[Ov
set <k7>=^[Ow
set <k8>=^[Ox
set <k9>=^[Oy
" These '^[' are all \x1b ("escape") chars
```

This is mainly being used with vim-mark now (which already has binds for the numpad `<k0-9>` keys). 

However I am finding that in neovim, the `set <k0>=` isn't actually successfully setting a keycode (`E846: Key code not set: <k0>`) like it does in Vim. 

It also appears that the numpad numbers are being interpreted the same as the actual numbers, so it types into the ephemeral number count buffer. Which is otherwise perfectly reasonable, but not the behavior I am looking for.

So I am wondering what the proper way to do this is. Has setting keycodes with `set` been abolished? I hope not, but if so, do I then need to come up with some sort of new-style keycode like change whatever is mapped to `<k0>` to use `<m-O-p>` or something?
Repository: rust
Issue: region-outlives obligations lead to uninformative/undecipherable region inference failures
Labels: C-enhancement,A-diagnostics,A-borrow-checker,T-compiler,D-confusing

Consider this program:

``` rust
use std::cell::Cell;
trait Foo { fn foo(&mut self); }
struct Pair<'a,'b> { x: &'a Cell<u8>, y: &'b Cell<u8> }

// This impl says it callers of `foo` on `Pair<'a,'b>` must ensure
// that 'b outlives 'a.
impl<'a, 'b:'a> Foo for Pair<'a, 'b> {
    fn foo(&mut self) {
        println!("pre  x: {} y: {}", self.x.get(), self.y.get());
        // 'b outlives 'a, so `&'b Cell<u8> <: &'a Cell<u8>`
        self.x = self.y;
        println!("post x: {} y: {}", self.x.get(), self.y.get());
    }
}

impl<'a,'b> Pair<'a,'b> {
    fn bar(&mut self) {
        self.foo();
    }
}

fn baz<'a,'b>(pa: &'a Cell<u8>, pb: &'b Cell<u8>) {
    let mut p = Pair { x: pa, y: pb };
    p.bar();
}

fn main() {
    let a = Cell::new(1);
    let b = Cell::new(2);
    let pa = &a;
    let pb = &b;
    baz(pa, pb);
}
```

This yields the following error ([playpen](http://is.gd/6ukHwR)):

```
<anon>:18:14: 18:19 error: cannot infer an appropriate lifetime for lifetime parameter `'b` due to conflicting requirements
<anon>:18         self.foo();
                       ^~~~~
<anon>:17:5: 19:6 help: consider using an explicit lifetime parameter as shown: fn bar(&mut self)
<anon>:17     fn bar(&mut self) {
<anon>:18         self.foo();
<anon>:19     }
error: aborting due to previous error
playpen: application terminated with error code 101
```

There is no mention of the region constraint on the impl providing `foo` that is causing calling `foo` from `bar` to fail.

cc @nikomatsakis
Repository: youtube-dl
Issue: Read config file from current directory for portable Windows installation
Labels: request

On Windows, [the config file is currently read](https://github.com/rg3/youtube-dl/blob/master/README.md#configuration) from locations outside where youtube-dl.exe resides.
Repository: rust
Issue: Variables bound with different modes in patterns
Labels: A-borrow-checker,T-compiler,C-bug

The following doesn't compile:

``` rust
enum Test<'a> {
    A(&'a u64),
    B(u64),
}
fn foo(test: Test) {
    match test {
        Test::A(r) | Test::B(ref r) => println!("{}", r)
    }
}
fn main() {
    foo(Test::A(&0));
    foo(Test::B(1));
}
```

failing with the following error:

``` text
test.rs:7:30: 7:35 error: variable `r` is bound with different mode in pattern #2 than in pattern #1
test.rs:7         Test::A(r) | Test::B(ref r) => println!("{}", r)
                                       ^~~~~
error: aborting due to previous error
```

However, the following does work:

``` rust
enum Test<'a> {
    A(&'a u64),
    B(u64),
}
fn foo(test: Test) {
    match test {
        Test::A(&ref r) | Test::B(ref r) => println!("{}", r)
    }
}
fn main() {
    foo(Test::A(&0));
    foo(Test::B(1));
}
```

Is there any reason rust can't just perform this reborrow automatically? `&ref` is a _very_ cryptic pattern.
Repository: neovim
Issue: Nvim calls many getcwd and epoll_wait syscall
Labels: performance

@tarruda please watch this video (download it to your local machine because the preview quality is crap). 

https://www.dropbox.com/s/96ky8qb8xpkdc82/nvim_strace-2015-03-24_12.14.04.mkv?dl=0
That slowness is noticeable using `unite.vim` plugin.
Repository: rust
Issue: error: overflow evaluating the requirement `<_ as core::iter::Iterator>::Item`
Labels: C-enhancement,T-compiler

```
src/lib.rs:1:1: 1:1 error: overflow evaluating the requirement `<_ as core::iter::Iterator>::Item` [E0275
src/lib.rs:1 //!                                                                                         
             ^                                                                                           
```

The error suggests adding a recursion requirement to my crate root

```
note: consider adding a `#![recursion_limit="128"]` attribute to your crate
```

It continues to recommend doubling the recursion limit until I've raised it so high that rustc itself overflows it's stack

```
thread 'rustc' has overflowed its stack                                                                                                                                                            
Could not compile `mindtree_utils`.
```

[Here's a link](https://github.com/mitchmindtree/utils-rs) to the repository that is failing to build in case you would like to give it a go.

The error only appeared in the latest nightly for rustc (I'm fairly sure the crate was building fine before I updated). Here's the version of the nightly I've just downloaded which seems to have caused the failure:

```
rustc 1.0.0-nightly (123a754cb 2015-03-24) (built 2015-03-25)
```
Repository: go
Issue: x/tools/cmd/eg: embedded fields are mishandled
Labels: NeedsInvestigation

$GOPATH/src/egbug/x.go:

``` go
package egbug

type T struct {
    *E
    E2 *E
}

type E struct {
    Next *T
}

func main() {
    var t *T
    t.Next = new(T)
}
```

Template:

``` go
package p

import "egbug"

func before(t *egbug.T) *egbug.T { return t.Next }
func after(t *egbug.T) *egbug.T  { return t.E2.Next }
```

eg output:

``` go
package egbug

type T struct {
    *E
    E2  *E
}

type E struct {
    Next *T
}

func main() {
    var t *T
    t.E2.E2.Next = new(T)
}
```

The second statement in main should be `t.E2.Next`, not `t.E2.E2.Next`. The output does not compile.
Repository: rust
Issue: Type inferencer probably could figure this case out (associated types)
Labels: A-type-system,C-enhancement,T-compiler,A-inference,T-types

``` rust
trait Async {
    type Value;
    type Error;
}

enum Result<T, E> {
    Ok(T),
    Err(E),
}

impl<T, E> Result<T, E> {
    fn reduce<F, U>(self, init: U::Value, action: F) -> U::Value
            where F: Fn(U::Value, T) -> U,
                  U: Async<Error=E> {
        unimplemented!();
    }
}

impl Async for i32 {
    type Value = i32;
    type Error = ();
}

pub fn main() {
    let res: Result<&'static str, ()> = Result::Ok("hello");
    let val: i32 = 123;

    res.reduce(val, |val /* i32 */, curr| val);
    // Compiles if annotated ^^
}
```

cc @nikomatsakis
Repository: go
Issue: x/tools/cmd/eg: needs package documentation
Labels: Refactoring

I pointed someone to https://golang.org/x/tools/cmd/eg, which unhelpfully says "For documentation, run the command , or see Help in golang.org/x/tools/refactor/eg". The command cannot be run on mobile, so they following the unclickable link (with some effort) to discover a Help that is not helpful:

`const Help = "" /* 4235 byte string literal not displayed */`

Please consider using the technique adopted by the Go tool for package documentation: it is generated from help output.

https://github.com/golang/go/blob/master/src/cmd/go/mkdoc.sh
Repository: rust
Issue: Order of operands to equality expression matters when inferring a AsRef implementation
Labels: A-type-system,P-low,I-needs-decision,T-compiler,A-inference,C-bug,T-types

This may be related to or the same as #23673, but I wanted to file it anyway as it seems to have a slightly different flavor.

``` rust
#![feature(convert)]

struct Container {
    i: u8,
    b: bool,
}

impl AsRef<u8> for Container {
    fn as_ref(&self) -> &u8 {
        &self.i
    }
}

// A second implementation to make the `as_ref` ambiguous without further information
impl AsRef<bool> for Container {
    fn as_ref(&self) -> &bool {
        &self.b
    }
}

fn main() {
    let c = Container { i: 42, b: true };

    // Succeeds
    &42u8 == c.as_ref();

    // Fails
    c.as_ref() == &42u8;
}
```

Fails with 

```
type annotations required: cannot resolve `Container : core::convert::AsRef<_>` [E0283]
```

However, if you flip the order of the arguments to the equality operator, then the code compiles and the correct type is inferred. It seems as if both forms should work the same.

Originally from this [Stack Overflow question](http://stackoverflow.com/q/29278940/155423)
Repository: go
Issue: runtime/cgo: test signal from foreign thread before cgo call
Labels: compiler/runtime

A C++ program can trigger the Go signal handler from a global constructor before any cgo calls are made. As badsignal uses cgocallback, this requires an extra M be initialized. This was done for #10207, as it appears to sometimes happen with the os/signal tests on darwin/arm.

It needs a robust test.

There also needs to be some decision made about how this interacts with the deadlock detector. (Perhaps another issue.)

/cc @dvyukov
Repository: You-Dont-Know-JS
Issue: "async & performance": revise "TCO" discussion
Labels: for second edition

- Move TCO from Chapter 6 to Chapter 5
- Slim it down
- Refer to TCO in "ES6 & Beyond"
Repository: neovim
Issue: :terminal should not use &shell
Labels: terminal

I use fish as a default shell, but sh as my shell for vim scripts because many of the plugins I use assume the standard sh syntax. fish does work, actually very well, with `:terminal`.

According to [one SO answer](http://stackoverflow.com/questions/11059067/what-is-the-nix-command-to-view-a-users-default-login-shell), the login shell can be obtained by running

``` bash
$ getent passwd $LOGNAME | cut -d: -f7
```

...and for Mac, [another SO answer](http://stackoverflow.com/questions/16375519/how-to-get-default-shell) recommended the same, but using this:

``` bash
$ grep ^$(id -un): /etc/passwd | cut -d : -f 7-
```

although the `^$(id -un)` syntax isn't fish-compatible and `grep` may output more than one username.
Repository: electron
Issue: Support click-through of transparency
Labels: enhancement :sparkles:,component/transparent

As commented here, https://github.com/atom/atom-shell/pull/949#issuecomment-87087841 - transparent windows unfortunately are of limited use unless you can click through the transparent area.

I noticed that in the [documentation](https://github.com/atom/atom-shell/blob/master/docs/api/frameless-window.md#limitations) it is stated that this is blocked by an upstream bug. The nw.js project DOES have [support for this](https://github.com/nwjs/nw.js/wiki/Transparency#click-through-transparency), but i'm not sure how different their implementation is...

I think this is worth the issue to track discussion and implementation, so here it is.
Repository: go
Issue: cmd/compile: inline function calls that return a closure
Labels: Performance,NeedsInvestigation,compiler/runtime

https://go-review.googlesource.com/#/c/8200/ added a benchmark to the strings package that shows strings.Trim and its variants allocate memory. The allocation is caused by the call to makeCutsetFunc <a href="https://github.com/golang/go/blob/master/src/strings/strings.go#L625">here</a>. Inlining this call removes the allocation and provides a nice performance boost to Trim. You can see the effect on the benchmark using Go Tip (commit 6262192cd0fb98d6bb80752de70ae33fc10dc33e) below:

```
benchmark         old ns/op     new ns/op     delta
BenchmarkTrim     3204          2323          -27.50%

benchmark         old allocs     new allocs     delta
BenchmarkTrim     11             0              -100.00%

benchmark         old bytes     new bytes     delta
BenchmarkTrim     352           0             -100.00%
```

makeCutsetFunc is a pretty simple function (all it does is return a closure), and it was pointed out in review that it might be nice to inline functions like it in the compiler rather than changing strings.Trim explicitly.
Repository: javascript
Issue: Please include the "Why" in your styleguide
Labels: enhancement

Hi there

As your styleguide is getting popular I just wanted to express some concerns I have with it. I'm generally for styleguides, however, I believe that things are always depending on a context and if you're classifying something as bad / good you should always include a "why" and reason about your decision. There is nothing more frustrating than seeing developers which were trained to accept a fact that something is good or bad but they don't know the reasoning behind. Things can change from one day to the other and they will have no background to re-validate their decisions.

From an educational standpoint but also for future maintenance of your styleguide (as things are changing and you need to adopt) I strongly recommend you to include short reasoning in your examples why something is considered good or bad at that given time and context. One example would be in your type coercion entries. Why is it bad to use the unary + operator to convert a string to a number? In some context this makes absolute sense (both float and int can be converted, hex and exponent strings can be converted) and also it's faster than parseInt / parseFloat. If you include the "why" in your comments you can clarify your assumptions and the context.

There are also plenty of recommendations that are based on pure preference. Although, I prefer single quote over double quote string notation, and I have my personal functional explanation why I prefer them, there is no general explanation why they should be preferred. This is simply personal preference with some vague functional reasoning. I can imagine a lot of young developers following your styleguide will think that there is something wrong with double quotes and they will probably think JSON is ridiculously flawed and the jQuery source code (they prefer double quotes) is a pile of crap... I'd really also put a reasoning behind it and also explain that it's not necessarily a bad thing, whats really bad is not being consistent.

Thanks and I hope you agree to my motivation.

Cheers
Gion
Repository: TypeScript
Issue: Suggestion: allow instantiation of type aliases
Labels: Suggestion,Needs Proposal

Currently a type aliased class [cannot be instantiated](https://github.com/Microsoft/TypeScript/issues/2552). Also there is no way to alias a [type with type parameters](https://github.com/Microsoft/TypeScript/issues/1616). Please consider making type aliases as capable as the types that they represent, basically capturing the type expression under a different name.
Repository: neovim
Issue: clipboard=autoselect
Labels: clipboard,has:workaround

It will be convenient if neovim can automatically send visual selection to clipboard (without yanking).
Repository: nvm
Issue: Test failure
Labels: testing,pull request wanted

On master, `npm run test/fast` fails for me:

```
$ npm run test/fast

> nvm@0.24.0 test/fast /home/ubuntu/src/nvm
> shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=fast test-$shell


Running tests in bash
Running tests at 2015-04-02T15:15:03
  test/fast
    ...
    Listing versions
    ...
    ✓ Running "nvm ls stable" and "nvm ls unstable" should return the appropriate implicit alias
    ✗ Running "nvm ls system" should include "system" when appropriate
"nvm ls system" contained "system" when system node is not present
    ✓ Running "nvm ls" should display all installed versions.
    ✓ Running "nvm ls" should filter out ".nvm"
    ✓ Running "nvm ls" should filter out "versions"
    ✗ Running "nvm ls" should include "system" when appropriate
"nvm ls" contained "system" when system node is not present
    ✓ Running "nvm ls" should list versions in the "versions" directory
  ...
  ✓ Running "nvm use iojs" uses latest io.js version
  ✗ Running "nvm use system" should work as expected
Did not report error, system node not found
  ✓ Running "nvm use x" should create and change the "current" symlink
  ...


Done, took 42 seconds.
69 tests passed.
3 tests failed.
make: *** [test-bash] Error 3

npm ERR! Linux 3.13.0-48-generic
npm ERR! argv "/home/ubuntu/.nvm/versions/io.js/v1.6.3/bin/iojs" "/home/ubuntu/.nvm/versions/io.js/v1.6.3/bin/npm" "run" "test/fast"
npm ERR! node v1.6.3
npm ERR! npm  v2.7.4
npm ERR! code ELIFECYCLE
npm ERR! nvm@0.24.0 test/fast: `shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=fast test-$shell`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the nvm@0.24.0 test/fast script 'shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=fast test-$shell'.
npm ERR! This is most likely a problem with the nvm package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=fast test-$shell
npm ERR! You can get their info via:
npm ERR!     npm owner ls nvm
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/ubuntu/src/nvm/npm-debug.log
```

I do have a system Node at `/usr/bin/nodejs` [sic], but no system-wide `node` (without `js` suffix); running Ubuntu 14.04.2.