From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hongyi Zhao Newsgroups: gmane.emacs.help Subject: Re: Right justify the comments starting from the position of `#' for all lines. Date: Mon, 27 Sep 2021 22:04:57 +0800 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21960"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs To: Daniel Fleischer Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 27 16:14:51 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mUrP4-0005II-0t for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 27 Sep 2021 16:14:46 +0200 Original-Received: from localhost ([::1]:42918 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mUrP2-0005j0-RR for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 27 Sep 2021 10:14:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58116) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mUrFo-00007g-Lm for help-gnu-emacs@gnu.org; Mon, 27 Sep 2021 10:05:13 -0400 Original-Received: from mail-ua1-x933.google.com ([2607:f8b0:4864:20::933]:39502) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mUrFn-0000WL-3t for help-gnu-emacs@gnu.org; Mon, 27 Sep 2021 10:05:12 -0400 Original-Received: by mail-ua1-x933.google.com with SMTP id 20so4214623uaj.6 for ; Mon, 27 Sep 2021 07:05:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=t0zz1eqCkVIGH/prhZ3N2L+qK4BvitVtaTmPkm1hJYU=; b=e+TDY6dBodKkZhzp9ZQrzxQbrPxu+c07DbpBxETzazfj8BAaNov5pH+SOjhs6TAnXz 9f0HPjjnM3z1nNMmvd7zD8ThbWqWq2a1ZodpIOAZJCJWBy3xsyfKKBNA9d9mitRuRyWC R1Zcn3Wnl7/e/eFZNX2fWlpnAK/e5DBQiJ1ognzgwmIjCuHyk41FJQ91dVPLNakJpLhk bG9iDUhm1DaqAxdcRwj2G4u3XtopHm4k/MUOJaGhY88o5Q4eK6lRZTfPYGjZYFJvvr6Y BUNtJXaYOTC6COenMgkfEgu9FgFIRcvEoPMZ2zIEJpfLHPkH5XEN6C05WNTS05381NTG z6aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=t0zz1eqCkVIGH/prhZ3N2L+qK4BvitVtaTmPkm1hJYU=; b=vsn12jL7K3RRE9kTazcjdL0mvjaEMfZW/KQzL/xliMBUn778ov3tDa7RzMhS+r34yn WC5DHqdjm/I8csTNisE17kJF1oIAlTcMqSSu0LKFFb5IVYsKm7Fn7C/QHZctrkPtOsof ItMbpE7I98PZ/J44aVt7BCeXZAbdnJCodqxsCbCqrJgOPCpXGRzBnuKPoJ5isLq8nu7j OI96lujjjeX1Ktq26vTZkTxxFjMY+8GkLy7SYG3hrzGJt52b/kvQshDkAtHDJK0IZzAN QVy1bFbIUENoUBpCCPFnCeQM1ije7zhj/e+x+DG6adweueACKj6bogTgZUI+tf81AGxs O8kg== X-Gm-Message-State: AOAM532Y2KU7UqUCRja27MdOuwpEFAhrJeDRTMzsxP64EiMqolNuXK0N i+qaSQE25lH0q2kwjR4ZgeOIQTyyym8iE7T6qvo= X-Google-Smtp-Source: ABdhPJxbPKzRGIDt6uk8kJlzUQzE3jWqqzc4Iiy7y1U52g9eNQfq3jAhGk6Fg49NoPrO8+tX2So4UxP0ugKZPgFZ4z4= X-Received: by 2002:ab0:1001:: with SMTP id f1mr18332731uab.115.1632751508977; Mon, 27 Sep 2021 07:05:08 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::933; envelope-from=hongyi.zhao@gmail.com; helo=mail-ua1-x933.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:133292 Archived-At: On Mon, Sep 27, 2021 at 9:25 PM Daniel Fleischer wrote: > > Hongyi Zhao [2021-09-27 Mon 17:54] wrote: > > > Suppose I've the following code snippets: > > > > foo ... # foo comments > > bar ... # bar comments > > baz ... # baz comments > > [...] > > > > Now, I want to right justify the comments starting from the position > > of `#' for all lines. Any hints/tips for achieving this goal? > > Can highlight the lines, use 'align-regexp' and then enter '#'. Thank you very much. It really works. BTW, how to adjust/control/set the position of the starting '#' in the ultimate aligned results? Best, HZ