Re: Texinfo: mark environment and mark section/node

View: New views
9 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: Texinfo: mark environment and mark section/node

by Ralf Angeli-3 :: Rate this Message:

| View Threaded | Show Only this Message

As mentioned in our discussion last June, it is better to talk about
development topics on the development list.  So I'm crossposting this to
auctex-devel and setting a Mail-Followup-To.

* Vincent Belaïche (2011-05-17) writes:

> Quite some time ago I had submitted a contribution to have mark
> environment and mark section commands for Texinfo also. I made an update
> of AUCTeX recently and I realized that they are still not in the CVS
> tree...
>
> I attach again the patch made at that time, but certainly the diff was
> relative to some outdated version of tex-info.el.

This patch is an early one.  The most recent one should be from June 24,
2010.

> Sorry, but I do not remember what was the outcome of discussion that we
> had at that time.

The threads can be found at
http://lists.gnu.org/archive/html/auctex-devel/2010-06/threads.html
and
http://lists.gnu.org/archive/html/auctex-devel/2010-07/threads.html

> I rememeber that you questionned the use of `C-c .'
> and `C-c *' keybindings, but I thought that my contribution was fine all
> the same because no alternative keybinding was proposed.

Looking at the last messages in the discussion we had, the main issue I
still had with the patch was that `Texinfo-mark-section' marks both
sections and nodes.  It would be better if there were two separate
functions for these functionalities.

--
Ralf

_______________________________________________
auctex-devel mailing list
auctex-devel@...
https://lists.gnu.org/mailman/listinfo/auctex-devel

Re: Texinfo: mark environment and mark section/node

by Vincent Belaïche :: Rate this Message:

| View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.


> From: angeli@...
> To: vincent.b.1@...
> CC: auctex@...; auctex-devel@...
> Subject: Re: Texinfo: mark environment and mark section/node
> Date: Sun, 29 May 2011 15:54:35 +0200
>
> As mentioned in our discussion last June, it is better to talk about
> development topics on the development list. So I'm crossposting this to
> auctex-devel and setting a Mail-Followup-To.
>
> * Vincent Belaïche (2011-05-17) writes:
>
> > Quite some time ago I had submitted a contribution to have mark
> > environment and mark section commands for Texinfo also. I made an update
> > of AUCTeX recently and I realized that they are still not in the CVS
> > tree...
> >
> > I attach again the patch made at that time, but certainly the diff was
> > relative to some outdated version of tex-info.el.
>
> This patch is an early one. The most recent one should be from June 24,
> 2010.
>
> > Sorry, but I do not remember what was the outcome of discussion that we
> > had at that time.
>
> The threads can be found at
> http://lists.gnu.org/archive/html/auctex-devel/2010-06/threads.html
> and
> http://lists.gnu.org/archive/html/auctex-devel/2010-07/threads.html
>
> > I rememeber that you questionned the use of `C-c .'
> > and `C-c *' keybindings, but I thought that my contribution was fine all
> > the same because no alternative keybinding was proposed.
>
> Looking at the last messages in the discussion we had, the main issue I
> still had with the patch was that `Texinfo-mark-section' marks both
> sections and nodes. It would be better if there were two separate
> functions for these functionalities.
>
> --
> Ralf

Hi Ralf,

Thank you so much for the reminder and having dug out the necessary links.
I must admit that as I was working with my own local code I had forgotten about the conclusion. I will make the necessary update at some point of time, and send back an updated patch.

VBR,
    Vincent.

_______________________________________________
auctex-devel mailing list
auctex-devel@...
https://lists.gnu.org/mailman/listinfo/auctex-devel

Parent Message unknown Re: Texinfo: mark environment and mark section/node

by Vincent Belaïche :: Rate this Message:

| View Threaded | Show Only this Message


[...]

