MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to select all cells in a notebook with specific property?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg118869] Re: How to select all cells in a notebook with specific property?
  • From: John Fultz <jfultz at wolfram.com>
  • Date: Sat, 14 May 2011 03:05:07 -0400 (EDT)

On Fri, 13 May 2011 06:26:24 -0400 (EDT), Nasser M. Abbasi wrote:
> On 5/12/2011 4:26 AM, John Fultz wrote:
>> On Thu, 12 May 2011 04:34:12 -0400 (EDT), Nasser M. Abbasi wrote:
>>> Hello;
>>>
>>> Sometimes I change some cells in a notebook to closed
>>> (i.e. cell->Cell property->) and then deselect the Open
>>> property.
>>>
>>> I find this useful, when final report is done, and I do
>>> not need to print some cells.
>>>
>>> But when I go back and want to make some edits, I find
>>> I have to go select all those cells again using the
>>> mouse, one by one, so I can change the property again
>>> to open so I can see the content. The cells can be
>>> in different locations in the notebook.
>>>
>>> Is there a way to tell Mathematica to select all cells
>>> that are say closed, so that I do not have to keep
>>> doing this manual step each time? It gets tiring
>>> if there are many cells whose property I want
>>> to flip.   Like Cell->SelectAll-> or such.
>
>
>> A somewhat obscure but effective work-saving method for what you want
>> to do:
>>
>> * Select all cells.
>> * Open the option inspector with scope set to "selection".
>> * Find the CellOpen option (or whichever is the option you used).
>> * Click to the left of the option.  You'll see an X appear.
>> * Click again, on the X.
>>
>> This procedure will effectively clear any custom settings of the option
>> value for all selected cells.  So if you've set the option on some cells
>> where you don't want the value reset, you'll have to make sure those are
>> not selected.
>>
>
> Thanks John;
>
> The above does help in turning off the option without having to manually
> select those specific cells.
>
> But the problem is not really solved. Since when I want to change
> the property of those cells back to say closed, I would have to go
> select each one of them manually using the mouse, clicking on each
> cell I want to close, and I have to remember which ones I had
> selected before.
>
> What is really needed is a way to manage changing property of cells
> at a group of cells level not just at individual cell level.
>
> Not sure the best design for this, but I would guess a
> user case for this feature goes something like this:
>
> One would select some cells, initially using the mouse, and then
> make them into one set.
> (using some sort of cell->New_set->add_selected_cells_to_set)
>
> This set will be given some identification of some sort, and have the
> notebook remember this. Say cell set 'A123'. The id either
> automatically generated or user supplied.
>
> Later on, one can tell the notebook to select the cells in the
> set 'A123' (as in Cell->Select->Select_existing_set->choose_set)
>
> Now one can and apply the changes to property to the set in one
> command (open them, close them, etc...) as is now done for
> one cell.
>
> One can add more sets, edit the set by removing adding cells to
> it, etc...
>
> This way, I can change the setting/property of a set of cells
> easily each time.
>
> Can we please have this in version 8.1 may be?  :)
>
> thanks,
> --Nasser

Such a feature already exists, and has existed since version 3.  Apply a common
cell tag to all of the affected cells.  Then use Cell->Cell Tags->Find Cell
Tag-><tag name> in order to select them all at once.  You can manage as many
separate and overlapping groups as you like in such fashion.

Sincerely,

John Fultz
jfultz at wolfram.com
User Interface Group
Wolfram Research, Inc.


  • Prev by Date: Re: Options, OptionsPattern, and OptionsValues
  • Next by Date: Re: How to select all cells in a notebook with specific property?
  • Previous by thread: Re: How to select all cells in a notebook with specific property?
  • Next by thread: Re: How to select all cells in a notebook with specific property?