all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: npostavs@users.sourceforge.net
To: Samer Masterson <nosefrog@gmail.com>
Cc: 19627@debbugs.gnu.org
Subject: bug#19627: 25.0.50; eshell: only the first item from eshell-visual-options is honored
Date: Sun, 03 Jul 2016 22:47:54 -0400	[thread overview]
Message-ID: <87eg7adspx.fsf@users.sourceforge.net> (raw)
In-Reply-To: <87387757p1.fsf@gmail.com> (Samer Masterson's message of "Mon, 19 Jan 2015 03:30:18 -0800")

[-- Attachment #1: Type: text/plain, Size: 1089 bytes --]

severity 19627 minor
quit

Samer Masterson <nosefrog@gmail.com> writes:

> 1. "emacs -Q"
> 2. M-x eshell
> 3. "git --help" prints the help text to the buffer
> 4. (add-to-list 'eshell-visual-options '("git" "--help"))
> 5. "git --help" brings up the term display (which is quickly killed,
> that is bug#18108)
> 6. (add-to-list 'eshell-visual-options '("git" "--help"))

I guess you actually meant "--version" rather than "--help" again here.

> 7. "git --help"
> bug:
> "git --help" prints the help text to the buffer.
> expected behavior:
> "git --help" should have brought up a term-mode buffer, as it's still
> part of eshell-visual-options.

eshell-visual-options is an alist (as mentioned in the docstring), so
the newest "git" entry decides which options are in force.  To get what
you want, you should do:

  (add-to-list 'eshell-visual-options '("git" "--help" "--version"))

or possibly

  (push "--version" (cdr (assoc "git" eshell-visual-options)))

Maybe the docs can be improved to explain this better.  Is it enough to
change the example usage to have 2 different options?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 1065 bytes --]

From c51bb7b36ef7f0bbe3e69c8fe16abc6b2ca8a6c1 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@gmail.com>
Date: Sun, 3 Jul 2016 22:41:48 -0400
Subject: [PATCH v1] Clarify usage of eshell-visual-options

* lisp/eshell/em-term.el (eshell-visual-options): Add second option to
example usage.
---
 lisp/eshell/em-term.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/eshell/em-term.el b/lisp/eshell/em-term.el
index 3e5de0c..208629c 100644
--- a/lisp/eshell/em-term.el
+++ b/lisp/eshell/em-term.el
@@ -102,10 +102,11 @@ eshell-visual-options
 of commands with options that present their output in a visual
 fashion.  For example, a sensible entry would be
 
-  (\"git\" \"--help\")
+  (\"git\" \"--help\" \"--paginate\")
 
 because \"git <command> --help\" shows the command's
-documentation with a pager.
+documentation with a pager and \"git --paginate <command>\"
+always uses a pager for output.
 
 See also `eshell-visual-commands' and `eshell-visual-subcommands'."
   :type '(repeat (cons (string :tag "Command")
-- 
2.8.0


  reply	other threads:[~2016-07-04  2:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-19 11:30 bug#19627: 25.0.50; eshell: only the first item from eshell-visual-options is honored Samer Masterson
2016-07-04  2:47 ` npostavs [this message]
2016-07-29  0:13   ` npostavs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87eg7adspx.fsf@users.sourceforge.net \
    --to=npostavs@users.sourceforge.net \
    --cc=19627@debbugs.gnu.org \
    --cc=nosefrog@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.