>
>Looking at the last messages in the discussion we had, the main issue I
>still had with the patch was that `Texinfo-mark-section' marks both
>sections and nodes. It would be better if there were two separate
>functions for these functionalities.
>
>--
>Ralf

Salut Ralf & AUCTeX-devel,

This email contains a novel patch where node & sections are marked by
different functions.

I will provide a corresponding patch to documentation after this one is
accepted.

Here is the changelog:

-----------------------------------------------------------------------
2011-05-30  Vincent Belaïche  <vincentb1@...>

        * tex-info.el (Texinfo-mark-environment, Texinfo-mark-section)
        (Texinfo-mark-node): New defun.
        (Texinfo-structuring-command-levels-alist)
        (Texinfo-structuring-command-re): new defconst.
        (Texinfo-mode-map): added key bindings for
        Texinfo-mark-environment, Texinfo-mark-section, and
        Texinfo-mark-node.
-----------------------------------------------------------------------

And here follows the patch...

   Vincent.


*** tex-info.el.~5.161~ Mon May 30 19:40:47 2011
--- tex-info.el Mon May 30 19:46:31 2011
***************
*** 52,57 ****
--- 52,74 ----
      ("verbatim") ("vtable"))
    "Alist of Texinfo environments.")
 
+ (defconst Texinfo-structuring-command-levels-alist
+   '( ("top" . -1) ("chapter" . 0)  ("unnumbered" . 0)   ("appendix" . 0)
+      ("majorheading" . 2) ("chapheading" . 2)
+      ("section" . 5) ("unnumberedsec" . 5) ("appendixsec" . 5) ("heading" . 5)
+      ("subsection" . 9) ("unnumberedsubsec" . 9) ("appendixsubsec" . 9) ("subheading" . 9)
+      ("subsubsection" . 13))
+   "Alist providing level for each strucuting command.  \
+ The associated level is starting by -1 for @top, down to 13 for
+ @subsubsection."  )
+
+
+ (defconst Texinfo-structuring-command-re
+   (concat "^\\s-*@"
+  (funcall 'regexp-opt (mapcar 'car Texinfo-structuring-command-levels-alist)
+   'word))
+   "Regexp to  match structuring commands.")
+
  (defconst texinfo-environment-regexp
    ;; Overwrite version from `texinfo.el'.
    (concat "^@\\("
***************
*** 160,165 ****
--- 177,306 ----
   (goto-char (match-beginning 0))
  (error "Can't locate start of current environment")))))
 
