Can I make “comment-region” comment empty lines?Modify org-mode's definition of comment lines?How to change comment string used by comment-region?If I am in a comment (including empty lines), how do I get to the beginning of the comment?add a space after the comment delimiterHow to get emacs to automatically insert block comment prefixes?How to treat region between conflict markers as comment?How to protect LaTeX comment lines from indentation?auto-fill-mode fails in comment with empty second linecommand to mark a block comment as regionHow to align both of comments and macro of multiple lines with space instead tabs for C/C++ code?

Why doesn't H₄O²⁺ exist?

intersection of two sorted vectors in C++

Python: return float 1.0 as int 1 but float 1.5 as float 1.5

When a company launches a new product do they "come out" with a new product or do they "come up" with a new product?

Why is it a bad idea to hire a hitman to eliminate most corrupt politicians?

Why can't we play rap on piano?

prove that the matrix A is diagonalizable

How can I prevent hyper evolved versions of regular creatures from wiping out their cousins?

How to take photos in burst mode, without vibration?

Why does Arabsat 6A need a Falcon Heavy to launch

Is "remove commented out code" correct English?

Brothers & sisters

Were any external disk drives stacked vertically?

Is there a hemisphere-neutral way of specifying a season?

How much of data wrangling is a data scientist's job?

Do I have a twin with permutated remainders?

Western buddy movie with a supernatural twist where a woman turns into an eagle at the end

What exploit are these user agents trying to use?

Fully-Firstable Anagram Sets

What reasons are there for a Capitalist to oppose a 100% inheritance tax?

How could indestructible materials be used in power generation?

Arrow those variables!

Has there ever been an airliner design involving reducing generator load by installing solar panels?

How to draw the figure with four pentagons?



Can I make “comment-region” comment empty lines?


Modify org-mode's definition of comment lines?How to change comment string used by comment-region?If I am in a comment (including empty lines), how do I get to the beginning of the comment?add a space after the comment delimiterHow to get emacs to automatically insert block comment prefixes?How to treat region between conflict markers as comment?How to protect LaTeX comment lines from indentation?auto-fill-mode fails in comment with empty second linecommand to mark a block comment as regionHow to align both of comments and macro of multiple lines with space instead tabs for C/C++ code?













3















In LaTeX code I can have:



Lorem ipsum dolor sit amet, consectetur
begincomment
adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Ut enim ad minim veniam, quis nostrud exercitation
endcomment
ullamco laboris nisi ut aliquip ex ea commodo consequat.


If I use comment-region (in a script) to comment the comment environment in la LaTeX code i obtain:



Lorem ipsum dolor sit amet, consectetur
%% begincomment
%% adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

%% Ut enim ad minim veniam, quis nostrud exercitation
%% endcomment
ullamco laboris nisi ut aliquip ex ea commodo consequat.


This is not good because LaTeX interpret the empty line(s) (outside of comment environment) as a paragraph break.



My question is: Can I make comment-region comment empty lines?



I tried customizing (let-bind) the comment-syle variable but all the options I've seen do not comment empty lines.



An alternative could be a "built-in" (otherwise I already know how to make this funcion by myself) function that let me append a string on every line of a region (not a triangle). Remember, I need to do it programmatically.










