Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/present: Docs say 'h' key in the browser will toggle extra emphasis of any highlighted lines, seemingly not true. #17375

Closed
dmitshur opened this issue Oct 7, 2016 · 3 comments

Comments

@dmitshur
Copy link
Member

@dmitshur dmitshur commented Oct 7, 2016

What version of Go are you using (go version)?

go version go1.7.1 darwin/amd64

What operating system and processor architecture are you using (go env)?

$ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/Dmitri/Dropbox/Work/2013/GoLanding:/Users/Dmitri/Dropbox/Work/2013/GoLand"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/tw/kgz4v2kn4n7d7ryg5k_z3dk40000gn/T/go-build653232358=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"

What did you do?

I read the documentation for present slide format at https://godoc.org/golang.org/x/tools/present.

It said:

Also, inside the displayed text a line that ends

// HL

will be highlighted in the display; the 'h' key in the browser will toggle extra emphasis of any highlighted lines.

What did you expect to see?

Pressing 'h' key in browser would have some effect on emphasis of highlighted lines.

What did you see instead?

Pressing 'h' key has no effect on emphasis of highlighted lines.

Looking at the code,

https://github.com/golang/tools/blob/b5358b5feea9734b97ff1e792ca6bc55170bc92a/cmd/present/static/slides.js#L408

It says 'H' hides the help text.

So something doesn't look right here. I don't know if the documentation is wrong, or if the implementation has a bug.

@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Oct 7, 2016

CC @adg

@quentinmit quentinmit added this to the Unreleased milestone Oct 9, 2016
@quentinmit quentinmit added the NeedsFix label Oct 9, 2016
@dmitshur
Copy link
Member Author

@dmitshur dmitshur commented Oct 20, 2018

So something doesn't look right here. I don't know if the documentation is wrong, or if the implementation has a bug.

I did some code archeology to find out. The earliest commit I found where the 'h' key in browser was mentioned was the very first commit where the present format is added. It was actually in talks subrepo before being moved to tools. It was commit golang/talks@a498aa1#diff-35e109b2aa892087b376d175ba51281dR93.

In that commit, I see no mention of 'h' key anywhere else except that one line of documentation.

Three years later, the 'h' key got mapped to hiding the help dialog in commit golang/tools@753a094.

My best guess is this original feature was documented but never implemented. So removing it from documentation is the most appropriate fix. Will send a CL.

@gopherbot
Copy link

@gopherbot gopherbot commented Oct 20, 2018

Change https://golang.org/cl/143557 mentions this issue: present: remove mention of non-existing emphasis toggle

@golang golang locked and limited conversation to collaborators Oct 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.