+ (defun Texinfo-mark-environment (&optional count)
+   "Set mark to end of current environment and point to the matching begin.
+ If prefix argument COUNT is given, mark the respective number of
+ enclosing environments.  The command will not work properly if
+ there are unbalanced begin-end pairs in comments and verbatim
+ environments."
+   ;; TODO:
+   ;; This is identical to the LaTeX counterpart but for the find begin/end
+   ;; functions. So some day the implemenation should be factorized.
+   (interactive "p")
+   (setq count (if count (abs count) 1))
+   (let ((cur (point)) beg end)
+     ;; Only change point and mark after beginning and end were found.
+     ;; Point should not end up in the middle of nowhere if the search fails.
+     (save-excursion
+       (dotimes (c count)
+ (Texinfo-find-env-end))
+       (setq end (line-beginning-position 2))
+       (goto-char cur)
+       (dotimes (c count)
+ (Texinfo-find-env-start)
+ (unless (= (1+ c) count)
+  (beginning-of-line 0)))
+       (setq beg (point)))
+     (set-mark end)
+     (goto-char beg)
+     (TeX-activate-region)))
+
+
+ (defun Texinfo-mark-section (&optional exclude-sub)
+   "Mark current section.  \
+ Current section is started by any of
+ the structuring commands matched by regexp in constant
+ `Texinfo-structuring-command-re'.
+
+ If optional argument EXCLUDE-SUB is passed as `C-u
+ \\[Texinfo-mark-section]', mark current section, with exclusion
+ of any subsections.
+
+ Otherwise, any included subsections are also marked along with current section.
+
+ Note that when current section is starting immediatley after a
+ node commande, then the node command is also marked as part as the section."
+   (interactive "P")
+   (let (beg end is-beg-section is-end-section)
+     (if (and (consp exclude-sub) (eq (car exclude-sub) 4))
+ ;; section with exclusion of any subsection
+ (setq beg (save-excursion
+    (unless (looking-at Texinfo-structuring-command-re)
+      (end-of-line))
+    (re-search-backward Texinfo-structuring-command-re nil t))
+      is-beg-section t
+      end (save-excursion
+    (beginning-of-line)
+    (when
+ (re-search-forward (concat Texinfo-structuring-command-re
+   "\\|^\\s-*@bye\\_>" ) nil t)
+      (save-match-data
+ (beginning-of-line)
+ (point))))
+      is-end-section (match-string 1)))
+     ;;
+     (let (section-command-level)
+       (setq beg
+    (save-excursion
+      (end-of-line)
+      (re-search-backward Texinfo-structuring-command-re nil t)))
+       (when beg
+ (setq is-beg-section t
+      section-command-level
+      (cdr (assoc (match-string 1) Texinfo-structuring-command-levels-alist))
+      end
+      (save-excursion
+ (beginning-of-line)
+ (while
+    (and (re-search-forward (concat Texinfo-structuring-command-re
+    "\\|^\\s-*@bye\\_>" ) nil t)
+ (or
+  (null (setq is-end-section  (match-string 1)))
+  (> (cdr (assoc is-end-section Texinfo-structuring-command-levels-alist))
+     section-command-level))))
+ (when (match-string 0)
+  (beginning-of-line)
+  (point))))));  (if ...)
+     (when (and beg end)
+       ;; now take also enclosing node of beg and end
+       (dolist
+  (boundary '(beg end))
+ (when (symbol-value (intern (concat "is-" (symbol-name boundary) "-section")))
+  (save-excursion
+    (goto-char (symbol-value boundary))
+    (while
+ (and
+ (null (bobp))
+ (progn
+   (beginning-of-line 0)
+   (looking-at "^\\s-*\\($\\|@\\(c\\|comment\\)\\_>\\)"))))
+    (when  (looking-at "^\\s-*@node\\_>")
+      (set boundary (point))))))
+
+       (set-mark end)
+       (goto-char beg)
+       (TeX-activate-region) )))
+
+ (defun Texinfo-mark-node ()
+   "Mark the current node.  \
+ This is the node in which the pointer is.  It is starting at
+ previous beginning of keyword `@node' and ending at next
+ beginning of keyword `@node' or `@bye'."
+   (interactive)
+   (let ((beg (save-excursion
+       (unless (looking-at "^\\s-*@\\(?:node\\)\\_>")
+ (end-of-line))
+       (re-search-backward "^\\s-*@\\(?:node\\)\\_>" nil t )))
+ (end (save-excursion
+       (beginning-of-line)
+       (and (re-search-forward "^\\s-*@\\(?:node\\|bye\\)\\_>" nil t )
+    (progn (beginning-of-line) (point))))))
+
+     (when (and beg end)
+       (set-mark end)
+       (goto-char beg)
+       (TeX-activate-region) )))
+
  (defun Texinfo-insert-node ()
    "Insert a Texinfo node in the current buffer.
  That means, insert the string `@node' and prompt for current,
***************
*** 231,236 ****
--- 372,380 ----
 
      ;; Simulating LaTeX-mode
      (define-key map "\C-c\C-e" 'Texinfo-environment)
+     (define-key map "\C-c." 'Texinfo-mark-environment)
+     (define-key map "\C-c*" 'Texinfo-mark-section)
+     (define-key map "\M-\C-h" 'Texinfo-mark-node)
      (define-key map "\C-c\n"   'texinfo-insert-@item)
      (or (key-binding "\e\r")
  (define-key map "\e\r" 'texinfo-insert-@item)) ;*** Alias

_______________________________________________
auctex-devel mailing list
auctex-devel@...
https://lists.gnu.org/mailman/listinfo/auctex-devel

Re: Texinfo: mark environment and mark section/node

by Ralf Angeli-3 :: Rate this Message:

| View Threaded | Show Only this Message

* Vincent Belaïche (2011-05-30) writes:

> This email contains a novel patch where node & sections are marked by
> different functions.

Thanks.

> I will provide a corresponding patch to documentation after this one is
> accepted.

I've briefly looked at the patch and right at the top there is a
problem:

> *** tex-info.el.~5.161~ Mon May 30 19:40:47 2011
> --- tex-info.el Mon May 30 19:46:31 2011
> ***************
> *** 52,57 ****
> --- 52,74 ----
>       ("verbatim") ("vtable"))
>     "Alist of Texinfo environments.")
>  
> + (defconst Texinfo-structuring-command-levels-alist

In <URL:http://mid.gmane.org/80pqzkjh2y.fsf%40gmail.com> we've concluded
that there is no need for a constant which holds the command levels.

And in fact the last patch from our discussion in 2010 did not include
this constant.  It can be found here:
<URL:http://mid.gmane.org/80r5ishgcl.fsf%40gmail.com>  I think it only
missed the separation of the functions for marking nodes and sections.
Perhaps you want to use that as a basis for the final changes?

--
Ralf

_______________________________________________
auctex-devel mailing list
auctex-devel@...
https://lists.gnu.org/mailman/listinfo/auctex-devel

Parent Message unknown Re: Texinfo: mark environment and mark section/node

by Vincent Belaïche :: Rate this Message:

| View Threaded | Show Only this Message

Ooooooooooooooooooooooooops...

Thank you for pointing that out. Here are the updated changelog and patch.

I have re-tested only the mark section as I've not changed any else
since my last message.

Hopefully, we finally converge!

   Vincent.

-----------------------------------------------------------------------
2011-06-20  Vincent Belaïche  <vincentb1@...>

        * tex-info.el (Texinfo-mark-environment, Texinfo-mark-section)
        (Texinfo-mark-node): New defun.
        (Texinfo-mode-map): added key bindings for
        Texinfo-mark-environment, Texinfo-mark-section, and
        Texinfo-mark-node.
-----------------------------------------------------------------------


*** tex-info.el.~5.161~ Mon Jun 20 08:35:57 2011
--- tex-info.el Mon Jun 20 08:32:46 2011
***************
*** 160,165 ****
--- 160,293 ----
   (goto-char (match-beginning 0))
  (error "Can't locate start of current environment")))))
 
+ (defun Texinfo-mark-environment (&optional count)
+   "Set mark to end of current environment and point to the matching begin.
+ If prefix argument COUNT is given, mark the respective number of
+ enclosing environments.  The command will not work properly if
+ there are unbalanced begin-end pairs in comments and verbatim
+ environments."
+   ;; TODO:
+   ;; This is identical to the LaTeX counterpart but for the find begin/end
+   ;; functions. So some day the implemenation should be factorized.
+   (interactive "p")
+   (setq count (if count (abs count) 1))
+   (let ((cur (point)) beg end)
+     ;; Only change point and mark after beginning and end were found.
+     ;; Point should not end up in the middle of nowhere if the search fails.
+     (save-excursion
+       (dotimes (c count)
+ (Texinfo-find-env-end))
+       (setq end (line-beginning-position 2))
+       (goto-char cur)
+       (dotimes (c count)
+ (Texinfo-find-env-start)
+ (unless (= (1+ c) count)
+  (beginning-of-line 0)))
+       (setq beg (point)))
+     (set-mark end)
+     (goto-char beg)
+     (TeX-activate-region)))
+
+ (defun Texinfo-mark-section (&optional no-subsection)
+   "Mark current section, with inclusion of any containing node.
+
+ The current section is detected as starting by any of the
+ structuring commands matched by regexp in variable
+ `outline-regexp' which in turn is a regexp matching any element
+ of variable `texinfo-section-list'.
+
+ If optional argument NO-SUBSECTION is set to any integer or is a
+ non nil empty argument (i.e. `C-u \\[Texinfo-mark-section]'),
+ then mark the current section with exclusion of any subsections.
+
+ Otherwise, any included subsections are also marked along with
+ current section.
+
+ Note that when current section is starting immediatley after a
+ node commande, then the node command is also marked as part as
+ the section."
+   (interactive "P")
+   (let (beg end is-beg-section is-end-section
+    (section-re (concat "^\\s-*" outline-regexp)))
+     (if (and (consp no-subsection) (eq (car no-subsection) 4))
+ ;; section with exclusion of any subsection
+ (setq beg (save-excursion
+    (unless (looking-at section-re)
+      (end-of-line))
+    (re-search-backward section-re nil t))
+      is-beg-section t
+      end (save-excursion
+    (beginning-of-line)
+    (when
+ (re-search-forward (concat section-re
+   "\\|^\\s-*@bye\\_>" ) nil t)
+      (save-match-data
+ (beginning-of-line)
+ (point))))
+      is-end-section (match-string 1))
+       ;; full section without exclusion of any subsection
+       (let (section-command-level)
+ (setq beg
+      (save-excursion
+ (end-of-line)
+ (re-search-backward section-re nil t)))
+ (when beg
+  (setq is-beg-section t
+ section-command-level
+ (cadr (assoc (match-string 1) texinfo-section-list))
+ end
+ (save-excursion
+  (beginning-of-line)
+  (while
+      (and (re-search-forward (concat section-re
+      "\\|^\\s-*@bye\\_>" ) nil t)
+   (or
+    (null (setq is-end-section  (match-string 1)))
+    (> (cadr (assoc is-end-section texinfo-section-list))
+       section-command-level))))
+  (when (match-string 0)
+    (beginning-of-line)
+    (point)))))));  (if ...)
+     (when (and beg end)
+       ;; now take also enclosing node of beg and end
+       (dolist
+  (boundary '(beg end))
+ (when (symbol-value (intern (concat "is-" (symbol-name boundary) "-section")))
+  (save-excursion
+    (goto-char (symbol-value boundary))
+    (while
+ (and
+ (null (bobp))
+ (progn
+   (beginning-of-line 0)
+   (looking-at "^\\s-*\\($\\|@\\(c\\|comment\\)\\_>\\)"))))
+    (when  (looking-at "^\\s-*@node\\_>")
+      (set boundary (point))))))
+
+       (set-mark end)
+       (goto-char beg)
+       (TeX-activate-region) )))
+
+ (defun Texinfo-mark-node ()
+   "Mark the current node.  \
+ This is the node in which the pointer is.  It is starting at
+ previous beginning of keyword `@node' and ending at next
+ beginning of keyword `@node' or `@bye'."
+   (interactive)
+   (let ((beg (save-excursion
+       (unless (looking-at "^\\s-*@\\(?:node\\)\\_>")
+ (end-of-line))
+       (re-search-backward "^\\s-*@\\(?:node\\)\\_>" nil t )))
+ (end (save-excursion
+       (beginning-of-line)
+       (and (re-search-forward "^\\s-*@\\(?:node\\|bye\\)\\_>" nil t )
+    (progn (beginning-of-line) (point))))))
+
+     (when (and beg end)
+       (set-mark end)
+       (goto-char beg)
+       (TeX-activate-region) )))
+
  (defun Texinfo-insert-node ()
    "Insert a Texinfo node in the current buffer.
  That means, insert the string `@node' and prompt for current,
***************
*** 231,236 ****
--- 359,367 ----
 
      ;; Simulating LaTeX-mode
      (define-key map "\C-c\C-e" 'Texinfo-environment)
+     (define-key map "\C-c." 'Texinfo-mark-environment)
+     (define-key map "\C-c*" 'Texinfo-mark-section)
+     (define-key map "\M-\C-h" 'Texinfo-mark-node)
      (define-key map "\C-c\n"   'texinfo-insert-@item)
      (or (key-binding "\e\r")
  (define-key map "\e\r" 'texinfo-insert-@item)) ;*** Alias

_______________________________________________
auctex-devel mailing list
auctex-devel@...
https://lists.gnu.org/mailman/listinfo/auctex-devel

Parent Message unknown Re: Texinfo: mark environment and mark section/node

by Vincent Belaïche :: Rate this Message:

| View Threaded | Show Only this Message


By the way, I am seeking where to insert documentation about this into
auctex.texi.

It seems that there is nothing under node `(auctex.info) Editing'
concerning marking environment or section, and another question is where
to document the Texinfo specific marking node command.

  Vincent


_______________________________________________
auctex-devel mailing list
auctex-devel@...
https://lists.gnu.org/mailman/listinfo/auctex-devel

Re: Texinfo: mark environment and mark section/node

by Ralf Angeli-3 :: Rate this Message:

| View Threaded | Show Only this Message

* Vincent Belaïche (2011-06-20) writes:

> Thank you for pointing that out. Here are the updated changelog and patch.
>
> I have re-tested only the mark section as I've not changed any else
> since my last message.
>
> Hopefully, we finally converge!

Yup!  And I've finally checked in the patch.  Phew. (c:

Regarding the question about where to put documentation, I also failed
to find a good place for it.  Perhaps we need a new "Navigation"
subsection below "Editing"?

In the LaTeX menu the functions for marking and jumping to the start or
end of an environment are below "Formatting and Marking", together with
the functions for filling.  But in the manual we have "Commenting",
"Indenting" and "Filling" which can all be related to a marked region.
So perhaps a separate section is in order.

And in that section one could describe both the functions for LaTeX and
Texinfo mode.

--
Ralf

_______________________________________________
auctex-devel mailing list
auctex-devel@...
https://lists.gnu.org/mailman/listinfo/auctex-devel

Parent Message unknown Re: Texinfo: mark environment and mark section/node

by Vincent Belaïche :: Rate this Message:

| View Threaded | Show Only this Message

> Regarding the question about where to put documentation, I also failed

> to find a good place for it. Perhaps we need a new "Navigation"
> subsection below "Editing"?
>
> In the LaTeX menu the functions for marking and jumping to the start
> or end of an environment are below "Formatting and Marking", together
> with the functions for filling. But in the manual we have
> "Commenting", "Indenting" and "Filling" which can all be related to a
> marked region.  So perhaps a separate section is in order.
>
> And in that section one could describe both the functions for LaTeX
> and Texinfo mode.
>
> --
> Ralf
Hi Ralf,

Battons le fer tant qu'il est encore chaud...

Here is attached the patch to documentation, and here follows the
ChangeLog entry:

-----------------------------------------------------------------------
2011-07-14  Vincent Belaïche  <vincentb1@...>

        * doc/auctex.texi: Add documentation for functions
        LaTeX-mark-section, LaTeX-mark-environment, Texinfo-mark-section,
        Texinfo-mark-environment and Texinfo-mark-node.
-----------------------------------------------------------------------

The added documentation is merely a cut & paste of the docstring, with
some Texinfo-izing.

Regards,
   Vincent


*** auctex.texi Thu Jul 14 16:09:38 2011
--- auctex.texi.new Thu Jul 14 16:08:46 2011
***************
*** 321,326 ****
--- 321,327 ----
  * Environments::                Inserting Environment Templates
  * Mathematics::                 Entering Mathematics
  * Completion::                  Completion of macros
+ * Marking::                     Marking Environment, sections, or texinfo nodes
  * Commenting::                  Commenting text
  * Indenting::                   Reflecting syntactic constructs with whitespace
  * Filling::                     Automatic and manual line breaking
***************
*** 1051,1056 ****
--- 1052,1147 ----
  automatic parsing on save, and that the basename of the Bib@TeX{} file
  does not conflict with the basename of one of @TeX{} files.
 
+ @node Marking
+ @section Marking Environment, Sections, or Texinfo nodes
+
+ You can set the region over the current environment with the @kbd{C-c .}
+ command, or over the current section with the @kbd{C-c *} command.
+
+ For Texinfo documents there is an additional command @kbd{M-C-h} to set
+ the region over the current node.
+
+ When the region is set, the point is moved to its beginning and the mark
+ at its end.
+
+ @menu
+ * MakingLaTeX:: LaTeX Commands for marking Environment and Sections
+ * MakingTexinfo:: Texinfo Commands for marking Environment, Sections, and Nodes
+ @end menu
+
+ @node MakingLaTeX
+ @subsection LaTeX Commands for marking Environment and Sections
+
+ @deffn Command LaTeX-mark-section &optional @var{no-subsections}
+ @kindex C-c *
+ (@kbd{C-c *}) Mark current section, with inclusion of any containing node.
+
+ The current section is detected as starting by any of the structuring
+ commands matched by regexp in variable @code{outline-regexp} which in
+ turn is a regexp matching any element of variable
+ @code{texinfo-section-list}.
+
+ If optional argument @var{no-subsection} is set to any integer or is a
+ non nil empty argument (i.e. @kbd{C-u C-c *}), then mark the current
+ section with exclusion of any subsections.
+
+ Otherwise, any included subsections are also marked along with current
+ section.
+
+ Note that when current section is starting immediatley after a node
+ commande, then the node command is also marked as part as the section.
+ @end deffn
+
+ @deffn Command LaTeX-mark-environment &optional @var{count}
+ @kindex C-c .
+ (@kbd{C-c .}) Set mark to end of current environment and point to the
+ matching begin.  If prefix argument @var{count} is given, mark the
+ respective number of enclosing environments.  The command will not work
+ properly if there are unbalanced begin-end pairs in comments and
+ verbatim environments.
+ @end deffn
+
+ @node MakingTexinfo
+ @subsection Texinfo Commands for marking Environment and Sections
+
+ @deffn Command Texinfo-mark-section &optional @var{no-subsection}
+ @kindex C-c *
+ (@kbd{C-c *}) Mark current section, with inclusion of any containing
+ node.
+
+ The current section is detected as starting by any of the structuring
+ commands matched by regexp in variable @code{outline-regexp} which in
+ turn is a regexp matching any element of variable
+ @code{texinfo-section-list}.
+
+ If optional argument @var{no-subsection} is set to any integer or is a
+ non @code{nil} empty argument (i.e. @kbd{C-u C-c *}), then mark the
+ current section with exclusion of any subsections.
+
+ Otherwise, any included subsections are also marked along with
+ current section.
+
+ Note that when current section is starting immediatley after a
+ node commande, then the node command is also marked as part as
+ the section.
+ @end deffn
+
+ @deffn Command Texinfo-mark-environment &optional @var{count}
+ @kindex C-c .
+ (@kbd{C-c .}) Set mark to end of current environment and point to the matching
+ beginning.  If prefix argument @var{count} is given, mark the respective
+ number of enclosing environments.  The command will not work properly if
+ there are unbalanced begin-end pairs in comments and verbatim
+ environments.
+ @end deffn
+
+ @deffn Command Texinfo-mark-node
+ @kindex M-C-h
+ (@kbd{M-C-h}) Mark the current node.  This is the node in which the
+ point is.  It is starting at previous beginning of keyword @code{@@node}
+ and ending at next beginning of keyword @code{@@node} or @code{@@bye}.
+ @end deffn
+
  @node Commenting
  @section Commenting
 

_______________________________________________
auctex-devel mailing list
auctex-devel@...
https://lists.gnu.org/mailman/listinfo/auctex-devel

Re: Texinfo: mark environment and mark section/node

by Ralf Angeli-3 :: Rate this Message:

| View Threaded | Show Only this Message

* Vincent Belaïche (2011-07-14) writes:

>> Regarding the question about where to put documentation, I also failed
>> to find a good place for it. Perhaps we need a new "Navigation"
>> subsection below "Editing"?
>>
>> In the LaTeX menu the functions for marking and jumping to the start
>> or end of an environment are below "Formatting and Marking", together
>> with the functions for filling. But in the manual we have
>> "Commenting", "Indenting" and "Filling" which can all be related to a
>> marked region.  So perhaps a separate section is in order.
>>
>> And in that section one could describe both the functions for LaTeX
>> and Texinfo mode.
>
> Battons le fer tant qu'il est encore chaud...

Il n'est plus très chaud, mais ...

> Here is attached the patch to documentation, and here follows the
> ChangeLog entry:

... I've finally commited the patch.  Thanks for the contribution.

--
Ralf

_______________________________________________
auctex-devel mailing list
auctex-devel@...
https://lists.gnu.org/mailman/listinfo/auctex-devel