Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [narrowing]

Questions related to narrowing (restricting) the editable area of a buffer.

1
vote
0answers
13 views

Hide extra stars when narrowed to subtree

I have an outline with many levels of indentation. When I narrow to a particular subtree, I would like to hide the extra stars (and indentation) so that It looks like I am working on a top-level ...
0
votes
1answer
25 views

How narrow from cursor to end of buffer?

M-x narrow-to-region - Narrow down to between point and mark But I need to narrow from cursor position to end of buffer. Is it possible?
2
votes
2answers
39 views

Delighting narrow-to-region possible?

I want to delight narrow-to-region. When I call org-toggle-narrow-to-subtree it calls org-narrow-to-subtree which calls narrow-to-region. When this is called the modeline shows "Narrow". Is there a ...
1
vote
1answer
39 views

Switch back to default font on widening

Running emacs 25.2.2 on Kubuntu 17.10. I have an Org mode file that is mostly in English but certain headlines contain text in Devanagari. From Options -> Set Default Font, I have chosen Hack 13 ...
3
votes
1answer
72 views

Frame specific narrowing

I'm using make-frame-on-display for collaborative editing with a colleague. Everything seems to work OK, but to avoid confusion we tend not to edit the exact part of the same file at the same time. ...
2
votes
1answer
45 views

Query-replace in multiple LaTeX environments, narrowing each in turn

I am trying to come up with a Elisp function that narrows a buffer to a certain LaTeX enviroment (table, figures, ...), does some query-replace-regexp inside the narrowing, then searches for the next ...
1
vote
1answer
33 views

What is the mode or the command to selectively display selected region?

There seems to be a command to display only the text in the selected region, leaving the rest of the text hidden. What is the command?
5
votes
2answers
119 views

How to show part of buffer in different buffer?

I have a buffer with some data. I want to select part of buffer and open the selection in different buffer (and window) to make it easier to read for me. Is there some function that does it? I am ...
1
vote
1answer
98 views

How to indicate if narrow-to-region is currently in effect

I have advised the narrow and widen functions so that the fringe color indicates if narrowing is active: (advice-add 'narrow-to-region :after '(lambda (&rest args) (set-...
1
vote
1answer
69 views

Narrowing two consecutive trees in org-mode

It is well known that one can narrow a subtree with Ctrl-xns. Is it possible to narrow two consecutive trees? How?
1
vote
0answers
41 views

What is the cause of this inconsistent behaviour of TeX-command-buffer when narrowing?

When editing medium sized .tex files, I often find it convenient to make use of the narrow command C-x n n (narrow-to-region), usually in combination with the mark section command C-c * (LaTeX-mark-...
6
votes
1answer
152 views

How to save a desktop with narrowed indirect buffers?

I am unable to figure out a way to save my narrowed indirect buffer window, and restore it as it was. Say I have a frame with several windows containing several indirect buffers, each narrowed to a ...
3
votes
1answer
81 views

Narrow and move between latex environments

When writing LaTeX presentations with the beamer class in emacs+auctex I would like to have a function (and keybinding) that does the following three things: narrow to the next frame environment if ...
8
votes
3answers
391 views

Can I have two views on a file - one narrowed one not?

I am editing some file, abc.org, and call org-narrow-to-block to narrow to a code block that I want to edit. For the editing process I have to access another part of abc.org and just want to show it ...
2
votes
1answer
110 views

Preserve original line numbering for a narrowed region

I noticed that whenever I narrow a region in emacs, the line numbering is relative to the narrowed region rather than being relative to the original file. Is there any way I can preserve the line ...
5
votes
1answer
188 views

Syntax highlight narrowed python string literals as code

I have some python code, that has some long string literals containing more python code. These strings should most of the time be uniformly colored, as happens by default. However, I would like to be ...
2
votes
0answers
61 views

Restoring position in window after narrowing

C-x n w (widen) does not restore the position of a formerly narrowed region in relation to the window, as it was before calling C-x n n (narrow-to-region). Is it possible to have such behaviour? ...
5
votes
3answers
494 views

How to narrow to python class?

How can I narrow a buffer to the python class at point? narrow-to-region works but requires first selecting the class as a region, and it seems python-mode has moved on since this was written: http:/...
6
votes
3answers
234 views

How can I hide indentation on a narrowed defun?

When I'm in the middle of implementing a new function, I like to narrow my source buffer to just that function (C-x n d). However, this leaves the function indented as it was. I would like to have ...
8
votes
2answers
202 views

Narrow to previous restriction

Is there a convenient way to restore the previous restriction? So after the following sequence of events: Mark a region Call narrow-to-region and do some work. Call widen to jump around and look for ...
8
votes
5answers
799 views

How do I search in search results

When I C-s I can search. How should I do a function which I could bind for example to C-r which would let me search in the results of some predefined search query? Like contents of window would be: ...