share|improve this question




























    3















    In LaTeX code I can have:



    Lorem ipsum dolor sit amet, consectetur
    begincomment
    adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

    Ut enim ad minim veniam, quis nostrud exercitation
    endcomment
    ullamco laboris nisi ut aliquip ex ea commodo consequat.


    If I use comment-region (in a script) to comment the comment environment in la LaTeX code i obtain:



    Lorem ipsum dolor sit amet, consectetur
    %% begincomment
    %% adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

    %% Ut enim ad minim veniam, quis nostrud exercitation
    %% endcomment
    ullamco laboris nisi ut aliquip ex ea commodo consequat.


    This is not good because LaTeX interpret the empty line(s) (outside of comment environment) as a paragraph break.



    My question is: Can I make comment-region comment empty lines?



    I tried customizing (let-bind) the comment-syle variable but all the options I've seen do not comment empty lines.



    An alternative could be a "built-in" (otherwise I already know how to make this funcion by myself) function that let me append a string on every line of a region (not a triangle). Remember, I need to do it programmatically.










    share|improve this question


























      3












      3








      3








      In LaTeX code I can have:



      Lorem ipsum dolor sit amet, consectetur
      begincomment
      adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

      Ut enim ad minim veniam, quis nostrud exercitation
      endcomment
      ullamco laboris nisi ut aliquip ex ea commodo consequat.


      If I use comment-region (in a script) to comment the comment environment in la LaTeX code i obtain:



      Lorem ipsum dolor sit amet, consectetur
      %% begincomment
      %% adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

      %% Ut enim ad minim veniam, quis nostrud exercitation
      %% endcomment
      ullamco laboris nisi ut aliquip ex ea commodo consequat.


      This is not good because LaTeX interpret the empty line(s) (outside of comment environment) as a paragraph break.



      My question is: Can I make comment-region comment empty lines?



      I tried customizing (let-bind) the comment-syle variable but all the options I've seen do not comment empty lines.



      An alternative could be a "built-in" (otherwise I already know how to make this funcion by myself) function that let me append a string on every line of a region (not a triangle). Remember, I need to do it programmatically.










      share|improve this question
















      In LaTeX code I can have:



      Lorem ipsum dolor sit amet, consectetur
      begincomment
      adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

      Ut enim ad minim veniam, quis nostrud exercitation
      endcomment
      ullamco laboris nisi ut aliquip ex ea commodo consequat.


      If I use comment-region (in a script) to comment the comment environment in la LaTeX code i obtain:



      Lorem ipsum dolor sit amet, consectetur
      %% begincomment
      %% adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

      %% Ut enim ad minim veniam, quis nostrud exercitation
      %% endcomment
      ullamco laboris nisi ut aliquip ex ea commodo consequat.


      This is not good because LaTeX interpret the empty line(s) (outside of comment environment) as a paragraph break.



      My question is: Can I make comment-region comment empty lines?



      I tried customizing (let-bind) the comment-syle variable but all the options I've seen do not comment empty lines.



      An alternative could be a "built-in" (otherwise I already know how to make this funcion by myself) function that let me append a string on every line of a region (not a triangle). Remember, I need to do it programmatically.







      comment






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 9 hours ago







      Gabriele Nicolardi

















      asked 10 hours ago









      Gabriele NicolardiGabriele Nicolardi

      514212




      514212




















          1 Answer
          1






          active

          oldest

          votes


















          6














          Customize option comment-empty-lines.




          comment-empty-lines is a variable defined in newcomment.el.



          Documentation:
          If nil, comment-region does not comment out empty lines.
          If t, it always comments out empty lines.
          If eol it only comments out empty lines if comments are
          terminated by the end of line (i.e. comment-end is empty).







          share|improve this answer

























            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "583"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2femacs.stackexchange.com%2fquestions%2f48764%2fcan-i-make-comment-region-comment-empty-lines%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            6














            Customize option comment-empty-lines.




            comment-empty-lines is a variable defined in newcomment.el.



            Documentation:
            If nil, comment-region does not comment out empty lines.
            If t, it always comments out empty lines.
            If eol it only comments out empty lines if comments are
            terminated by the end of line (i.e. comment-end is empty).







            share|improve this answer





























              6














              Customize option comment-empty-lines.




              comment-empty-lines is a variable defined in newcomment.el.



              Documentation:
              If nil, comment-region does not comment out empty lines.
              If t, it always comments out empty lines.
              If eol it only comments out empty lines if comments are
              terminated by the end of line (i.e. comment-end is empty).







              share|improve this answer



























                6












                6








                6







                Customize option comment-empty-lines.




                comment-empty-lines is a variable defined in newcomment.el.



                Documentation:
                If nil, comment-region does not comment out empty lines.
                If t, it always comments out empty lines.
                If eol it only comments out empty lines if comments are
                terminated by the end of line (i.e. comment-end is empty).







                share|improve this answer















                Customize option comment-empty-lines.




                comment-empty-lines is a variable defined in newcomment.el.



                Documentation:
                If nil, comment-region does not comment out empty lines.
                If t, it always comments out empty lines.
                If eol it only comments out empty lines if comments are
                terminated by the end of line (i.e. comment-end is empty).








                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 8 hours ago









                Drew

                49k463108




                49k463108










                answered 9 hours ago









                muffinmadmuffinmad

                33112




                33112



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Emacs Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2femacs.stackexchange.com%2fquestions%2f48764%2fcan-i-make-comment-region-comment-empty-lines%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    How to create a command for the “strange m” symbol in latex? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)How do you make your own symbol when Detexify fails?Writing bold small caps with mathpazo packageplus-minus symbol with parenthesis around the minus signGreek character in Beamer document titleHow to create dashed right arrow over symbol?Currency symbol: Turkish LiraDouble prec as a single symbol?Plus Sign Too Big; How to Call adfbullet?Is there a TeX macro for three-legged pi?How do I get my integral-like symbol to align like the integral?How to selectively substitute a letter with another symbol representing the same letterHow do I generate a less than symbol and vertical bar that are the same height?

                    Българска екзархия Съдържание История | Български екзарси | Вижте също | Външни препратки | Литература | Бележки | НавигацияУстав за управлението на българската екзархия. Цариград, 1870Слово на Ловешкия митрополит Иларион при откриването на Българския народен събор в Цариград на 23. II. 1870 г.Българската правда и гръцката кривда. От С. М. (= Софийски Мелетий). Цариград, 1872Предстоятели на Българската екзархияПодмененият ВеликденИнформационна агенция „Фокус“Димитър Ризов. Българите в техните исторически, етнографически и политически граници (Атлас съдържащ 40 карти). Berlin, Königliche Hoflithographie, Hof-Buch- und -Steindruckerei Wilhelm Greve, 1917Report of the International Commission to Inquire into the Causes and Conduct of the Balkan Wars

                    Category:Tremithousa Media in category "Tremithousa"Navigation menuUpload media34° 49′ 02.7″ N, 32° 26′ 37.32″ EOpenStreetMapGoogle EarthProximityramaReasonatorScholiaStatisticsWikiShootMe