Re: Emacs command to select only lines indented below a specified level

2017-05-25 Thread Fred Stluka

Ben,

Excellent answer!  Thanks!

--Fred

Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no Windows or Gates.


On 5/23/17 6:46 PM, Ben Finney wrote:

Fred Stluka  writes:


On 5/23/17 4:43 PM, Ben Finney wrote:


The ‘set-selective-display’ command […] is bound to ‘C-x $’ in
default Emacs.

How do I specify the number of columns when using "C-x $"?

You will remember, from doing the Emacs tutorial when you first learned
Emacs, that all commands have a “prefix argument” available
 that the command
can use to modify its behaviour.

So, use the prefix argument to specify the number of columns for
‘set-selective-display’.

E.g.:

 M-9 C-x $  # Indentation >= 9 disappears.
 C-u C-x $  # Indentation >= 4 disappears.
 C-u 1 3 C-x $  # Indentation >= 13 disappears.
 C-u C-u C-u $  # Indentation >= 64 disappears.
 C-x $  # All lines reappear.

etc.


Same for using the command at the M-x prompt. I type "M-x" and see the
M-x prompt, then then type "set-selective-display" using tab to
autocomplete it. But I can't then type a column number after a space
or in parens or anything. What am I missing?

Time to work through the Emacs tutorial again; ‘C-h t’ :-)



--
https://mail.python.org/mailman/listinfo/python-list


Re: Emacs command to select only lines indented below a specified level

2017-05-23 Thread Ben Finney
Ben Finney  writes:

> E.g.:
>
> M-9 C-x $  # Indentation >= 9 disappears.
> C-u C-x $  # Indentation >= 4 disappears.
> C-u 1 3 C-x $  # Indentation >= 13 disappears.
> C-u C-u C-u $  # Indentation >= 64 disappears.
> C-x $  # All lines reappear.

I got one of those wrong (obviously; it's missing the actual ‘C-x $’
command). Here they are again:

M-9 C-x $ # Indentation >= 9 disappears.
C-u C-x $ # Indentation >= 4 disappears.
C-u 1 3 C-x $ # Indentation >= 13 disappears.
C-u C-u C-u C-x $ # Indentation >= 64 disappears.
C-x $ # All lines reappear.

-- 
 \  “I stayed up all night playing poker with tarot cards. I got a |
  `\  full house and four people died.” —Steven Wright |
_o__)  |
Ben Finney

-- 
https://mail.python.org/mailman/listinfo/python-list


Emacs command to select only lines indented below a specified level (was: Scala considering significant indentation like Python)

2017-05-23 Thread Ben Finney
Fred Stluka  writes:

> On 5/23/17 4:43 PM, Ben Finney wrote:
>
> > The ‘set-selective-display’ command […] is bound to ‘C-x $’ in
> > default Emacs.
>
> How do I specify the number of columns when using "C-x $"?

You will remember, from doing the Emacs tutorial when you first learned
Emacs, that all commands have a “prefix argument” available
 that the command
can use to modify its behaviour.

So, use the prefix argument to specify the number of columns for
‘set-selective-display’.

E.g.:

M-9 C-x $  # Indentation >= 9 disappears.
C-u C-x $  # Indentation >= 4 disappears.
C-u 1 3 C-x $  # Indentation >= 13 disappears.
C-u C-u C-u $  # Indentation >= 64 disappears.
C-x $  # All lines reappear.

etc.

> Same for using the command at the M-x prompt. I type "M-x" and see the
> M-x prompt, then then type "set-selective-display" using tab to
> autocomplete it. But I can't then type a column number after a space
> or in parens or anything. What am I missing?

Time to work through the Emacs tutorial again; ‘C-h t’ :-)

-- 
 \ “I call him Governor Bush because that's the only political |
  `\  office he's ever held legally.” —George Carlin, 2008 |
_o__)  |
Ben Finney

-- 
https://mail.python.org/mailman/listinfo/python-list