Re: [AUCTeX-devel] Narrowing
Mosè Giordano giordano.m...@libero.it writes: Well, since nobody objected my patch, I'm going to install it. no narrow-map in xemacs, sorry... ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel
Re: [AUCTeX-devel] Narrowing
Ciao Giacomo, 2013/11/23 giacomo boffi giacomo.bo...@polimi.it: Mosè Giordano giordano.m...@libero.it writes: Well, since nobody objected my patch, I'm going to install it. no narrow-map in xemacs, sorry... Thank you for the report. Do you know the analog of `narrow-map' in XEmacs, if any? Ciao, Mosè ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel
Re: [AUCTeX-devel] Narrowing
2013/11/23 Mosè Giordano giordano.m...@libero.it: Ciao Giacomo, 2013/11/23 giacomo boffi giacomo.bo...@polimi.it: Mosè Giordano giordano.m...@libero.it writes: Well, since nobody objected my patch, I'm going to install it. no narrow-map in xemacs, sorry... Thank you for the report. Do you know the analog of `narrow-map' in XEmacs, if any? I've just seen that XEmacs explicitly binds the narrowing functions to `C-xn*, as it was in GNU Emacs until 22.1 version. I'm going to fix it in AUCTeX. Ciao, Mosè ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel
Re: [AUCTeX-devel] Narrowing
Well, since nobody objected my patch, I'm going to install it. Bye, Mosè 2013/10/20 Nicolas Richard theonewiththeevill...@yahoo.fr: David Kastrup d...@gnu.org writes: Nicolas Richard theonewiththeevill...@yahoo.fr writes: Mosè Giordano giordano.m...@libero.it writes: The attached patch is a middle ground between my narrowing function and the Nicolas' one, but I believe we should keep visible the enclosing `\begin' and `\end', because in some cases (i.e., when `\begin' starts at column 0 in the real file) I tend to remove those because I sometimes do narrowing + change major mode in order to edit inlined asymptote code, and then the \begin and \end get in the way. For editing parts with a separate major mode, a separate command and/or hook into mmm-mode or whatever may be warranted. Sure, I was merely commenting my own code, I was not suggesting it should be the default. Sorry for being unclear. -- Nico. ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel
Re: [AUCTeX-devel] Narrowing
Nicolas Richard theonewiththeevill...@yahoo.fr writes: Mosè Giordano giordano.m...@libero.it writes: The attached patch is a middle ground between my narrowing function and the Nicolas' one, but I believe we should keep visible the enclosing `\begin' and `\end', because in some cases (i.e., when `\begin' starts at column 0 in the real file) I tend to remove those because I sometimes do narrowing + change major mode in order to edit inlined asymptote code, and then the \begin and \end get in the way. For editing parts with a separate major mode, a separate command and/or hook into mmm-mode or whatever may be warranted. -- David Kastrup ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel
Re: [AUCTeX-devel] Narrowing
David Kastrup d...@gnu.org writes: Nicolas Richard theonewiththeevill...@yahoo.fr writes: Mosè Giordano giordano.m...@libero.it writes: The attached patch is a middle ground between my narrowing function and the Nicolas' one, but I believe we should keep visible the enclosing `\begin' and `\end', because in some cases (i.e., when `\begin' starts at column 0 in the real file) I tend to remove those because I sometimes do narrowing + change major mode in order to edit inlined asymptote code, and then the \begin and \end get in the way. For editing parts with a separate major mode, a separate command and/or hook into mmm-mode or whatever may be warranted. Sure, I was merely commenting my own code, I was not suggesting it should be the default. Sorry for being unclear. -- Nico. ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel
Re: [AUCTeX-devel] Narrowing
Hello, Mosè Giordano giordano.m...@libero.it writes: I like narrowing and I wrote these two simple functions to narrow (La)TeX code to the current environment and group: FWIW, I had my own version of LaTeX-narrow-to-environment (see below) in which I tried to avoid modifying the mark (by copying code from LaTeX-mark-environment). Perhaps this calls for a function LaTeX-inner-bounds-of-environment-at-point (possibly relying on thingatpt.el), which would be called by both functions. What do you think ? I must warn though that I'm not entirely happy with my version wrt to handling newlines at the end of environement. Never cared enough to fix it, though. (defun LaTeX-narrow-to-environment (optional count) Narrow buffer to the current environment. (interactive p) (setq count (if count (abs count) 1)) (let ((cur (point)) beg end) (save-excursion (dotimes (c count) (LaTeX-find-matching-end)) (search-backward \\) (if (bolp) (backward-char)) ; don't include newline to region. (setq end (point)) (goto-char cur) (dotimes (c count) (LaTeX-find-matching-begin)) (search-forward }) (if (eolp) (forward-char)) ; don't include newline (setq beg (point))) (narrow-to-region beg end))) -- Nico. ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel