Code Monkey home page Code Monkey logo

tuhdo.github.io's Introduction

tuhdo.github.io's People

Contributors

abhbh avatar binarin avatar boruch-baum avatar dangirsh avatar eksop avatar hhnr avatar hollobon avatar joyfulmantis avatar medimatrix avatar opilar avatar pbl64k avatar psihonavt avatar rahiel avatar roycyt avatar t9zx avatar tchajed avatar tuhdo avatar xuchunyang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tuhdo.github.io's Issues

c-ide demo: semantic error!

Hello, I'm following your guide of your "c-ide demo", when I learned the section "CEDET", I've found a confusing error while I use the company-semantic command, it always output:"cannot complete at point" and continuously output:"Wrong type argument: number-or-marker-p". And I'm confusing of that I can't get the same result like your demo when I used company-semantic, or maybe you not used company-semantic in your demo of completing boost::?

error "Lisp nesting exceeeds 'max-lisp-eval-depth'"

I keep getting this error when i open a remote file using tramp.
Running emacs on windows. Setup you lisp file then provided it in my init.
If i extend the lisp eval depth it quickly leads to crashes of emacs because stack is being overfilled.

Any idea what this could be? Any help appreaciated

Are some org files missing?

As mentioned in pull request #55, there are inconsistencies between the org files and the html.

  1. The files published are different from the ones currently staged. I attribute this to changes made directly to the HTML. If that's true, then the org files need to be updated accordingly.

  2. Not all of the org files in the project were staged, and not all HTML files have org files staged. Specifically:

2.1) HTML files missing but ORGg files present: cedet.html, c-ide-irony-back.html, ebrowse.html, theindex.html

2.2) ORG files missing but HTML files present: archive.html

company-clang-arguments errors when opening file and company-clang not working

Hi,
So I'm in the process of following instructions to setting up C++ IDE found in http://tuhdo.github.io/c-ide.html. I'm at the part of setting up the company-mode with clang (http://tuhdo.github.io/c-ide.html#orgheadline15). Followed all the setups, including the setup of the .dir-locals.el placed at the project root, which has the following content:
((nil . ((company-clang-arguments . ("-I/Users/jade/spdlog/include/")))))

But every time I try to open a file I get this error:

The local variables list in /Users/jade/spdlog/
contains values that may not be safe (*).

Do you want to apply it?  You can type
y  -- to apply the local variables list.
n  -- to ignore the local variables list.
!  -- to apply the local variables list, and permanently mark these
      values (*) as safe (in the future, they will be set automatically.)

  * company-clang-arguments : ("-I/Users/jade/spdlog/include/")

I enter y to get pass this point, but every time I attempt to trigger the company completion to include a header file found in the include path set above, it fails to recognize any headers found in that subdirectory (e.g. I just get a message "No completion found"). For instance in that include path, there is a spdlog subdirectory which contain numerous header files. Even after typing:

#include "spdlog/

followed with trigger the key that triggers company-complete, emacs prompts "No completion found".

I know I have the desired key for company-complete setup correctly, because I have also setup the company-c-headers feature and it has no problem finding the various system headers in the path setup for company-c-headers, when triggering the same company-complete key. But it never succeeds finding headers found in the path setup for company-clang-arguments. I suspect that the error I get when I first open up any file in that project, is a hint that somehow there's something wrong in my setup, but I'm not that familiar with trouble-shooting emacs lisp.

Here's what is in my init.el file as far as setting up company related stuff:

(require 'company)
(add-hook 'after-init-hook 'global-company-mode)
(setq company-backends (delete 'company-semantic company-backends))
(define-key c-mode-map  (kbd "C-<tab>") 'company-complete)
(define-key c++-mode-map (kbd "C-<tab>") 'company-complete)

(eval-after-load 'company
  '(add-to-list
    'company-backends 'company-c-headers)
  )

(setq company-c-headers-path-system '("/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/"
                                      "/usr/local/include/"))

Any help would be greatly appreciated.

Recommended methods for creating TAGS

I see in my version of emacs (gnu/debian 24.5.1, helm-gtags-20160917.2238) an undocumented interactive autoloaded compiled Lisp command helm-gtags-create-tags. Does that mean that the guide should not be recommending users manually run gnu global to create tags when using helm-gtags?

dead links in emacs-tutor part 1

The very last link Lisp Machine online museum and the link Why I Still Use Emacs from the section Other people’s “Why Emacs?” are both dead.

Trying to change buffers with mouse, end up on a *helm buffer* and after this can't change buffer with mouse anymore

Hi, i installed your emacs C++ environment setup and when i for example, find a file (C-x C-f) and change the buffer with the mouse 1, i end up in a buffer called *helm find files* and i cannot switch to other buffers this way, after encountering this buffer. This also happens every time i encounter a *helm buffer* this way, preventing me from switching buffer using mouse 1. On the buffer *Messages* these kind of error messages occur. How can i fix them?

Error during redisplay: (eval (with-helm-buffer (helm-show-candidate-number (car-safe helm-mode-line-string)))) signaled (error "No buffer named *helm*") [11 times]
helm-display-mode-line: Wrong type argument: stringp, ("File(s)" "\\<helm-map>\\[helm-help]:Help \\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct \\[helm-toggle-suspend-update]:Tog.suspend \\[helm-customize-group]:Conf")Error during redisplay: (eval (with-helm-buffer (helm-show-candidate-number (car-safe helm-mode-line-string)))) signaled (error "No buffer named *helm*")
Error during redisplay: (eval (with-helm-buffer (helm-show-candidate-number (car-safe helm-mode-line-string)))) signaled (error "No buffer named *helm*") [9 times]
auto trimmed 0 chars
helm-display-mode-line: Wrong type argument: stringp, ("File(s)" "\\<helm-map>\\[helm-help]:Help \\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct \\[helm-toggle-suspend-update]:Tog.suspend \\[helm-customize-group]:Conf") [2 times]
next-line: End of buffer
Quit
QuitError during redisplay: (eval (with-helm-buffer (helm-show-candidate-number (car-safe helm-mode-line-string)))) signaled (error "No buffer named *helm*")
Error during redisplay: (eval (with-helm-buffer (helm-show-candidate-number (car-safe helm-mode-line-string)))) signaled (error "No buffer named *helm*")

update C++ information: eglot etc.

eglot is now part of the newest emacs. Many people use it with success.

Perhaps time to switch (and update your C++ emacs information)?

grep buffer misunderstanding

In search buffers (buffers list, occurrences, whatever ) binding C-o works as `open smth in new buffer without switching point. But in grep buffer it does not work for me, status line reports next:

Buffer is read-only: #<buffer *grep*>

despite point in manual:

C-o     Display matched location, but do not switch point to matched buffer

-dotimes not defined

http://tuhdo.github.io/emacs-tutor3.html#sec-4-3-1

-dotimes is used in:
'prelude-duplicate-current-line-or-region

I thought it was used in two functions, but it looks like it's just the same function twice :).

I took a stab at trying to define it myself, assuming it was just dotimes with the iterator parameter ignored, but 'prelude-duplicate-current-line-or-region didn't do what the docs said it would.

Here was my guess for fun:

(defmacro -dotimes (arg &rest body)
  `(dotimes (,(gensym) ,arg) ,@body))

Let me know if there is a better place to put the issue! Thanks for making this manual, I've been learning a ton about emacs very quickly :)

company-clang doesn't work with kernel 5.3.6

Hi tuhdo,
I follow your blog and want to build an ide environment for kernel code reading.
When I try complete-mode with clang, something seems go wrong.
For example, when i type in

struct devi

then type command M-x company-complete, I wish struct device be auto-completed or a completion menu popped up, but i get the hint No completion found in the echo erea.

I got the following errors from clang-error buffer:

clang failed with error 1:
/usr/bin/clang -fsyntax-only -Xclang -code-completion-macros -x c -I/home/gnu/linux-5.3.6/include/ -I/home/gnu/linux-5.3.6/arch/arm/include/ -Xclang -code-completion-at=-:95:26 -

In file included from :7:
In file included from /home/gnu/linux-5.3.6/include/linux/kernel.h:13:
/home/gnu/linux-5.3.6/include/linux/log2.h:197:15: error: unknown type name 'attribute_const'
static inline attribute_const
^
/home/gnu/linux-5.3.6/include/linux/log2.h:198:1: error: expected identifier or '('
int __order_base_2(unsigned long n)
^
In file included from :7:
In file included from /home/gnu/linux-5.3.6/include/linux/kernel.h:15:
In file included from /home/gnu/linux-5.3.6/include/linux/printk.h:6:
/home/gnu/linux-5.3.6/include/linux/init.h:144:13: error: expected parameter declarator
extern char __initdata boot_command_line[];
^
/home/gnu/linux-5.3.6/include/linux/init.h:51:30: note: expanded from macro '__initdata'
#define __initdata __section(.init.data)
....
/home/gnu/linux-5.3.6/arch/arm/include/uapi/asm/swab.h:28:8: error: 'inline' can only appear on functions
static inline attribute_const __u32 __arch_swab32(__u32 x)
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

My emacs version: 26.1
& clang version: 7.0.1-9+b1 (tags/RELEASE_701/final)

Below is the content of variable company-clang-arguments

company-clang-arguments is a variable defined in ‘company-clang.el’.
Its value is
("-I/home/gnu/linux-5.3.6/include/" "-I/home/gnu/linux-5.3.6/arch/arm/include/")
Original value was nil
Local in buffer Makefile; global value is nil

This variable’s value is directory-local, set by the file
‘/home/gnu/linux-5.3.6/.dir-locals.el’.

Documentation:
Additional arguments to pass to clang when completing.
Prefix files (-include ...) can be selected with ‘company-clang-set-prefix’
or automatically through a custom ‘company-clang-prefix-guesser’.

You can customize this variable.

Any suggestion or help?
Many thanks

Package `emacs-25.1' is unavailable ?

Hi author,
Thank you for provide the learning guide !
I'am a newcomer for Emacs, when learning your c-ide guide and i had a problem as following:

Error (use-package): Failed to install projectile: Package emacs-25.1' is unavailable Error (use-package): projectile/:init: Symbol's function definition is void: projectile-global-mode Error (use-package): Cannot load projectile Error (use-package): Failed to install helm-projectile: Package emacs-25.1' is unavailable
Error (use-package): helm-projectile/:init: Symbol's function definition is void: helm-projectile-on
Error (use-package): Cannot load helm-projectile

Incorrect shortcut for recentering text

In chapter "Concepts", under section "Basic motion commands", in the third bullet list, the 5th bullet reads "Recenter a screen: M-l". The correct shortcut is C-l.

c-ide.html - Separating document flow for helm vs. gtags options

IMO, the c-ide document would be easier to read were it divided somehow by the helm vs. gtag options chosen by the user.

I made a first shot at a solution, by lining up parallel sections side-by-side using simple raw html table tags, which did read well, but presented poorly because the table was forced to width greater than 100% of my screen, and passed the two-tone background of the page.

Now that I know more about how the html is generated, maybe the solution already exists as an ox- option / function / script?

A second idea would be to have color-coded vertical margin stripes for the option being discussed, with the stripes occupying different column positions, for the silent mono-chrome minority among us. I guess that would be a css class definition.

Some typos in emacs-tutor

diff --git a/emacs-tutor/emacs-tutor.org b/emacs-tutor/emacs-tutor.org
index 696c588..f82011e 100644
--- a/emacs-tutor/emacs-tutor.org
+++ b/emacs-tutor/emacs-tutor.org
@@ -784,7 +784,7 @@ directory of buffer of that entry.
 |-------+---------------------------------|
 | =/ <= | Add a filter by buffer size     |
 |-------+---------------------------------|
-| =/ /= | Remove all filters in effect9   |
+| =/ /= | Remove all filters in effect    |
 |-------+---------------------------------|

 - Filter group commands:
@@ -852,7 +852,7 @@ bookmark too.
 Remember the key bindings is easy. You just need to remember that *C-x
 r* is the prefix for bookmark related commands. *m* stands for *mark*,
 meaning you *mark* something in some place; *b* stands for *bookmark*,
-*b* stands for bookmark, meaning you can switch to any bookmark quickly,
+meaning you can switch to any bookmark quickly,
 similar to *C-x b* switches to buffers quickly. Finally, *l* means
 *list* for listing bookmarks, analogous to =ibuffer= for listing
 buffers. If you want to preserve the bookmarks across Emacs sessions,
@@ -1026,7 +1026,7 @@ Then:

 - Insert the 3 lines and kill all again.

-- *C-3 C-y*, you will see =aaa= got inserted; * again, you will
+- *C-3 C-y*, you will see =aaa= got inserted; *C-y* again, you will
   see =aaa= got inserted again. =aaa= now bedcomes head of the list

 - ... and so on ...
@@ -1547,7 +1547,7 @@ buffer, a shell... Basically anything that Emacs can display. Let's try them out

 *C-x 2* to split the current window into two horizontal windows. After
 splitting, you will have the exact duplicate of your current editing
-**buffer. *C-x 2* is bound to =split-window-below=.
+buffer. *C-x 2* is bound to =split-window-below=.

 *C-x 3* to split your current window into two vertical windows. After
 splitting, you will have the exact duplicate of your current editing
@@ -1759,7 +1759,7 @@ C-f* variant.

 *_Exercise_*:

-- Create a new directory called "dired_practice" or a name of your
+- Create a new directory called "dired\_practice" or a name of your
   choice.
 - Create a new file of your choice.
 *** Visit files

Color off the symbols high-lightened via ‘highlight-symbol-at-point’

I already asked this problem to the author of the tutorial (thank you for kind response!)

I want to color off the symbols high-lightened via highlight-symbol-at-point (= M-s h .)

Tu Do (the author of this tutorial) told me that running ‘highlight-symbol-at-point’ one more time at the highlighting symbol will unhighlight the colors.

However, it still does not work in my emacs client.

I'm using windows 7 (64bits) and 64 bits emacs for Windows (the one introduced in the tutorial).

Does anyone have idea?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.