Emacs – Top Bug Nethttps://www.topbug.net
Techy and Trustable
Sun, 02 Dec 2018 08:33:31 +0000 en-US
hourly
1 https://wordpress.org/?v=5.1.1https://www.topbug.net/wp-content/uploads/2019/01/cropped-LOGO-TRANSPARENCY-ONLY-ICON-32x32.pngEmacs – Top Bug Nethttps://www.topbug.net
3232Attachment Reminder in Emacs message-modehttps://www.topbug.net/blog/2016/12/09/attachment-reminder-in-emacs-message-mode/
https://www.topbug.net/blog/2016/12/09/attachment-reminder-in-emacs-message-mode/#commentsFri, 09 Dec 2016 00:18:02 +0000https://www.topbug.net/?p=1019Last updated on December 13, 2016When sending out an email, sometimes we just forgot to attach the attachments. An attachment reminder can largely prevent this: You are asked to confirm whether you have forgotten the attachments if your message body shows that you may need one. However, Emacs by default does not provide such a […]

When sending out an email, sometimes we just forgot to attach the attachments. An attachment reminder can largely prevent this: You are asked to confirm whether you have forgotten the attachments if your message body shows that you may need one. However, Emacs by default does not provide such a feature in its mail composing mode message-mode, which is used in email clients such as gnus and mu4e. Here is an attachment reminder based on this comment:

]]>https://www.topbug.net/blog/2016/12/09/attachment-reminder-in-emacs-message-mode/feed/2Prevent Browser Processes Started by Emacs from Being Killed When Emacs Exits on GNU/Linuxhttps://www.topbug.net/blog/2016/11/16/prevent-browser-processes-started-by-emacs-from-being-killed-when-emacs-exits-on-gnulinux/
https://www.topbug.net/blog/2016/11/16/prevent-browser-processes-started-by-emacs-from-being-killed-when-emacs-exits-on-gnulinux/#commentsWed, 16 Nov 2016 01:05:32 +0000https://www.topbug.net/?p=943The function browse-url in Emacs can be used to start a browser process to visit a given URL. It is used by many packages such as org-mode, mu4e, etc. However, on GNU/Linux, by default a new browser process started by browse-url will be killed if the Emacs process exits. To prevent the browser process from […]

]]>The function browse-url in Emacs can be used to start a browser process to visit a given URL. It is used by many packages such as org-mode, mu4e, etc. However, on GNU/Linux, by default a new browser process started by browse-url will be killed if the Emacs process exits. To prevent the browser process from being killed, add the following code to your Emacs init file:

]]>https://www.topbug.net/blog/2016/11/16/prevent-browser-processes-started-by-emacs-from-being-killed-when-emacs-exits-on-gnulinux/feed/1Installing Emacs from Source: Avoid the Conflict of ctagshttps://www.topbug.net/blog/2016/11/10/installing-emacs-from-source-avoid-the-conflict-of-ctags/
https://www.topbug.net/blog/2016/11/10/installing-emacs-from-source-avoid-the-conflict-of-ctags/#commentsThu, 10 Nov 2016 07:36:15 +0000https://www.topbug.net/?p=935Last updated on December 10, 2016If installing Emacs from source, an executable named ctags will be installed by default. However, many systems such as GNU/Linux, FreeBSD and macOS often already have an executable named ctags installed, such as Exuberant Ctags or Universal Ctags, which then causes conflict. To avoid this conflict, we can use the […]

If installing Emacs from source, an executable named ctags will be installed by default. However, many systems such as GNU/Linux, FreeBSD and macOS often already have an executable named ctags installed, such as Exuberant Ctags or Universal Ctags, which then causes conflict. To avoid this conflict, we can use the switch --program-transform-name='s/^ctags$/ctags.emacs/' when running configure to rename ctags to ctags.emacs. For example:

]]>https://www.topbug.net/blog/2016/11/10/installing-emacs-from-source-avoid-the-conflict-of-ctags/feed/1Emacs ElDoc: Display Function or Variable Information Near Point (Cursor)https://www.topbug.net/blog/2016/11/03/emacs-display-function-or-variable-information-near-point-cursor/
https://www.topbug.net/blog/2016/11/03/emacs-display-function-or-variable-information-near-point-cursor/#commentsThu, 03 Nov 2016 19:45:37 +0000https://www.topbug.net/?p=923Last updated on December 10, 2016ElDoc mode is a minor mode that displays information about a function or variable in the text at point (cursor). However, by default, it displays the information in the echo area, which isn’t quite ideal since our eyes often need to traverse half of the screen to view that information: […]

ElDoc mode is a minor mode that displays information about a function or variable in the text at point (cursor). However, by default, it displays the information in the echo area, which isn’t quite ideal since our eyes often need to traverse half of the screen to view that information:

To make the information display near the point (cursor), install pos-tip.el, and add the following to your Emacs init file:

]]>https://www.topbug.net/blog/2016/11/03/emacs-display-function-or-variable-information-near-point-cursor/feed/4Emacs: Disable Certain Pairs for electric-pair-modehttps://www.topbug.net/blog/2016/09/29/emacs-disable-certain-pairs-for-electric-pair-mode/
https://www.topbug.net/blog/2016/09/29/emacs-disable-certain-pairs-for-electric-pair-mode/#commentsThu, 29 Sep 2016 06:18:47 +0000https://www.topbug.net/?p=744Last updated on December 10, 2016In GNU Emacs, electric-pair-mode is a minor mode for auto closing pairs of (curly) braces/brackets/quotes, which was first introduced in Emacs 24. However, up till now, it still has not provided an easy option to disable a certain pair—we need to make use of electric-pair-inhibit-predicate. To disable a certain pair, […]

In GNU Emacs, electric-pair-mode is a minor mode for auto closing pairs of (curly) braces/brackets/quotes, which was first introduced in Emacs 24. However, up till now, it still has not provided an easy option to disable a certain pair—we need to make use of electric-pair-inhibit-predicate. To disable a certain pair, such as double quotes, we can add the following to ~/.emacs or ~/.emacs.d/init.el:

To disable a certain pair for a specific mode, for example to disable the pairing of {} in web-mode (to allow web-mode to better handle the auto pairing of the template tags {% %}), we can add the following to ~/.emacs or ~/.emacs.d/init.el:

]]>https://www.topbug.net/blog/2016/09/29/emacs-disable-certain-pairs-for-electric-pair-mode/feed/3dired-quick-sort: Sort Dired Buffers Quickly in Emacshttps://www.topbug.net/blog/2016/08/17/dired-quick-sort-sort-dired-buffers-quickly-in-emacs/
https://www.topbug.net/blog/2016/08/17/dired-quick-sort-sort-dired-buffers-quickly-in-emacs/#commentsWed, 17 Aug 2016 20:33:16 +0000https://test.topbug.net/2016/08/17/dired-quick-sort-sort-dired-buffers-quickly-in-emacs/Last updated on December 10, 2016While Dired is great for browsing the file system, it is often annoying that the buffer is not sorted in the way we want to see. While Dired provides the flexible customizing variable dired-listing-switches, it is still not convenient to switch between different sorting criteria quickly. For this reason, I […]

While Dired is great for browsing the file system, it is often annoying that the buffer is not sorted in the way we want to see. While Dired provides the flexible customizing variable dired-listing-switches, it is still not convenient to switch between different sorting criteria quickly. For this reason, I created the Emacs extension dired-quick-sort to make sorting Dired an easy story.

Configuration

You can add the following to your ~/.emacs or ~/.emacs.d/init.el for a quick setup:

(require 'dired-quick-sort)
(dired-quick-sort-setup)

This will bind “S” in dired-mode to invoke the quick sort hydra and new Dired buffers are automatically sorted according to the criterion that was used to sort last time. See the document of dired-quick-sort-setup if you need a different setup. It is recommended that at least -l should be put into dired-listing-switches. If used with diredp-hide-details-initially-flag to nil.

Usage

Start a Dired buffer and press “S”. Now just following the screen to sort in the way you want and the sorting criteria is automatically used for new Dired buffers!