# Some questions about scratch buffer on pre-packaged Arch kak

**URL:** <https://discuss.kakoune.com/t/some-questions-about-scratch-buffer-on-pre-packaged-arch-kak/430>\
**Category:** Help\
**Tags:** buffer\
**Created:** [April 5, 2019, 7:09am UTC](https://discuss.kakoune.com/t/some-questions-about-scratch-buffer-on-pre-packaged-arch-kak/430 "2019-04-05T07:09:36Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![nonumeros](https://discuss.kakoune.com/letter_avatar_proxy/v4/letter/n/90ced4/32.png) [@nonumeros](https://discuss.kakoune.com/u/nonumeros)\
**Post date:** [April 5, 2019, 7:09am UTC](https://discuss.kakoune.com/t/some-questions-about-scratch-buffer-on-pre-packaged-arch-kak/430/1 "2019-04-05T07:09:36Z")

</div>

I was reading buffers.asciidoc

> One particular scratch buffer, named _\*scratch_\*, is automatically created when there are no other buffers left in the current session. (which is also the case at Kakoune’s startup when no files to open have been provided)  
> A scratch buffer can be created by passing the `-scratch` switch to the  
> `:edit` command.

As [Only create a default \*scratch\* when we dont have any non debug buffers · mawww/kakoune@5440d31 · GitHub](https://github.com/mawww/kakoune/commit/5440d31f995d9143e4f14a343a41aaab227ffbad) specified it this is when any non debug buffers exists

But on my Arch Linux pre-packaged kak, invoking it, does not open the default \*\*scratch\*\* buffer.

I tried to follow some of the discussions regarding this issue, but I didn’t see anything that would be related

Bottom line is that my pre-packaged kak does not have a scratch buffer.

I’m wondering if my configuration or if other flags were passed during compilation of kak. But I guess if it’s the latter, the maintainer is obviously whom to ask in this case.

Build Date: 01-20-2019  
Maintainer: Maxim Baz

---

<div class="post-metadata">

**Author:** ![Screwtapello](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/screwtapello/32/12_2.png) [@Screwtapello](https://discuss.kakoune.com/u/Screwtapello)\
**Post date:** [April 5, 2019, 7:55am UTC](https://discuss.kakoune.com/t/some-questions-about-scratch-buffer-on-pre-packaged-arch-kak/430/2 "2019-04-05T07:55:10Z")

</div>

There’s a difference between “the `*scratch*` buffer” (the specific  
buffer named `*scratch*`) and “a scratch buffer” (any buffer that  
happens to have the “scratch” flag set). The `*scratch*` buffer is _a_  
scratch buffer, but not every scratch buffer is the `*scratch*` buffer.

If you run `kak` with no arguments, or if you’re in Kakoune and you  
execute the `:delete-buffer` command enough times, you should wind up in  
the `*scratch*` buffer. In the bottom-right corner of the terminal,  
the status line should say something like:

```
*scratch* 1:1 [scratch] 1 sel - client0@[1234]

```

…where `*scratch*` is the name of the buffer, and `[scratch]` is a  
flag that shows up in the status line for every scratch buffer.

If you’re in Kakoune and you run a command like:

```
:edit -scratch foo

```

…then Kakoune will create a new scratch buffer named “foo”. The status  
line should look like:

```
foo 1:1 [scratch] 1 sel - client0@[1234]

```

It still has the `[scratch]` flag because it’s a scratch buffer, but the  
name is `foo`.

---

<div class="post-metadata">

**Author:** ![nonumeros](https://discuss.kakoune.com/letter_avatar_proxy/v4/letter/n/90ced4/32.png) [@nonumeros](https://discuss.kakoune.com/u/nonumeros)\
**Post date:** [April 5, 2019, 8:08am UTC](https://discuss.kakoune.com/t/some-questions-about-scratch-buffer-on-pre-packaged-arch-kak/430/3 "2019-04-05T08:08:01Z")

</div>

@Screwtapello thank you. I always go through your detailed answers. I do appreciate it.

I don’t know what system you’re running, but on Arch Linux, (not the derived distros), a pre-packaged Kakoune does not, unlike a compiled kakoune, open the **notes** buffer named \*\*scratch\*\* (as Emacs usually does).

Going by the documentation quote

> _\*scratch_\*, is automatically  
> created when there are no other buffers left in the current  
> session. (which is also the case at Kakoune’s startup when no files to  
> open have been provided)

endquote

To be more exact, and normally you’d have something like  
` ***this is a *scratch* buffer which won't be automatically saved*** `  
` ***use it for notes or open a file buffer with the :edit command*** `

but not on the pre-packaged Kakoune

**Correction:** the scratch buffer and the flag are opened with the pre-packaged version, but not the warning (notes.)

---

<div class="post-metadata">

**Author:** ![nonumeros](https://discuss.kakoune.com/letter_avatar_proxy/v4/letter/n/90ced4/32.png) [@nonumeros](https://discuss.kakoune.com/u/nonumeros)\
**Post date:** [April 5, 2019, 8:29am UTC](https://discuss.kakoune.com/t/some-questions-about-scratch-buffer-on-pre-packaged-arch-kak/430/4 "2019-04-05T08:29:11Z")

</div>

Interesting, the compiled version showed - in addition to the warning (notes) of the buffer named scratch - the compilation of the gcc-libs that were used for the compilation.

e.g., Kakoune v2019-01-20-175-gcc

But the pre-packaged Kakoune only shows the date.

Perhaps some users prefer this ‘feature’ of not having the notes, but I’m certainly not among them. The notes serve as a warning, that the buffer itself won’t be automatically saved.

---

<div class="post-metadata">

**Author:** ![nonumeros](https://discuss.kakoune.com/letter_avatar_proxy/v4/letter/n/90ced4/32.png) [@nonumeros](https://discuss.kakoune.com/u/nonumeros)\
**Post date:** [April 5, 2019, 9:05am UTC](https://discuss.kakoune.com/t/some-questions-about-scratch-buffer-on-pre-packaged-arch-kak/430/5 "2019-04-05T09:05:55Z")

</div>

pre-packaged without notes

![Screenshot_kakoune-pre-packaged](https://discuss.kakoune.com/uploads/default/original/1X/08bcb1697c02b0adf429f26ec8c8a5d3ad055a78.png)

compiled with notes

![Screenshot_kakoune-compiled](https://discuss.kakoune.com/uploads/default/original/1X/daea0e165121e525f0d2aa5d8e1e617d83a77a30.png)

---

<div class="post-metadata">

**Author:** ![Screwtapello](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/screwtapello/32/12_2.png) [@Screwtapello](https://discuss.kakoune.com/u/Screwtapello)\
**Post date:** [April 5, 2019, 9:03am UTC](https://discuss.kakoune.com/t/some-questions-about-scratch-buffer-on-pre-packaged-arch-kak/430/6 "2019-04-05T09:03:37Z")

</div>

> I don’t know what system you’re running, but on Arch Linux, (not the derived distros), a pre-packaged Kakoune does not, unlike a compiled kakoune, opens the buffer named \*\*scratch\*\* (as Emacs usually does).

I think you’ll find it does, by looking at the status line in the bottom  
right.

> To be more exact, and normally you’d have something like  
> ` ***this is a *scratch* buffer which won't be automatically saved*** `  
> ` ***use it for notes or open a file buffer with the :edit command*** `
> 
> but not on the pre-packaged Kakoune

That message is newer than the most recent stable release of  
Kakoune. In version 2019.01.20 (and all previous versions), the  
automatically-created `*scratch*` buffer is empty, with no message.

---

<div class="post-metadata">

**Author:** ![nonumeros](https://discuss.kakoune.com/letter_avatar_proxy/v4/letter/n/90ced4/32.png) [@nonumeros](https://discuss.kakoune.com/u/nonumeros)\
**Post date:** [April 5, 2019, 9:09am UTC](https://discuss.kakoune.com/t/some-questions-about-scratch-buffer-on-pre-packaged-arch-kak/430/7 "2019-04-05T09:09:05Z")

</div>

Thank you! @Screwtapello

With guys like you, no need for documentation 🙂

---

<div class="post-metadata">

**Author:** ![Screwtapello](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/screwtapello/32/12_2.png) [@Screwtapello](https://discuss.kakoune.com/u/Screwtapello)\
**Post date:** [April 5, 2019, 9:10am UTC](https://discuss.kakoune.com/t/some-questions-about-scratch-buffer-on-pre-packaged-arch-kak/430/8 "2019-04-05T09:10:38Z")

</div>

> Interesting, the compiled version showed - in addition to the warning (notes) of the buffer named scratch - the compilation of the gcc-libs that were used for the compilation.
> 
> e.g., Kakoune v2019-01-20-175-gcc

Actually, “gcc” there is a coincidence. Kakoune use the “git describe”  
tool to generate a version number from repository metadata, which  
produces a version string like:

```
v2019.01.20-175-gcc788c88

```

Which means that copy of Kakoune was built from commit cc788c88, 175  
commits past the tag v2019.01.20 (I don’t know why `git describe` puts a  
“g” before the commit ID, but that’s what it does).

> But the pre-packaged Kakoune only shows the date.

When describing a commit that has an exact tag, “git describe” only  
names the tag.
